/* ============================================================
   企业AI智能管理平台 · 设计系统
   ────────────────────────────────────────────────────────────
   设计参数对齐阿里云（www.aliyun.com）实测值：
     主色    #1366ec   （页面出现 140 次的品牌主色）
     辅色    #5584ff / #6d54eb / #ff6a00（点缀橙）
     文字    #181818 / #191c21 / #333 / #666 / #999
     边框    #e9e9e9   （页面出现 2128 次，最高频边框色）
     背景    #fff / #f8faff / #f2f4f7 / #f7f9fc
     字体    PingFang SC → Helvetica Neue → Microsoft YaHei
     字号    12 / 14 / 16 / 18 / 20 / 22 / 26 / 28 / 44
     圆角    按钮 8px · 卡片 12px · 大图 16/24px
     阴影    多层叠加：主色投影 + 白色内高光
   ============================================================ */

:root {
  /* ---------- 中性色：不用冷灰，用阿里云的中性黑灰 ---------- */
  --n-0:   #ffffff;
  --n-25:  #fafbfc;
  --n-50:  #f8faff;   /* 阿里云卡片浅蓝底 */
  --n-75:  #f7f9fc;
  --n-100: #f2f4f7;   /* 阿里云次级底色 */
  --n-150: #e9e9e9;   /* 阿里云主边框色，2128 次 */
  --n-200: #dadde5;   /* 阿里云深边框 */
  --n-300: #bbc1c9;   /* 阿里云禁用字 */
  --n-400: #979da6;   /* 阿里云辅助字 */
  --n-500: #737985;   /* 阿里云中灰 */
  --n-600: #6c717a;
  --n-700: #4a4f57;
  --n-800: #333333;   /* 阿里云深灰 */
  --n-900: #191c21;   /* 阿里云标题黑 */
  --n-950: #181818;   /* 阿里云正文黑，出现 1241 次 */

  /* ---------- 语义映射 ---------- */
  --bg:          var(--n-100);
  --surface:     var(--n-0);
  --surface-2:   var(--n-50);
  --surface-3:   var(--n-75);
  --surface-in:  var(--n-100);
  --border:      var(--n-150);
  --border-2:    var(--n-200);
  --border-3:    var(--n-300);

  --text:        var(--n-950);
  --text-2:      var(--n-500);
  --text-3:      var(--n-400);
  --text-4:      var(--n-300);
  --text-inv:    var(--n-0);

  /* ---------- 品牌主色：阿里云 #1366ec ---------- */
  --brand:        #1366ec;
  --brand-hover:  #0d5ad6;
  --brand-active: #0a4cbb;
  --brand-fg:     #ffffff;
  --brand-weak:   #eaf2fe;
  --brand-weak-2: #d6e5fd;
  --brand-text:   #0d5ad6;
  --brand-light:  #5584ff;
  --brand-dark:   #0a3d80;
  /* 渐变（阿里云 hero 按钮同款） */
  --brand-grad: linear-gradient(135deg, #2e7bf6 0%, #1366ec 55%, #0d5ad6 100%);

  /* ---------- 点缀橙：阿里云价格/强调场景 ---------- */
  --accent:      #ff6a00;
  --accent-weak: #fff3ea;
  --accent-text: #d4500a;
  --accent-2:    #6d54eb;
  --accent-2-weak:#f1efff;

  /* ---------- 语义色：阿里云系 ---------- */
  --ok:      #00b42a;  --ok-weak:   #e8f9ec;  --ok-fg:   #009a24;  --ok-text:  #008a1f;
  --warn:    #ff7d00;  --warn-weak: #fff5e8;  --warn-fg: #d25f00;
  --err:     #f53f3f;  --err-weak:  #ffece8;  --err-fg:  #cb272d;
  --info:    #0e9fbb;  --info-weak: #e8f8fb;  --info-fg: #0a7d95;

  /* ---------- 圆角：对齐阿里云 ---------- */
  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   8px;    /* 阿里云按钮圆角 */
  --r-lg:   12px;   /* 阿里云卡片圆角 */
  --r-xl:   16px;
  --r-2xl:  24px;
  --r-full: 999px;

  /* ---------- 阴影：阿里云多层叠加 ---------- */
  --sh-xs: 0 1px 2px rgba(24,24,24,.04);
  --sh-sm: 0 2px 8px rgba(24,24,24,.06);
  --sh-md: 0 4px 16px rgba(24,24,24,.08);
  --sh-lg: 0 8px 28px rgba(24,24,24,.10);
  --sh-xl: 0 16px 48px rgba(24,24,24,.14);
  --sh-brand: 0 4px 12px rgba(19,102,236,.20), inset 0 1px 0 rgba(255,255,255,.18);
  --sh-brand-lg: 0 8px 24px rgba(19,102,236,.28), inset 0 1px 0 rgba(255,255,255,.22);
  /* 阿里云按钮内高光 */
  --sh-bevel: inset 0 1px 0 rgba(255,255,255,.20), inset 0 -1px 0 rgba(0,0,0,.06);

  /* ---------- 字体：PingFang SC 优先 ---------- */
  --font: "PingFang SC", "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB",
          "Microsoft YaHei UI", "Microsoft YaHei", SimSun, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* ---------- 间距 ---------- */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px;

  --sidebar-w: 272px;
  --topbar-h: 60px;

  /* ---------- 部门主题变量（默认值，运行时由 deptStyle() 覆盖） ---------- */
  --dc:       #1366ec;
  --dc-weak:  #eaf2fe;
  --dc-text:  #0d5ad6;
  --dc-grad:  linear-gradient(135deg, #2e7bf6 0%, #1366ec 55%, #0d5ad6 100%);
  --dc-shadow: rgba(19,102,236,.26);

  /* ---------- 动效 ---------- */
  --ease: cubic-bezier(.34, .69, .1, 1);
  --dur:  .18s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 500;          /* 指令：全部字体加粗 */
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }
code, .mono {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--n-100);
  padding: 1px 5px; border-radius: var(--r-xs);
  color: var(--n-800);
}
::selection { background: var(--brand-weak-2); color: var(--brand-dark); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: var(--r-full); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b0b0b0; }

/* ==================== 图标 ==================== */
.ic { width: 16px; height: 16px; flex-shrink: 0; display: inline-block; vertical-align: -3px; stroke-width: 1.7; }
.ic-sm { width: 14px; height: 14px; }
.ic-lg { width: 18px; height: 18px; }
.ic-xl { width: 22px; height: 22px; }

/* ==================== 按钮：阿里云规格 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 18px;
  font-family: var(--font); font-size: 14px; font-weight: 400; line-height: 1;
  color: var(--n-800);
  background: var(--surface);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);          /* 8px */
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: all var(--dur) var(--ease);
  box-shadow: var(--sh-xs);
}
.btn:hover:not(:disabled) {
  color: var(--brand); border-color: var(--brand-light);
  background: var(--n-0);
}
.btn:active:not(:disabled) { background: var(--n-100); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--brand-grad);
  border-color: transparent;
  color: var(--brand-fg);
  font-weight: 500;
  box-shadow: var(--sh-brand);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #3d87f7 0%, #1a6ff0 55%, #0f5cd8 100%);
  color: var(--brand-fg);
  box-shadow: var(--sh-brand-lg);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
  background: var(--brand-active); color: var(--brand-fg);
  transform: translateY(0); box-shadow: var(--sh-brand);
}

.btn-accent {
  background: linear-gradient(135deg, #ff8534 0%, #ff6a00 100%);
  border-color: transparent; color: #fff; font-weight: 500;
  box-shadow: 0 4px 12px rgba(255,106,0,.24);
}
.btn-accent:hover:not(:disabled) { color: #fff; transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255,106,0,.30); }

.btn-outline-brand {
  background: var(--n-0); border-color: var(--brand); color: var(--brand); font-weight: 500;
}
.btn-outline-brand:hover:not(:disabled) { background: var(--brand-weak); color: var(--brand-text); }

.btn-danger { background: var(--n-0); border-color: #fbc4bd; color: var(--err); }
.btn-danger:hover:not(:disabled) { background: var(--err-weak); border-color: var(--err); color: var(--err-fg); }

.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--n-500); }
.btn-ghost:hover:not(:disabled) { background: var(--n-100); color: var(--n-800); }

.btn-sm { height: 30px; padding: 0 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn-xs { height: 26px; padding: 0 10px; font-size: 12px; border-radius: var(--r-sm); }
.btn-lg { height: 44px; padding: 0 28px; font-size: 16px; }   /* 阿里云大按钮 44px */
.btn-block { width: 100%; }

.icon-btn {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent;
  border-radius: var(--r-md); color: var(--n-500); cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--n-100); color: var(--brand); }
.icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ==================== 表单 ==================== */
input[type=text], input[type=password], input[type=number], input[type=email],
input[type=date], select, textarea {
  width: 100%; height: 36px; padding: 0 12px;
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  transition: all var(--dur) var(--ease);
  outline: none;
}
textarea { height: auto; min-height: 92px; padding: 9px 12px; line-height: 1.7; resize: vertical; }
select {
  cursor: pointer; appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23737985' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--brand-light); }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(19,102,236,.12);
}
input::placeholder, textarea::placeholder { color: var(--n-300); }
input:disabled, select:disabled, textarea:disabled { background: var(--n-100); color: var(--n-300); cursor: not-allowed; }

label { display: block; font-size: 14px; font-weight: 600; color: var(--n-800); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: 12.5px; font-weight: 500; color: var(--n-500); line-height: 1.65; margin-top: 6px; }
.hint-brand {
  padding: 12px 16px; background: linear-gradient(90deg,#eef4ff 0%,#f8faff 100%);
  border: 1px solid #d3e2fd;
  border-left: 3px solid var(--brand);
  border-radius: var(--r-md); color: #1a4a9e;
  font-size: 13.5px; font-weight: 500; line-height: 1.7;
}
.hint-warn {
  padding: 12px 16px; background: linear-gradient(90deg,#fff6e8 0%,#fffaf3 100%);
  border: 1px solid #ffdca8; border-left: 3px solid var(--warn);
  border-radius: var(--r-md);
  color: #a85400; font-size: 13.5px; font-weight: 500; line-height: 1.7;
}

/* ==================== 登录：阿里云风格 ==================== */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--n-0); }

.login-aside {
  position: relative; overflow: hidden;
  padding: 56px 60px;
  display: flex; flex-direction: column; justify-content: space-between;
  /* 阿里云 hero：浅蓝渐变底 + 光斑 */
  background:
    radial-gradient(1000px 520px at 78% 8%, #ffffff 0%, rgba(255,255,255,0) 60%),
    radial-gradient(680px 420px at 12% 88%, #dbe9fe 0%, rgba(219,233,254,0) 62%),
    linear-gradient(160deg, #f4f8ff 0%, #e8f1fe 46%, #dfeaff 100%);
}
.login-aside::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(19,102,236,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19,102,236,.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 80% at 26% 46%, #000 12%, transparent 76%);
  pointer-events: none;
}
.login-aside > * { position: relative; z-index: 1; }

.login-logo-lg { display: flex; align-items: center; gap: 11px; }
.login-logo-mark {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--brand-grad); color: #fff;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 600; letter-spacing: -.3px;
  box-shadow: 0 4px 12px rgba(19,102,236,.28);
}
.login-logo-name { font-size: 16px; font-weight: 500; color: var(--n-900); }

.login-pitch { max-width: 460px; }
.login-pitch h2 {
  font-size: 44px;                 /* 阿里云 h2 实测 44px */
  font-weight: 600;
  line-height: 64px;               /* 阿里云实测行高 64px */
  letter-spacing: -1px;
  color: var(--n-900);
  margin-bottom: 20px;
}
.login-pitch h2 em {
  font-style: normal;
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-pitch p { font-size: 16px; line-height: 28px; color: var(--n-500); }
.login-points { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.login-point {
  display: flex; align-items: center; gap: 11px;
  font-size: 14px; color: var(--n-700);
}
.login-point .ic { color: var(--brand); }

.login-foot-note { font-size: 12px; color: var(--n-400); }

.login-main { display: flex; align-items: center; justify-content: center; padding: 56px 48px; background: var(--n-0); }
.login-box { width: 100%; max-width: 360px; }
.login-box h1 { font-size: 28px; font-weight: 600; letter-spacing: -.5px; color: var(--n-900); margin-bottom: 8px; }
.login-box > p { font-size: 16px; line-height: 28px; color: var(--n-500); margin-bottom: 36px; }
.section-title {
  font-size: 26px; font-weight: 500; line-height: 40px;
  letter-spacing: -.4px; color: var(--n-900); margin-bottom: 4px;
}
.login-box .field { margin-bottom: 18px; }
.login-box input { height: 44px; font-size: 15px; }
.login-box .btn-lg { width: 100%; margin-top: 6px; }
.login-err {
  font-size: 13px; color: var(--err-fg);
  min-height: 20px; margin: -6px 0 10px;
  display: flex; align-items: center; gap: 5px;
}
.login-err:empty { display: none; }
/* 演示账号入口默认隐藏：正式环境暴露等于公开可用账号密码。需演示时加 .show */
.login-demo { display: none; }
.login-demo.show { display: block; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--n-150); }
.login-demo-title { font-size: 12px; color: var(--n-400); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.login-demo-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login-demo-list button {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; text-align: left;
  border: 1px solid var(--n-200); border-radius: var(--r-md);
  background: var(--n-0); color: var(--n-500);
  font-family: var(--font); font-size: 13px; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.login-demo-list button .ic { color: var(--n-400); transition: color var(--dur) var(--ease); }
.login-demo-list button:hover { border-color: var(--brand); background: var(--brand-weak); color: var(--brand-text); }
.login-demo-list button:hover .ic { color: var(--brand); }
.login-demo-list button b { font-weight: 500; color: var(--n-800); }

@media (max-width: 940px) {
  .login-page { grid-template-columns: 1fr; }
  .login-aside { display: none; }
}

/* ==================== 应用框架 ==================== */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--n-0);
  border-right: 1px solid var(--n-150);
}
.side-brand {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--n-150);
}
.side-mark {
  width: 32px; height: 32px; flex-shrink: 0;
  display: block; line-height: 0;
}
.side-mark .logo-svg {
  width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 3px 7px rgba(30,95,224,.28));
}
.side-name { font-size: 16px; font-weight: 600; color: var(--n-900); line-height: 1.25; }
.side-name span { display: block; font-size: 12px; font-weight: 500; color: var(--n-400); }

.nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-group-title {
  font-size: 13px; font-weight: 600; color: var(--n-500);
  padding: 0 12px 9px; letter-spacing: .3px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  height: 42px; padding: 0 12px;
  border-radius: var(--r-md);
  color: var(--n-800); font-size: 15px; font-weight: 600;
  cursor: pointer; user-select: none;
  transition: all var(--dur) var(--ease);
  position: relative; overflow: hidden;
}
/* 部门条目：左侧主题色条 + 悬停染色 */
.nav-item[data-dept] { padding-left: 14px; }
.nav-item[data-dept]::before {
  content: ''; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 4px; border-radius: 0 3px 3px 0;
  background: var(--dc, var(--brand));
  opacity: .55; transition: all var(--dur) var(--ease);
}
.nav-item[data-dept]:hover { background: var(--dc-weak, var(--n-75)); }
.nav-item[data-dept]:hover::before { opacity: 1; width: 5px; }
.nav-item[data-dept].active {
  background: var(--dc-weak, var(--brand-weak));
  color: var(--dc-text, var(--brand-text));
}
.nav-item[data-dept].active::before { opacity: 1; width: 5px; top: 6px; bottom: 6px; }
.nav-item[data-dept].active .nav-icon,
.nav-item[data-dept].active .ic { color: var(--dc, var(--brand)); }
.nav-item:hover { background: var(--n-75); color: var(--n-900); }
.nav-item.active { background: var(--brand-weak); color: var(--brand-text); font-weight: 500; }
.nav-item .ic { color: var(--n-400); transition: color var(--dur) var(--ease); }
.nav-item:hover .ic { color: var(--n-500); }
.nav-item.active .ic { color: var(--brand); }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex-shrink: 0; color: var(--n-400); }
.nav-item:hover .nav-icon { color: var(--n-500); }
.nav-item.active .nav-icon { color: var(--brand); }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

.side-foot { padding: 10px; border-top: 1px solid var(--n-150); flex-shrink: 0; }
.llm-badge {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--n-200); border-radius: var(--r-md);
  background: var(--n-50); color: var(--n-600);
  font-family: var(--font); font-size: 12px; text-align: left; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.llm-badge:hover { border-color: var(--brand-light); background: var(--n-0); }
.llm-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.llm-badge.online { background: var(--ok-weak); border-color: #b3e6c0; color: var(--ok-text); }
.llm-badge.online .ic { color: var(--ok); }
.llm-badge.offline { background: var(--warn-weak); border-color: #ffd9a6; color: var(--warn-fg); }
.llm-badge.offline .ic { color: var(--warn); }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; gap: 16px;
  background: var(--n-0);
  border-bottom: 1px solid var(--n-150);
}
.topbar-left { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.topbar-left h2 { font-size: 21px; font-weight: 600; letter-spacing: -.3px; color: var(--n-900); white-space: nowrap; }
.page-desc { font-size: 14px; font-weight: 500; color: var(--n-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 12px 4px 4px; border-radius: var(--r-full);
  cursor: pointer; transition: background var(--dur) var(--ease);
}
.user-chip:hover { background: var(--n-100); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-grad); color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 500; flex-shrink: 0;
}
.user-meta { line-height: 1.3; text-align: left; }
.user-name { font-size: 14px; font-weight: 600; color: var(--n-800); }
.user-role { font-size: 12px; font-weight: 500; color: var(--n-400); }

.view { flex: 1; overflow-y: auto; padding: 24px; }

/* ==================== 卡片：阿里云 12px 圆角 ==================== */
.card {
  background: var(--n-0);
  border: 1px solid var(--n-150);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  margin-bottom: 16px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; min-height: 56px;
  background: linear-gradient(90deg, #f4f8ff 0%, #fbfcfe 100%);
  border-bottom: 1px solid #dfe8f5;
  position: relative;
}
.card-head::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--brand);
}
.card-head h3 {
  font-size: 17px; font-weight: 600; color: var(--n-900);
  display: flex; align-items: center; gap: 8px;
}
.card-head h3 .ic { color: var(--n-400); }
.card-head .sub { font-size: 13px; color: var(--n-500); font-weight: 500; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }
.card-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--n-150);
  background: var(--n-50);
}
.card-foot .hint { margin: 0; margin-right: auto; }

/* ==================== 统计卡 ==================== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  background: linear-gradient(158deg, #f2f7ff 0%, #fbfdff 46%, #f8fafd 100%);
  border: 1px solid #e3edfb;
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-xs);
  transition: all var(--dur) var(--ease);
  position: relative; overflow: hidden;
}
/* 顶部彩条：区分指标语义但不抢眼 */
.stat::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #6ea8ff 0%, #1366ec 100%);
}
.stat.ok::before    { background: linear-gradient(90deg, #7fe0a8 0%, #12b35c 100%); }
.stat.warn::before  { background: linear-gradient(90deg, #ffcf87 0%, #ff8f1f 100%); }
.stat.err::before   { background: linear-gradient(90deg, #ffa8a4 0%, #f5453f 100%); }
.stat.accent::before{ background: linear-gradient(90deg, #ffc38a 0%, #ff6a00 100%); }
.stat:hover { box-shadow: var(--sh-md); transform: translateY(-2px); border-color: #cfe0f7; }
/* 右上角淡色圆斑 */
.stat::after {
  content: ''; position: absolute; right: -24px; top: -24px;
  width: 88px; height: 88px; border-radius: 50%;
  background: radial-gradient(circle, rgba(110,168,255,.16) 0%, rgba(110,168,255,0) 70%);
}
.stat.ok::after     { background: radial-gradient(circle, rgba(18,179,92,.14) 0%, rgba(18,179,92,0) 70%); }
.stat.warn::after   { background: radial-gradient(circle, rgba(255,143,31,.14) 0%, rgba(255,143,31,0) 70%); }
.stat.err::after    { background: radial-gradient(circle, rgba(245,69,63,.12) 0%, rgba(245,69,63,0) 70%); }
.stat.accent::after { background: radial-gradient(circle, rgba(255,106,0,.13) 0%, rgba(255,106,0,0) 70%); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; position: relative; z-index: 1; }
/* 浅色系：淡底 + 彩字，不再用高饱和实心块 */
.stat-icon {
  width: 38px; height: 38px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: linear-gradient(150deg, #e3efff 0%, #d2e3fd 100%);
  color: #1366ec;
  border: 1px solid rgba(19,102,236,.14);
}
.stat-icon .ic { width: 18px; height: 18px; }
.stat.ok .stat-icon {
  background: linear-gradient(150deg, #e2f8ea 0%, #d2f0de 100%);
  color: #0f9c50; border-color: rgba(15,156,80,.16);
}
.stat.warn .stat-icon {
  background: linear-gradient(150deg, #fff3e2 0%, #ffe8cc 100%);
  color: #e07c12; border-color: rgba(224,124,18,.16);
}
.stat.err .stat-icon {
  background: linear-gradient(150deg, #ffeceb 0%, #ffdcda 100%);
  color: #e03833; border-color: rgba(224,56,51,.16);
}
.stat.accent .stat-icon {
  background: linear-gradient(150deg, #fff0e4 0%, #ffe0cc 100%);
  color: #f06000; border-color: rgba(240,96,0,.16);
}
.stat-value {
  font-size: 28px; font-weight: 600; letter-spacing: -1px; line-height: 1.15;
  color: var(--n-900); font-variant-numeric: tabular-nums;
  position: relative; z-index: 1;
}
.stat.ok .stat-value     { color: #0d8a46; }
.stat.warn .stat-value   { color: #c96a08; }
.stat.err .stat-value    { color: #d1322d; }
.stat.accent .stat-value { color: #d95b00; }
.stat-value small { font-size: 14px; font-weight: 400; color: var(--n-400); letter-spacing: 0; }
.stat-label { font-size: 13.5px; font-weight: 600; color: var(--n-500); margin-top: 4px; position: relative; z-index: 1; }

/* ==================== 表格 ==================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-weight: 500; }
thead th {
  height: 44px; padding: 0 16px;
  background: var(--n-50);
  color: var(--n-700); font-size: 14px; font-weight: 600; text-align: left;
  white-space: nowrap; border-bottom: 1px solid var(--n-150);
}
tbody td { padding: 13px 16px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; color: var(--n-700); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--n-50); }
tbody td strong, .cell-strong { color: var(--n-900); font-weight: 500; }
.cell-sub { font-size: 12px; color: var(--n-400); margin-top: 2px; }
.table-actions { display: flex; gap: 6px; }

.empty { padding: 56px 20px; text-align: center; color: var(--n-400); }
.empty-icon {
  width: 60px; height: 60px; margin: 0 auto 16px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #eaf2fe, #f5f8ff);
  border: 1px solid #dbe6fb;
  display: grid; place-items: center;
  color: var(--brand-light);
}
.empty-icon .ic { width: 24px; height: 24px; }
.empty-text { font-size: 14.5px; font-weight: 500; line-height: 1.65; color: var(--n-500); }
.empty-text strong { display: block; color: var(--n-700); font-weight: 500; margin-bottom: 4px; font-size: 15px; }

/* ==================== 标签 ==================== */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-xs);
  font-size: 12.5px; font-weight: 600;
  background: #e8eef7; color: #3a5578; white-space: nowrap;
}
.tag .ic { width: 12px; height: 12px; }
.tag-brand { background: #d6e5fd; color: #0d5ad6; }
.tag-ok    { background: #d4f5de; color: #078c21; }
.tag-warn  { background: #ffe8c7; color: #b35c00; }
.tag-err   { background: #ffdcd8; color: #c92a20; }
.tag-info  { background: #d3f2f8; color: #0a7d95; }
.tag-orange{ background: #ffe8d6; color: #cc5500; }

.dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); }
.dot-err { background: var(--err); } .dot-idle { background: var(--n-300); }
.dot-brand { background: var(--brand); }

/* ==================== 工具栏 ==================== */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--n-100); border-radius: var(--r-md); padding: 3px; gap: 2px; }
.seg button {
  height: 28px; padding: 0 14px;
  border: none; background: transparent; border-radius: var(--r-sm);
  font-family: var(--font); font-size: 13px; color: var(--n-600); cursor: pointer;
  transition: all var(--dur) var(--ease); white-space: nowrap;
}
.seg button:hover { color: var(--n-900); }
.seg button.active { background: var(--n-0); color: var(--brand-text); font-weight: 500; box-shadow: var(--sh-xs); }
.search-box { position: relative; min-width: 240px; }
.search-box input { padding-left: 34px; }
.search-box > .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--n-300); pointer-events: none; }

/* ==================== 对话门户 ==================== */
.chat-layout {
  display: flex; height: calc(100vh - var(--topbar-h) - 48px);
  background: var(--n-0); border: 1px solid var(--n-150);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-xs);
}
.chat-side {
  width: 216px; flex-shrink: 0;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--n-150);
  background: var(--n-50);
}
.chat-side-head { padding: 12px; border-bottom: 1px solid var(--n-150); }
.conv-list { flex: 1; overflow-y: auto; padding: 8px; }
.conv-item {
  padding: 9px 11px; border-radius: var(--r-md);
  cursor: pointer; margin-bottom: 2px;
  transition: all var(--dur) var(--ease);
}
.conv-item:hover { background: var(--n-0); }
.conv-item.active { background: var(--n-0); box-shadow: var(--sh-xs); }
.conv-item-title {
  font-size: 13px; color: var(--n-700);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 16px;
}
.conv-item.active .conv-item-title { color: var(--n-900); }
.conv-item-time { font-size: 11px; color: var(--n-300); margin-top: 2px; }

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 12px 20px; border-bottom: 1px solid var(--n-150); flex-shrink: 0;
}
.chat-agent-pick { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-agent-label { font-size: 13px; color: var(--n-400); white-space: nowrap; }
.chat-messages { flex: 1; overflow-y: auto; padding: 28px; background: var(--n-50); }

.msg { display: flex; gap: 14px; margin-bottom: 28px; max-width: 860px; }
.msg-avatar {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  flex-shrink: 0; display: grid; place-items: center;
  font-size: 12px; font-weight: 500;
}
.msg.user .msg-avatar { background: var(--n-200); color: var(--n-700); }
.msg.assistant .msg-avatar { background: var(--brand-grad); color: #fff; box-shadow: 0 2px 8px rgba(19,102,236,.24); }
.msg-body { flex: 1; min-width: 0; }
.msg-role {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--n-600);
  margin-bottom: 8px;
}
.msg-content {
  background: var(--n-0);
  border: 1px solid var(--n-150);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  font-size: 14px; line-height: 1.8; color: var(--n-800);
  box-shadow: var(--sh-xs);
}
.msg.user .msg-content { background: var(--n-100); border-color: transparent; }
.msg-content > *:first-child { margin-top: 0; }
.msg-content > *:last-child { margin-bottom: 0; }
.msg-content h1, .msg-content h2 {
  font-size: 18px; font-weight: 500; color: var(--n-900);
  margin: 22px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--n-150);
}
.msg-content h3 { font-size: 16px; font-weight: 500; color: var(--n-900); margin: 18px 0 8px; }
.msg-content p { margin: 10px 0; }
.msg-content ul, .msg-content ol { margin: 10px 0 10px 22px; }
.msg-content li { margin: 5px 0; }
.msg-content li::marker { color: var(--n-300); }
.msg-content code { background: var(--brand-weak); color: var(--brand-text); font-size: 13px; }
.msg-content pre {
  background: #1f2937; color: #e5e7eb;
  padding: 14px 16px; border-radius: var(--r-md);
  overflow-x: auto; margin: 12px 0; font-size: 13px; line-height: 1.7;
}
.msg-content pre code { background: none; color: inherit; padding: 0; }
.msg-content blockquote {
  border-left: 3px solid var(--brand);
  background: var(--brand-weak);
  padding: 10px 16px; margin: 12px 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--brand-text); font-size: 14px;
}
.msg-content blockquote > *:first-child { margin-top: 0; }
.msg-content blockquote > *:last-child { margin-bottom: 0; }
.msg-content hr { border: none; border-top: 1px solid var(--n-150); margin: 18px 0; }
.msg-content table { border: 1px solid var(--n-150); margin: 12px 0; border-radius: var(--r-sm); overflow: hidden; }
.msg-content th, .msg-content td { border: 1px solid var(--n-150); padding: 8px 12px; }
.msg-content th { background: var(--n-50); font-weight: 500; font-size: 13px; }
.msg-content strong { font-weight: 500; color: var(--n-900); }

.msg-cite { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--n-200); font-size: 12px; }
.msg-cite-title { font-weight: 500; color: var(--n-500); margin-bottom: 8px; }
.cite-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 3px;
  background: var(--n-50); border: 1px solid var(--n-200);
  border-radius: var(--r-full); margin: 0 6px 6px 0; cursor: pointer;
  font-size: 12px; color: var(--n-600);
  transition: all var(--dur) var(--ease); max-width: 300px;
}
.cite-chip:hover { border-color: var(--brand); background: var(--brand-weak); color: var(--brand-text); }
.cite-idx {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--n-200); color: var(--n-700);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 500; flex-shrink: 0;
}
.cite-chip:hover .cite-idx { background: var(--brand); color: #fff; }
.cite-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--n-300); margin-top: 8px; font-variant-numeric: tabular-nums; }

.chat-input-area { padding: 14px 20px; border-top: 1px solid var(--n-150); flex-shrink: 0; }
.chat-input-wrap {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--n-200); border-radius: var(--r-lg);
  background: var(--n-0);
  transition: all var(--dur) var(--ease);
}
.chat-input-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(19,102,236,.10); }
.chat-input-wrap textarea {
  border: none; outline: none; flex: 1;
  min-height: 22px; max-height: 150px;
  padding: 5px 0; font-size: 14px; line-height: 1.65; background: transparent; resize: none;
}
.chat-input-wrap textarea:focus { box-shadow: none; }
.chat-quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 12px; flex-shrink: 0; }
.quick-chip {
  padding: 5px 12px;
  border: 1px solid var(--n-200); border-radius: var(--r-full);
  font-size: 12px; color: var(--n-600); cursor: pointer; background: var(--n-0);
  transition: all var(--dur) var(--ease);
}
.quick-chip:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-weak); }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 8px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--n-300); animation: pulse 1.3s var(--ease) infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%,60%,100% { opacity:.25; transform:translateY(0);} 30% { opacity:1; transform:translateY(-3px);} }

/* 看板与系统页栅格 */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.sys-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1080px) {
  .dash-grid, .sys-grid { grid-template-columns: 1fr; }
}

/* ==================== 智能体 / 部门 / 技能包 ==================== */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.agent-card {
  background: var(--n-0); border: 1px solid var(--n-150);
  border-radius: var(--r-lg); padding: 18px; cursor: pointer;
  transition: all var(--dur) var(--ease);
  display: flex; flex-direction: column;
}
.agent-card:hover { border-color: var(--brand-light); box-shadow: var(--sh-md); transform: translateY(-2px); }
.agent-top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.agent-icon {
  width: 34px; height: 34px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--brand-weak); color: var(--brand); flex-shrink: 0;
}
.agent-name { font-size: 15px; font-weight: 500; color: var(--n-900); }
.agent-group { font-size: 12px; color: var(--n-400); }
.agent-desc { font-size: 13px; color: var(--n-600); line-height: 1.7; flex: 1; margin-bottom: 14px; }
.agent-skills { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--n-150); }
.skill-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 8px;
  background: var(--n-100); color: var(--n-600);
  border-radius: var(--r-xs); font-size: 11.5px;
}
.skill-chip i { font-style: normal; font-size: 10px; color: var(--n-300); font-family: var(--font-mono); }
.agent-scope { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--n-150); }

.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 14px; }
.dept-card {
  position: relative; overflow: hidden;
  background: var(--n-0); border: 1px solid var(--n-150);
  border-radius: var(--r-lg); padding: 0; cursor: pointer;
  transition: all var(--dur) var(--ease);
  display: flex; flex-direction: column;
}
.dept-card:hover { border-color: var(--dc, var(--brand)); box-shadow: var(--sh-lg); transform: translateY(-3px); }
/* 主题色头部 */
.dept-card-top {
  display: flex; align-items: center; gap: 13px;
  padding: 18px 18px 16px;
  background: var(--dc-grad, linear-gradient(135deg,#1366ec,#0d5ad6));
  color: #fff;
}
.dept-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: rgba(255,255,255,.20); color: #fff; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.28);
}
.dept-icon .ic { width: 22px; height: 22px; }
.dept-name { font-size: 16.5px; font-weight: 600; color: #fff; letter-spacing: -.2px; }
.dept-key {
  font-size: 11.5px; color: rgba(255,255,255,.78);
  font-family: var(--font-mono); margin-top: 2px; font-weight: 500;
}
.dept-card-body { padding: 15px 18px 18px; }
.dept-card-stats {
  display: flex; gap: 10px; font-size: 12.5px; font-weight: 600;
  color: var(--dc-text, var(--n-600)); flex-wrap: wrap;
}
.dept-card-stats span {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--dc-weak, var(--n-100));
  padding: 3px 9px; border-radius: var(--r-xs);
}
.dept-card-stats span { display: inline-flex; align-items: center; gap: 4px; }

.dept-hero {
  background: var(--n-0); border: 1px solid var(--n-150);
  border-radius: var(--r-lg); padding: 0; margin-bottom: 18px;
  box-shadow: var(--sh-sm); overflow: hidden;
}
.dept-hero-banner {
  background: var(--dc-grad, linear-gradient(135deg,#1366ec,#0d5ad6));
  padding: 22px 26px; color: #fff; position: relative; overflow: hidden;
}
.dept-hero-banner::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.dept-hero-inner { padding: 22px 26px 24px; }
.dept-hero-left { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.dept-hero-icon {
  width: 50px; height: 50px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: rgba(255,255,255,.20); color: #fff; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.30);
}
.dept-hero-icon .ic { width: 24px; height: 24px; }
.dept-hero-name { font-size: 24px; font-weight: 600; letter-spacing: -.5px; color: #fff; }
.dept-hero-title { font-size: 14px; color: rgba(255,255,255,.82); margin-top: 3px; font-weight: 500; }
.dept-hero-mission {
  font-size: 15px; line-height: 1.85;
  padding: 16px 20px; background: var(--dc-weak, var(--n-50));
  border-radius: var(--r-md); border-left: 4px solid var(--dc, var(--brand));
  color: var(--dc-text, var(--n-700)); font-weight: 500;
}
.dept-hero-vision { font-size: 13.5px; color: var(--n-500); margin-top: 12px; line-height: 1.75; font-weight: 500; }
.dept-hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--n-150);
}
.dept-hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.dept-hero-stats b { font-size: 24px; font-weight: 600; letter-spacing: -.5px; color: var(--dc, var(--brand)); line-height: 1.2; font-variant-numeric: tabular-nums; }
.dept-hero-stats span { font-size: 12.5px; font-weight: 500; color: var(--n-500); }

.dept-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--n-150); overflow-x: auto; }
.dept-tabs button {
  padding: 10px 16px; border: none; background: transparent;
  font-family: var(--font); font-size: 14px; color: var(--n-600); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all var(--dur) var(--ease); white-space: nowrap;
}
.dept-tabs button:hover { color: var(--n-900); }
.dept-tabs button.active { color: var(--brand-text); border-bottom-color: var(--brand); font-weight: 500; }
.dept-tabs button span {
  display: inline-block; margin-left: 6px;
  background: var(--n-100); color: var(--n-500);
  border-radius: var(--r-full); padding: 0 7px; font-size: 11px;
}
.dept-tabs button.active span { background: var(--brand-weak); color: var(--brand-text); }

.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pack-card {
  position: relative; overflow: hidden;
  background: var(--n-0); border: 1px solid var(--n-150);
  border-radius: var(--r-lg); padding: 18px; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.pack-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--dc, var(--brand)); }
.pack-card:hover { border-color: var(--dc, var(--brand)); box-shadow: var(--sh-lg); transform: translateY(-3px); }
.pack-top { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.pack-icon {
  width: 38px; height: 38px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--dc, var(--brand)); color: #fff; flex-shrink: 0;
  box-shadow: 0 3px 10px var(--dc-shadow, rgba(19,102,236,.24));
}
.pack-name { font-size: 15px; font-weight: 500; color: var(--n-900); }
.pack-runs { font-size: 11px; color: var(--n-300); }
.pack-summary { font-size: 13px; color: var(--n-600); line-height: 1.7; margin-bottom: 13px; }
.pack-flow {
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center;
  padding: 10px 0; margin-bottom: 12px;
  border-top: 1px solid var(--n-150); border-bottom: 1px solid var(--n-150);
}
.flow-node { padding: 2px 8px; background: var(--n-100); border-radius: var(--r-xs); font-size: 11px; color: var(--n-600); white-space: nowrap; }
.flow-arrow { color: var(--n-300); font-size: 10px; }
.pack-meta { display: flex; gap: 14px; font-size: 12px; color: var(--n-400); }

.pack-steps { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.pack-step { display: flex; gap: 12px; align-items: flex-start; }
.ps-index {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--dc-grad, var(--brand-grad)); color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 500; flex-shrink: 0;
}
.ps-body { flex: 1; min-width: 0; }
.ps-name { font-size: 13px; font-weight: 500; color: var(--n-800); margin-bottom: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ps-summary { font-size: 12.5px; color: var(--n-500); line-height: 1.65; }
.ps-output { font-size: 12px; color: var(--n-400); margin-top: 3px; }
.input-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.step-list { display: flex; flex-direction: column; gap: 10px; }
.step-item { border: 1px solid var(--n-150); border-radius: var(--r-md); overflow: hidden; transition: border-color var(--dur) var(--ease); }
.step-item:hover { border-color: var(--brand-light); }
.si-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: var(--n-50); font-size: 13px; flex-wrap: wrap; cursor: pointer; }
.si-idx { width: 20px; height: 20px; border-radius: 50%; background: var(--n-700); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 500; flex-shrink: 0; }
.si-name { font-weight: 500; color: var(--n-900); }
.si-agent { color: var(--n-500); font-size: 12px; }
.si-mode { color: var(--warn); font-size: 11px; }
.si-mode.llm { color: var(--ok); }
.si-cite { margin-left: auto; color: var(--n-300); font-size: 11px; }
.si-body { padding: 14px 16px; font-size: 13.5px; line-height: 1.8; border-top: 1px solid var(--n-150); color: var(--n-800); }
.si-body > *:first-child { margin-top: 0; }
.si-body > *:last-child { margin-bottom: 0; }
.si-body h1, .si-body h2 { font-size: 15px; font-weight: 500; color: var(--n-900); margin: 16px 0 8px; }
.si-body h3 { font-size: 14px; font-weight: 500; color: var(--n-900); margin: 14px 0 6px; }
.si-body p { margin: 8px 0; }
.si-body ul, .si-body ol { margin: 8px 0 8px 20px; }
.si-body li { margin: 3px 0; }
.si-body blockquote {
  border-left: 3px solid var(--brand); background: var(--brand-weak);
  padding: 9px 14px; margin: 10px 0; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--brand-text); font-size: 13px;
}
.si-body code { background: var(--brand-weak); color: var(--brand-text); font-size: 12px; }
.si-body hr { border: none; border-top: 1px solid var(--n-150); margin: 14px 0; }
.si-body strong { font-weight: 500; color: var(--n-900); }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(276px, 1fr)); gap: 14px; }
.skill-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--n-150); border-radius: var(--r-lg);
  padding: 16px; cursor: pointer; background: var(--n-0);
  transition: all var(--dur) var(--ease);
}
.skill-card:hover { border-color: var(--dc, var(--brand)); box-shadow: var(--sh-md); }
.sk-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 7px; }
.sk-name { font-size: 14px; font-weight: 500; color: var(--n-900); }
.sk-level { font-size: 11px; font-weight: 500; font-family: var(--font-mono); color: var(--n-500); background: var(--n-100); padding: 1px 7px; border-radius: var(--r-xs); flex-shrink: 0; }
.sk-mat { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-xs); font-size: 11.5px; margin-bottom: 9px; }
.sk-mat.ok { background: var(--ok-weak); color: var(--ok-text); }
.sk-mat.mid { background: var(--warn-weak); color: var(--warn-fg); }
.sk-mat.todo { background: var(--n-100); color: var(--n-400); }
.sk-summary { font-size: 13px; color: var(--n-600); line-height: 1.7; margin-bottom: 11px; }
.sk-io { border-top: 1px dashed var(--n-200); padding-top: 9px; }
.sk-row { font-size: 12px; color: var(--n-500); line-height: 1.65; margin-bottom: 4px; display: flex; gap: 6px; align-items: baseline; }
.sk-tag { font-size: 10px; padding: 0 5px; border-radius: var(--r-xs); flex-shrink: 0; font-weight: 500; }
.sk-tag.in { background: var(--info-weak); color: var(--info-fg); }
.sk-tag.out { background: var(--ok-weak); color: var(--ok-text); }

.radar-row { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; flex-wrap: wrap; }
.radar-row:last-child { border-bottom: none; }
.radar-name { width: 96px; font-size: 14px; font-weight: 400; color: var(--n-800); flex-shrink: 0; }
.radar-bars { display: flex; gap: 4px; }
.radar-cell { width: 28px; height: 24px; border-radius: var(--r-xs); background: var(--n-100); color: var(--n-400); display: grid; place-items: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.radar-cell.on { background: var(--dc-grad, var(--brand-grad)); color: #fff; }
.radar-num { font-size: 12px; color: var(--n-500); width: 44px; }
.radar-mat { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }

.expert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.expert-card { position: relative; overflow: hidden; background: var(--n-0); border: 1px solid var(--n-150); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-xs); }
.expert-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--dc, var(--brand)); }
.expert-top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.expert-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 600; color: #fff; background: var(--dc-grad, var(--brand)); flex-shrink: 0; box-shadow: 0 3px 10px var(--dc-shadow, rgba(19,102,236,.26)); }
.expert-id { flex: 1; min-width: 0; }
.expert-name { font-size: 15px; font-weight: 500; color: var(--n-900); }
.expert-role { font-size: 12.5px; color: var(--n-400); }
.expert-level { font-size: 12px; padding: 2px 9px; border-radius: var(--r-sm); background: var(--n-100); color: var(--n-600); flex-shrink: 0; }
.expert-duty { font-size: 13px; color: var(--n-600); line-height: 1.75; margin-bottom: 13px; padding-bottom: 13px; border-bottom: 1px solid var(--n-150); }
.expert-section { margin-bottom: 10px; }
.expert-section:last-child { margin-bottom: 0; }
.expert-label { font-size: 12px; color: var(--n-400); margin-bottom: 5px; }



/* ==================== 内容编辑 ==================== */

/* 卡片右上角浮出的操作条 */
.card-ops {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  display: flex; gap: 4px;
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.skill-card:hover .card-ops,
.pack-card:hover .card-ops,
.expert-card:hover .card-ops,
.card-ops:focus-within { opacity: 1; }
.ops-b {
  width: 26px; height: 26px; border-radius: var(--r-xs);
  border: 1px solid var(--n-200); background: var(--n-0);
  color: var(--n-500); cursor: pointer;
  display: grid; place-items: center;
  transition: all var(--dur) var(--ease);
}
.ops-b .ic { width: 13px; height: 13px; }
.ops-b:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.ops-b.danger:hover { background: var(--err); border-color: var(--err); }

/* 标签栏右侧编辑按钮 */
.tab-edit {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px; border-radius: var(--r-xs);
  border: 1px solid var(--brand); background: var(--n-0);
  color: var(--brand); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.tab-edit:hover { background: var(--brand); color: #fff; }
.tab-edit .ic { width: 14px; height: 14px; }

/* 表单栅格 */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px;
}
.form-grid .field { display: flex; flex-direction: column; gap: 5px; }
.form-grid .field.full { grid-column: 1 / -1; }
.form-grid .field > span {
  font-size: 13px; font-weight: 600; color: var(--n-700);
  display: flex; align-items: center; gap: 4px;
}
.form-grid .field em { color: var(--err); font-style: normal; }
.form-grid .field small { font-size: 11.5px; color: var(--n-400); font-weight: 500; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%; font-size: 14px; font-family: inherit; font-weight: 500;
  padding: 8px 11px; border: 1px solid var(--n-200); border-radius: var(--r-xs);
  background: var(--n-0); color: var(--n-900); line-height: 1.6;
}
.form-grid textarea { resize: vertical; min-height: 56px; }
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-weak-2);
}

/* 多选技能 */
.chk-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 5px; max-height: 168px; overflow-y: auto;
  padding: 9px; border: 1px solid var(--n-200); border-radius: var(--r-xs);
  background: var(--n-25, #fbfcfd);
}
.chk { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.chk input { width: auto; margin: 0; accent-color: var(--brand); }
.chk:hover span { color: var(--brand); }

/* 技能包流程编辑器 */
.pk-flow {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px; border: 1px solid var(--n-200); border-radius: var(--r-xs);
  background: var(--n-25, #fbfcfd); min-height: 46px; margin-bottom: 8px;
}
.pk-flow-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--r-xs);
  background: var(--n-0); border: 1px solid var(--n-150);
  cursor: grab; font-size: 13px;
}
.pk-flow-item:active { cursor: grabbing; }
.pk-grip { color: var(--n-300); display: flex; }
.pk-grip .ic { width: 13px; height: 13px; }
.pk-flow-name { font-weight: 600; color: var(--n-800); }
.pk-flow-cat { font-size: 11.5px; color: var(--n-400); }
.pk-x {
  margin-left: auto; border: none; background: transparent;
  color: var(--n-400); cursor: pointer; display: flex; padding: 2px;
}
.pk-x:hover { color: var(--err); }
.pk-x .ic { width: 13px; height: 13px; }
.pk-picker { display: flex; flex-wrap: wrap; gap: 5px; max-height: 108px; overflow-y: auto; }

@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ==================== 模型管理 ==================== */
.prov-card {
  background: var(--n-0);
  border: 1px solid var(--n-150);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--sh-xs);
  transition: all var(--dur) var(--ease);
}
.prov-card:hover { box-shadow: var(--sh-md); }
.prov-card.online { border-color: #b7e5c8; }
.prov-card.online::before {
  content: ''; display: block; height: 3px;
  background: linear-gradient(90deg, #24c264, #00b42a);
}
.prov-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 16px 18px 12px;
}
.prov-id { min-width: 0; flex: 1; }
.prov-name {
  font-size: 15.5px; font-weight: 600; color: var(--n-900);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px;
}
.prov-url code {
  font-size: 12.5px; background: var(--n-100); color: var(--n-600);
  padding: 2px 8px; border-radius: var(--r-xs);
}
.prov-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.prov-note {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 0 18px 12px; font-size: 12.5px; color: var(--n-500); line-height: 1.6;
}
.prov-note .ic { color: var(--n-300); margin-top: 2px; }
.model-list { border-top: 1px solid var(--n-150); }
.model-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid #f3f5f8;
  transition: background var(--dur) var(--ease);
}
.model-row:last-child { border-bottom: none; }
.model-row:hover { background: var(--n-50); }
.model-row.on { background: linear-gradient(90deg, #f0f7ff 0%, #fbfdff 100%); }
.model-row.on:hover { background: linear-gradient(90deg, #e8f2fe 0%, #f7fbff 100%); }
.model-id { flex: 1; min-width: 200px; }
.model-label {
  font-size: 14px; font-weight: 600; color: var(--n-800);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.model-mid code { font-size: 12px; color: var(--text-3); background: transparent; padding: 0; }
.model-spec { display: flex; gap: 5px; flex-wrap: wrap; }
.model-ops { display: flex; gap: 5px; flex-wrap: wrap; }
.model-ops .btn-xs { min-width: 46px; }

@media (max-width: 900px) {
  .model-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .model-spec { order: 3; }
}

/* ==================== 场景工作台 ==================== */
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 14px; margin-bottom: 18px; }
.scenario-card { background: var(--n-0); border: 1px solid var(--n-150); border-radius: var(--r-lg); padding: 18px; cursor: pointer; transition: all var(--dur) var(--ease); }
.scenario-card:hover { border-color: var(--brand-light); box-shadow: var(--sh-md); transform: translateY(-2px); }
.scenario-card.active { border-color: var(--brand); background: var(--brand-weak); }
.sc-icon { margin-bottom: 10px; color: var(--brand); }
.scenario-card.active .sc-icon { color: var(--brand-text); }
.sc-name { font-size: 15px; font-weight: 500; color: var(--n-900); margin-bottom: 5px; }
.sc-desc { font-size: 13px; color: var(--n-600); line-height: 1.7; }

/* ==================== 快速开始（渐变浅色系） ==================== */
/* 与场景工作台区分：四张卡各用一套淡雅渐变，视觉更轻 */
.qs-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(224px, 1fr));
  gap: 14px;
}
.qs-card {
  position: relative; overflow: hidden; cursor: pointer;
  padding: 18px 18px 20px;
  border-radius: var(--r-lg);
  border: 1px solid transparent;
  transition: all var(--dur) var(--ease);
}
.qs-card::before {
  content: ''; position: absolute; right: -26px; top: -26px;
  width: 108px; height: 108px; border-radius: 50%;
  background: var(--qs-glow, rgba(255,255,255,.55));
}
.qs-card > * { position: relative; z-index: 1; }

/* 四套配色：蓝 / 青 / 紫 / 橙，均为浅色渐变 */
.qs-card:nth-child(1) {
  background: linear-gradient(152deg, #e8f1ff 0%, #f4f8ff 55%, #eef4ff 100%);
  border-color: #d3e4fb; --qs-glow: rgba(19,102,236,.13);
}
.qs-card:nth-child(2) {
  background: linear-gradient(152deg, #e2f6f7 0%, #f0fbfc 55%, #e9f8f9 100%);
  border-color: #c9ecee; --qs-glow: rgba(8,145,178,.12);
}
.qs-card:nth-child(3) {
  background: linear-gradient(152deg, #f0eafd 0%, #f8f5ff 55%, #f2ecfd 100%);
  border-color: #e0d5f8; --qs-glow: rgba(124,58,237,.11);
}
.qs-card:nth-child(4) {
  background: linear-gradient(152deg, #fdeedd 0%, #fff7ef 55%, #fdf2e6 100%);
  border-color: #f6ddc2; --qs-glow: rgba(234,88,12,.12);
}
.qs-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.qs-card:nth-child(1):hover { border-color: #a9cdfa; }
.qs-card:nth-child(2):hover { border-color: #9edde2; }
.qs-card:nth-child(3):hover { border-color: #c9b3f0; }
.qs-card:nth-child(4):hover { border-color: #f5c396; }

.qs-ico {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 2px 7px rgba(30,60,120,.09);
  margin-bottom: 12px;
}
.qs-ico .ic { width: 19px; height: 19px; }
.qs-card:nth-child(1) .qs-ico { color: #1366ec; }
.qs-card:nth-child(2) .qs-ico { color: #0e8fa8; }
.qs-card:nth-child(3) .qs-ico { color: #7c3aed; }
.qs-card:nth-child(4) .qs-ico { color: #ea580c; }

.qs-name { font-size: 15.5px; font-weight: 600; color: var(--n-900); margin-bottom: 6px; letter-spacing: -.2px; }
.qs-desc { font-size: 13px; font-weight: 500; color: var(--n-600); line-height: 1.75; }

.workbench { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .workbench { grid-template-columns: 1fr; } }
.wb-panel { background: var(--n-0); border: 1px solid var(--n-150); border-radius: var(--r-lg); box-shadow: var(--sh-xs); display: flex; flex-direction: column; overflow: hidden; }
.wb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--n-150); font-size: 14px; font-weight: 500; color: var(--n-900); flex-shrink: 0; }
.wb-head span:first-child { display: flex; align-items: center; gap: 8px; }
.wb-body { padding: 18px; flex: 1; min-height: 0; }
.wb-body textarea { width: 100%; min-height: 300px; }
.wb-output { min-height: 300px; max-height: 520px; overflow-y: auto; background: var(--n-50); border: 1px solid var(--n-150); border-radius: var(--r-md); padding: 16px; font-size: 13.5px; line-height: 1.8; color: var(--n-800); }
.wb-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 13px 18px; border-top: 1px solid var(--n-150); background: var(--n-50); flex-shrink: 0; }

/* ==================== 知识库 ==================== */
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 14px; }
.kb-card { position: relative; overflow: hidden; background: var(--n-0); border: 1px solid var(--n-150); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-xs); transition: all var(--dur) var(--ease); }
.kb-card:hover { border-color: var(--brand-light); box-shadow: var(--sh-md); }
.kb-scope { position: absolute; right: 14px; top: 16px; font-size: 11px; color: var(--n-500); background: var(--n-100); border-radius: var(--r-xs); padding: 2px 7px; }
.kb-name { font-size: 15px; font-weight: 500; color: var(--n-900); margin-bottom: 6px; padding-right: 54px; }
.kb-desc { font-size: 13px; color: var(--n-600); line-height: 1.65; min-height: 40px; margin-bottom: 12px; }
.kb-meta { display: flex; gap: 14px; font-size: 12px; color: var(--n-400); padding: 11px 0; border-top: 1px solid var(--n-150); margin-bottom: 12px; }
.kb-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-view {
  white-space: pre-wrap; word-break: break-word;
  background: var(--n-50); border: 1px solid var(--n-150);
  border-radius: var(--r-md); padding: 16px;
  font-size: 13.5px; line-height: 1.85; color: var(--n-800);
  max-height: 460px; overflow-y: auto;
}
.tree { background: var(--n-0); border: 1px solid var(--n-150); border-radius: var(--r-lg); overflow: hidden; }
.tree-item { padding: 9px 14px; cursor: pointer; font-size: 13.5px; border-bottom: 1px solid #f5f5f5; display: flex; align-items: center; justify-content: space-between; gap: 8px; transition: background var(--dur) var(--ease); }
.tree-item:last-child { border-bottom: none; }
.tree-item:hover { background: var(--n-50); }
.tree-item.active { background: var(--brand-weak); color: var(--brand-text); font-weight: 500; }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.perm-card { background: var(--n-0); border: 1px solid var(--n-150); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--sh-xs); }
.perm-name { font-size: 14px; font-weight: 500; color: var(--n-900); margin-bottom: 5px; }
.perm-scope { font-size: 13px; color: var(--n-600); line-height: 1.65; }
.perm-list { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--n-150); font-size: 12.5px; color: var(--n-500); line-height: 1.8; }

/* ==================== 模态 ==================== */
.modal { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .16s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  width: 100%; max-width: 600px; max-height: 86vh;
  background: var(--n-0); border-radius: var(--r-xl);
  box-shadow: var(--sh-xl); display: flex; flex-direction: column; overflow: hidden;
  animation: rise .2s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal-box.wide { max-width: 880px; }
.modal-box.slim { max-width: 420px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--n-150); flex-shrink: 0; }
.modal-head h3 { font-size: 16px; font-weight: 500; color: var(--n-900); }
.modal-close { width: 28px; height: 28px; border: none; background: transparent; border-radius: var(--r-sm); cursor: pointer; color: var(--n-400); display: grid; place-items: center; transition: all var(--dur) var(--ease); }
.modal-close:hover { background: var(--n-100); color: var(--n-900); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--n-150); background: var(--n-50); flex-shrink: 0; }

/* ==================== Toast ==================== */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 12px 16px; background: var(--n-900); color: #fff;
  border-radius: var(--r-md); font-size: 14px; line-height: 1.55;
  box-shadow: var(--sh-lg); animation: slide .2s var(--ease); max-width: 400px;
}
.toast svg { color: var(--n-400); flex-shrink: 0; margin-top: 2px; }
.toast.success { background: var(--ok-text); }
.toast.success svg { color: #b3e6c0; }
.toast.error { background: var(--err-fg); }
.toast.error svg { color: #fbc4bd; }
.toast.warn { background: var(--warn-fg); }
.toast.warn svg { color: #ffd9a6; }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ==================== 其他 ==================== */
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding: 12px 0; }
.chart-bar { flex: 1; border-radius: var(--r-xs) var(--r-xs) 0 0; background: var(--brand-weak-2); min-height: 3px; position: relative; transition: background .2s var(--ease); }
.chart-bar:hover { background: var(--brand); }
.chart-bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--n-500); }
.chart-labels { display: flex; gap: 10px; margin-top: 6px; }
.chart-labels div { flex: 1; text-align: center; font-size: 11px; color: var(--n-400); }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .65s linear infinite; vertical-align: -2px; }
.spin.dark { color: var(--brand); }
.spin.on-brand { color: #fff; border-color: #fff; border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.progress { height: 6px; background: var(--n-100); border-radius: var(--r-full); overflow: hidden; margin-top: 8px; }
.progress-bar { height: 100%; background: var(--dc-grad, var(--brand-grad)); border-radius: var(--r-full); transition: width .35s var(--ease); }

@media (max-width: 1200px) { .view { padding: 20px; } .topbar { padding: 0 20px; } }
@media (max-width: 880px) {
  :root { --sidebar-w: 60px; }
  .side-name, .nav-label, .nav-group-title, .llm-badge span { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .side-brand { justify-content: center; padding: 0; }
  .llm-badge { justify-content: center; padding: 8px; }
  .chat-side { display: none; }
  .user-meta { display: none; }
}
