/* =========================================================
   小罡智能AI平台 · 企业级主题（亮/暗）v2
   军工行业业务智能赋能平台
   ========================================================= */
:root {
  --accent: #2563eb;
  --accent-2: #4f46e5;
  --accent-3: #06b6d4;
  --accent-soft: #eff6ff;
  --accent-soft-2: #eef2ff;
  --bg: #f4f6fb;
  --bg-deep: #e8ecf6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #1e293b;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 120%);
  --grad-soft: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.07);
  --shadow-lg: 0 24px 56px rgba(16,24,40,.18);
  --ring: 0 0 0 3px rgba(37,99,235,.18);
  --header-h: 64px;
  --sidebar-w: 236px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
html[data-theme="dark"] {
  --accent: #3b82f6;
  --accent-2: #6366f1;
  --accent-3: #22d3ee;
  --accent-soft: #172554;
  --accent-soft-2: #1e1b4b;
  --bg: #0b1220;
  --bg-deep: #070d1a;
  --surface: #111a2c;
  --surface-2: #16213a;
  --surface-3: #1b2845;
  --border: #263450;
  --border-strong: #334566;
  --text: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 60%, var(--accent-3) 130%);
  --shadow-xs: 0 1px 2px rgba(0,0,0,.35);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 56px rgba(0,0,0,.55);
  --ring: 0 0 0 3px rgba(59,130,246,.25);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-color: var(--border-strong) transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(37,99,235,.22); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }
.hidden { display: none !important; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

/* ---------- 装饰背景 ---------- */
.bg-aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(900px 480px at 12% -6%, var(--accent-soft) 0%, transparent 60%),
    radial-gradient(760px 420px at 96% 8%, var(--accent-soft-2) 0%, transparent 55%),
    radial-gradient(640px 520px at 50% 112%, var(--accent-soft) 0%, transparent 55%);
  opacity: .85;
  transition: background .3s;
}
html[data-theme="dark"] .bg-aurora { opacity: .5; }
.bg-aurora::before, .bg-aurora::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.bg-aurora::before { width: 460px; height: 460px; left: -140px; top: -120px; background: var(--accent); opacity: .14; }
.bg-aurora::after { width: 520px; height: 520px; right: -180px; bottom: -160px; background: var(--accent-3); opacity: .12; }
html[data-theme="dark"] .bg-aurora::before, html[data-theme="dark"] .bg-aurora::after { opacity: .2; }

/* ---------- 水印 ---------- */
.watermark-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; opacity: .045;
}
.watermark-layer span {
  position: absolute; transform: rotate(-24deg); white-space: nowrap;
  font-size: 16px; color: #334155; font-weight: 500; user-select: none;
  text-shadow: 0 0 2px rgba(255,255,255,.5);
}

/* ---------- 认证 ---------- */
.auth-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(165deg, var(--accent) 0%, var(--accent-2) 42%, #0f172a 115%);
  padding: 24px; position: relative; overflow: hidden;
}
.auth-view::before {
  content: ""; position: absolute; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16) 0%, transparent 62%);
  top: -220px; right: -160px; filter: blur(8px);
}
.auth-view::after {
  content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,.22) 0%, transparent 60%);
  bottom: -200px; left: -140px; filter: blur(10px);
}
.auth-card {
  position: relative; width: 416px; max-width: 100%; background: var(--surface);
  border-radius: 22px; box-shadow: 0 30px 80px rgba(2,8,28,.45), inset 0 1px 0 rgba(255,255,255,.65);
  padding: 38px 34px 30px; border: 1px solid rgba(255,255,255,.18);
  animation: pop .35s cubic-bezier(.2,.9,.3,1.2);
}
.auth-logo {
  font-size: 26px; font-weight: 800; text-align: center; letter-spacing: .5px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-subtitle {
  text-align: center; color: var(--text-2); font-size: 12px; margin: 8px 0 26px; letter-spacing: .3px;
  position: relative;
}
.auth-subtitle::after {
  content: ""; display: block; width: 44px; height: 3px; border-radius: 3px; margin: 14px auto 0;
  background: var(--grad); opacity: .85;
}
.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 24px; background: var(--surface-2);
  border-radius: 12px; padding: 4px; border: 1px solid var(--border);
}
.auth-tab {
  flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; cursor: pointer;
  color: var(--text-2); font-size: 14px; transition: all .18s; font-weight: 500;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active {
  background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow-xs);
  background-image: var(--grad); color: #fff; -webkit-background-clip: initial;
}
.auth-tab.active:hover { color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 15px; animation: fadeUp .3s ease; }

/* ---------- 表单字段 ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field span { font-size: 12px; color: var(--text-2); font-weight: 600; letter-spacing: .2px; }
.field input, .field select, .field textarea, .field-input {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:hover, .field select:hover, .field textarea:hover, .field-input:hover { border-color: var(--border-strong); }
.field input:focus, .field select:focus, .field textarea:focus, .field-input:focus {
  border-color: var(--accent); box-shadow: var(--ring); background: var(--surface);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field select { cursor: pointer; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row input { flex: 1; }
.captcha-img {
  height: 42px; width: 122px; border-radius: 8px; border: 1px solid var(--border);
  cursor: pointer; background: #f3f4f6; transition: transform .15s, box-shadow .15s;
}
.captcha-img:hover { transform: translateY(-1px); box-shadow: var(--shadow-xs); }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 16px; font-size: 14px; cursor: pointer;
  transition: all .16s; display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  font-weight: 500; box-shadow: var(--shadow-xs);
}
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background-image: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px -6px rgba(37,99,235,.55);
}
.btn.primary:hover { color: #fff; opacity: .94; box-shadow: 0 10px 24px -6px rgba(37,99,235,.65); }
.btn.primary:active { opacity: .88; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: rgba(220,38,38,.06); color: var(--danger); }
.btn.small { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn.wide { width: 100%; padding: 13px; font-weight: 700; font-size: 15px; letter-spacing: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.starter {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; font-size: 13px; color: var(--text); font-weight: 500; text-align: left;
  justify-content: flex-start; position: relative; overflow: hidden; box-shadow: var(--shadow-xs);
}
.btn.starter::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad);
  opacity: 0; transition: opacity .18s;
}
.btn.starter:hover { border-color: var(--accent); color: var(--text); box-shadow: var(--shadow); transform: translateY(-2px); }
.btn.starter:hover::before { opacity: 1; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ---------- 主布局 ---------- */
.app-view { display: flex; flex-direction: column; height: 100vh; }
.app-header {
  height: var(--header-h); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 18px; gap: 16px; z-index: 20; flex-shrink: 0;
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 1px 0 rgba(16,24,40,.03);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 210px; cursor: default; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 15px; letter-spacing: 1px;
  background-image: var(--grad); box-shadow: 0 8px 20px -6px rgba(37,99,235,.6), inset 0 1px 0 rgba(255,255,255,.35);
  flex-shrink: 0;
}
.brand-text { line-height: 1.3; }
.brand-title { font-weight: 800; font-size: 15.5px; letter-spacing: .3px; }
.brand-sub { font-size: 11px; color: var(--text-3); }
.header-center { flex: 1; display: flex; gap: 8px; max-width: 620px; margin: 0 auto; }
.global-command {
  flex: 1; border: 1px solid var(--border); border-radius: 24px; padding: 10px 20px;
  background: var(--surface-2); color: var(--text); outline: none; font-size: 13px;
  transition: all .18s; box-shadow: inset 0 1px 2px rgba(16,24,40,.04);
}
.global-command::placeholder { color: var(--text-3); }
.global-command:hover { border-color: var(--border-strong); }
.global-command:focus {
  border-color: var(--accent); background: var(--surface); box-shadow: var(--ring);
}
.header-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  position: relative; border: 0; background: transparent; font-size: 18px; cursor: pointer;
  padding: 9px; border-radius: 10px; color: var(--text-2); transition: all .15s;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); transform: translateY(-1px); }
.badge {
  position: absolute; top: 3px; right: 3px; background: var(--danger); color: #fff;
  border-radius: 10px; font-size: 10px; min-width: 16px; height: 16px; line-height: 16px;
  text-align: center; padding: 0 4px; box-shadow: 0 2px 6px rgba(220,38,38,.5); animation: pop .25s ease;
}
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 6px; border-radius: 24px;
  background: var(--surface-2); cursor: pointer; border: 1px solid var(--border); transition: all .15s;
}
.user-chip:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700;
  background-image: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.user-chip .uname { font-size: 13px; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .urole { font-size: 11px; color: var(--text-3); }

.app-body { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border);
  padding: 14px 12px; overflow-y: auto; flex-shrink: 0; display: flex; flex-direction: column; gap: 3px;
}
.menu-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  border: 0; background: transparent; color: var(--text-2); font-size: 14px; cursor: pointer; width: 100%;
  text-align: left; transition: all .15s; position: relative; font-weight: 500;
}
.menu-item:hover { background: var(--surface-2); color: var(--text); }
.menu-item.active {
  background-image: var(--grad-soft); color: var(--accent); font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.12);
}
html[data-theme="dark"] .menu-item.active { box-shadow: inset 0 0 0 1px rgba(59,130,246,.3); }
.menu-item.active::before {
  content: ""; position: absolute; left: -12px; top: 20%; bottom: 20%; width: 4px; border-radius: 0 4px 4px 0;
  background: var(--grad);
}
.menu-item .micon {
  width: 24px; height: 24px; text-align: center; line-height: 24px; font-size: 15px;
  background: var(--surface-2); border-radius: 7px; flex-shrink: 0; transition: all .15s;
}
.menu-item.active .micon { background: #fff; box-shadow: 0 2px 6px rgba(37,99,235,.25); }
html[data-theme="dark"] .menu-item.active .micon { background: var(--accent-soft); }
.menu-item .tag-dev {
  margin-left: auto; font-size: 10px; color: var(--warning); border: 1px solid var(--warning);
  border-radius: 6px; padding: 1px 6px; flex-shrink: 0; letter-spacing: .5px;
}
.menu-more { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; }
.menu-more-list { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; animation: fadeUp .25s ease; }

.main { flex: 1; overflow-y: auto; padding: 24px 30px; min-width: 0; }
.page { max-width: 1240px; margin: 0 auto; animation: fadeUp .3s ease; }
.page-title {
  font-size: 21px; font-weight: 800; margin-bottom: 4px; letter-spacing: .3px;
  display: flex; align-items: center; gap: 10px;
}
.page-title::before { content: ""; width: 4px; height: 22px; border-radius: 4px; background: var(--grad); }
.page-sub { color: var(--text-2); font-size: 13px; margin-bottom: 20px; padding-left: 14px; }

/* ---------- 卡片与网格 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); padding: 18px; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .main { padding: 16px; } .sidebar { display: none; } .app-header { padding: 0 12px; } .brand { min-width: 0; } .brand-sub { display: none; }
}

/* ---------- 安全横幅 ---------- */
.security-banner {
  background: linear-gradient(90deg, #fef3c7, #fef9e7); border: 1px solid #fde68a; color: #92400e;
  border-radius: var(--radius); padding: 12px 18px; font-size: 13px; font-weight: 600; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-xs); letter-spacing: .2px;
}
html[data-theme="dark"] .security-banner { background: linear-gradient(90deg, #451a03, #3a1a05); border-color: #78350f; color: #fbbf24; }

/* ---------- 首页 Block ---------- */
.block { margin-bottom: 22px; }
.block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.block-head .title {
  font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px;
}
.block-head .title::before { content: ""; width: 3px; height: 15px; border-radius: 3px; background: var(--grad); }
.block-head .sub { font-size: 12px; color: var(--text-3); margin-left: 2px; }

/* ---------- 指标卡片 ---------- */
.metric-card {
  text-align: left; position: relative; overflow: hidden;
}
.metric-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%;
  background: var(--grad); opacity: .08;
}
.metric-card .num {
  font-size: 30px; font-weight: 800; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1.2; letter-spacing: .5px;
}
.metric-card .label { font-size: 12px; color: var(--text-2); margin-top: 3px; font-weight: 500; }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border-bottom: 1px solid var(--border); border-radius: 10px; transition: background .15s;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.list-row .main { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; }
.list-row .d { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 徽标 ---------- */
.pill {
  display: inline-flex; align-items: center; font-size: 11px; padding: 3px 10px; border-radius: 20px;
  font-weight: 600; letter-spacing: .2px; white-space: nowrap;
}
.pill.ok { background: #dcfce7; color: #166534; box-shadow: inset 0 0 0 1px rgba(22,101,52,.12); }
.pill.warn { background: #fef3c7; color: #92400e; box-shadow: inset 0 0 0 1px rgba(146,64,14,.12); }
.pill.err { background: #fee2e2; color: #991b1b; box-shadow: inset 0 0 0 1px rgba(153,27,27,.12); }
.pill.info { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(37,99,235,.14); }
.pill.dev { background: #f3e8ff; color: #7e22ce; box-shadow: inset 0 0 0 1px rgba(126,34,206,.12); }
html[data-theme="dark"] .pill.ok { background: #14532d; color: #86efac; }
html[data-theme="dark"] .pill.warn { background: #78350f; color: #fde68a; }
html[data-theme="dark"] .pill.err { background: #7f1d1d; color: #fecaca; }
html[data-theme="dark"] .pill.info { background: var(--accent-soft); color: #93c5fd; }
html[data-theme="dark"] .pill.dev { background: #4c1d95; color: #e9d5ff; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 12px 14px; background: var(--surface-2); color: var(--text-2);
  font-weight: 700; border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 12px;
  letter-spacing: .3px; text-transform: uppercase;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr { transition: background .12s; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* ---------- 聊天 ---------- */
.chat-page {
  display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 56px); max-width: 1000px;
  margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.chat-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap; background: var(--surface-2);
}
.chat-select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; outline: none;
  transition: all .15s; font-weight: 500;
}
.chat-select:hover { border-color: var(--border-strong); }
.chat-select:focus { border-color: var(--accent); box-shadow: var(--ring); }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px 18px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 10px; max-width: 86%; animation: fadeUp .25s ease; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble {
  padding: 12px 16px; border-radius: 16px; background: var(--surface-2);
  border: 1px solid var(--border); box-shadow: var(--shadow-xs); line-height: 1.7;
  font-size: 13.5px; word-break: break-word;
}
.msg.user .bubble {
  background-image: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px -8px rgba(37,99,235,.55);
  border-bottom-right-radius: 4px;
}
.msg:not(.user) .bubble { border-bottom-left-radius: 4px; }
.msg .meta { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.chat-input-row {
  display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border);
  align-items: flex-end; background: var(--surface);
}
.chat-input-row textarea {
  flex: 1; resize: none; min-height: 52px; max-height: 140px; border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px; font-size: 14px; background: var(--surface-2); color: var(--text);
  outline: none; transition: all .15s; font-family: inherit; line-height: 1.6;
}
.chat-input-row textarea:focus { border-color: var(--accent); box-shadow: var(--ring); background: var(--surface); }
.chat-input-row textarea::placeholder { color: var(--text-3); }

/* ---------- 模态框 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(9,14,30,.55); display: flex; align-items: center;
  justify-content: center; z-index: 100; padding: 20px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .2s ease;
}
.modal {
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  width: 640px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column;
  border: 1px solid var(--border); animation: modalIn .28s cubic-bezier(.2,.9,.3,1.15);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 22px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.modal-title { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.modal-title::before { content: ""; width: 3px; height: 15px; border-radius: 3px; background: var(--grad); }
.modal-body { padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end;
  gap: 10px; background: var(--surface-2);
}
.modal-close { border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--text-2); transition: all .15s; border-radius: 8px; width: 30px; height: 30px; }
.modal-close:hover { background: var(--surface-3); color: var(--text); }

/* ---------- 开发中占位 ---------- */
.dev-placeholder {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 42px 20px;
  text-align: center; color: var(--text-3); background: var(--surface-2); font-size: 13px;
}
.dev-placeholder .icon { font-size: 42px; margin-bottom: 12px; opacity: .8; }

/* ---------- 工作流画布简化 ---------- */
.wf-node {
  border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px; background: var(--surface);
  margin-bottom: 10px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-xs);
  transition: all .15s;
}
.wf-node:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.wf-node .kind {
  font-size: 22px; width: 40px; height: 40px; border-radius: 10px; background: var(--grad-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wf-node .info { flex: 1; }

/* ---------- 工具提示 / 通用 ---------- */
.empty { text-align: center; color: var(--text-3); padding: 34px 10px; font-size: 13px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.spin {
  display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 智能体卡片（首页/中心） ---------- */
.agent-card { cursor: pointer; position: relative; overflow: hidden; }
.agent-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--grad);
  opacity: 0; transition: opacity .2s;
}
.agent-card:hover { transform: translateY(-3px); }
.agent-card:hover::before { opacity: 1; }
.agent-card-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.agent-card-head .agent-ico {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad-soft);
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
}
.agent-card-desc { font-size: 12.5px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }
