/* AI 员工智能体平台 · 后台样式（UI 极致打磨版）
   三主题靠 body[data-theme] 切 CSS 变量：白蓝(默认)/白绿/暗色。
   白绿口径：底色纯白中和、不带绿调，绿色只作主色并加深一档。
   设计体系：品牌字标块为唯一身份点；圆角阶梯 10/14/18；阴影三级（带偏移+柔和模糊）；
   数字 tabular-nums 等宽对齐；浏览器自带表面（占位符/文件钮/滚动条/选区/焦点环）全部纳入主题。
   移动端标准（定版）：顶栏一行（汉堡＋品牌＋退出）、左侧滑出抽屉菜单（图标+遮罩）、
   表格变卡片式排布（td 带 data-th 显示字段名）、点击区 ≥44px、无横向滚动。 */
:root, body[data-theme="white-blue"] {
  --bg: #f5f7fa; --surface: #ffffff; --surface-2: #f8fafc; --line: #e3e8ef;
  --text: #24292f; --text-sub: #5b6470;
  --brand: #2563eb; --brand-strong: #1d4ed8; --brand-soft: #eaf1fe;
  --danger: #d92d20; --ok: #07865b;
  --ok-soft: #e7f6f0; --danger-soft: #fef3f2; --danger-line: #fecdca;
  --side-bg: #ffffff; --side-text: #24292f;
  --scrim: rgba(13, 20, 34, .46);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 26px -10px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06);
  --shadow-lg: 0 28px 56px -16px rgba(16, 24, 40, .22), 0 4px 12px rgba(16, 24, 40, .06);
}
body[data-theme="white-green"] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f8f9fa; --line: #e6e8eb;
  --text: #24292f; --text-sub: #5b6470;
  --brand: #07865b; --brand-strong: #056344; --brand-soft: #e7f6f0;
  --danger: #d92d20; --ok: #07865b;
  --ok-soft: #e7f6f0; --danger-soft: #fef3f2; --danger-line: #fecdca;
  --side-bg: #ffffff; --side-text: #24292f;
  --scrim: rgba(10, 26, 20, .46);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 26px -10px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06);
  --shadow-lg: 0 28px 56px -16px rgba(16, 24, 40, .22), 0 4px 12px rgba(16, 24, 40, .06);
}
body[data-theme="dark"] {
  --bg: #101418; --surface: #171c22; --surface-2: #1c232b; --line: #2e3640;
  --text: #e6eaee; --text-sub: #9aa6b1;
  --brand: #4f83f8; --brand-strong: #6b99ff; --brand-soft: #1d2735;
  --danger: #ff6b5e; --ok: #3ecf8e;
  --ok-soft: #14332a; --danger-soft: #3a2321; --danger-line: #5c3531;
  --side-bg: #141a20; --side-text: #e6eaee;
  --scrim: rgba(0, 0, 0, .55);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-md: 0 10px 26px -10px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-lg: 0 28px 56px -16px rgba(0, 0, 0, .6), 0 4px 12px rgba(0, 0, 0, .4);
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { margin: 0; font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; }
::selection { background: var(--brand-soft); color: var(--brand-strong); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-sub); }
::-webkit-scrollbar-track { background: transparent; }

/* 品牌字标块：品牌名首字 + 品牌渐变（全站唯一身份点，登录/入口/侧边栏/顶栏共用） */
.brand-mark { width: 46px; height: 46px; border-radius: 13px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff; font-size: 21px; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px -6px var(--brand); }

/* 登录页 */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px; }
.login-card { width: 100%; max-width: 384px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 34px 30px 30px; box-shadow: var(--shadow-lg); }
.login-card .brand-mark { display: flex; margin: 0 auto 14px; }
.login-brand { font-size: 20px; font-weight: 700; color: var(--text); text-align: center; letter-spacing: .01em; }
.login-title { font-size: 15.5px; font-weight: 500; color: var(--text-sub); text-align: center; margin: 5px 0 2px; }
.login-sub { text-align: center; color: var(--text-sub); margin: 4px 0 16px; font-size: 13px; }
.login-card .field input { border-radius: 12px; padding: 12px 14px; }
.login-card .btn-primary { min-height: 50px; font-size: 16px; border-radius: 12px; margin-top: 4px; }
.login-links { text-align: center; margin-top: 18px; font-size: 13px; }
.login-links a { display: inline-block; padding: 10px 8px; color: var(--text-sub); }
.login-links a:hover { color: var(--brand); }

/* 后台壳（桌面：常驻左侧栏） */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar { width: 220px; flex: 0 0 220px; background: var(--side-bg); border-right: 1px solid var(--line);
  color: var(--side-text); padding: 20px 14px; display: flex; flex-direction: column; }
.side-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.side-brand { display: flex; align-items: center; gap: 10px; font-size: 16.5px; font-weight: 700;
  color: var(--side-text); padding: 0 8px 16px; word-break: break-all; }
.side-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 16px;
  box-shadow: 0 5px 12px -4px var(--brand); }
.drawer-close { display: none; border: 0; background: var(--brand-soft); color: var(--brand-strong);
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; padding: 9px; flex: 0 0 40px;
  transition: filter .15s ease; }
.drawer-close:hover { filter: brightness(1.05); }
.drawer-close svg { width: 100%; height: 100%; display: block; }
.side-nav { display: flex; flex-direction: column; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px;
  color: var(--side-text); margin-bottom: 4px; font-size: 14.5px; min-height: 46px;
  transition: background .16s ease, color .16s ease; }
.side-nav a .nav-ico { width: 21px; height: 21px; flex: 0 0 21px; }
.side-nav a.active { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff;
  font-weight: 600; box-shadow: 0 6px 14px -6px var(--brand); }
.side-nav a:not(.active):hover { background: var(--brand-soft); color: var(--brand-strong); }
.side-foot { margin-top: auto; padding: 12px 10px 2px; color: var(--text-sub); font-size: 12.5px; border-top: 1px solid var(--line); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 58px;
  background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 22px;
  position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow-sm); }
.burger { display: none; border: 0; background: var(--brand-soft); color: var(--brand-strong);
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer; padding: 10px; flex: 0 0 44px;
  transition: filter .15s ease; }
.burger:hover { filter: brightness(1.05); }
.burger svg { width: 100%; height: 100%; display: block; }
.top-brand { display: none; align-items: center; gap: 9px; font-size: 16.5px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-brand .brand-mark { width: 29px; height: 29px; border-radius: 8px; font-size: 14px; box-shadow: none; }
.top-title { font-size: 16.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.top-actor { color: var(--text-sub); font-size: 13.5px; white-space: nowrap; }
.top-logout { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 13px;
  border-radius: 9px; background: var(--brand-soft); color: var(--brand-strong); font-size: 14px;
  transition: filter .15s ease; }
.top-logout:hover { color: var(--brand-strong); filter: brightness(1.04); }
.top-logout svg { width: 18px; height: 18px; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 55; animation: scrim-in .25s ease both; }
@keyframes scrim-in { from { opacity: 0; } }
.content { padding: 26px 24px 44px; max-width: 1180px; width: 100%; margin: 0 auto; }

/* 组件 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  box-shadow: var(--shadow-sm); }
.card .num { font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -.01em; line-height: 1.25; word-break: break-all; }
.card .cap { color: var(--text-sub); font-size: 13.5px; margin-top: 3px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px;
  margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 16.5px; font-weight: 650; margin: 0 0 16px; letter-spacing: .01em; }
table.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.list th, table.list td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
table.list th { color: var(--text-sub); font-weight: 600; font-size: 12.5px; background: var(--surface-2); white-space: nowrap; }
table.list tbody tr { transition: background .13s ease; }
table.list tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 32%, transparent); }
table.list .btn { min-height: 36px; padding: 6px 13px; font-size: 13.5px; border-radius: 8px; white-space: nowrap; }
.field { display: block; margin-bottom: 15px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-sub); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 11px; font-size: 16px; min-height: 48px; background: var(--surface); color: var(--text);
  caret-color: var(--brand); transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { line-height: 1.6; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a94a0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--text-sub) 78%, transparent); }
.field input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; vertical-align: middle; accent-color: var(--brand); }
.field input[type="file"] { padding: 8px 12px; }
.field input[type="file"]::file-selector-button { border: 0; border-radius: 8px; padding: 9px 15px; margin-right: 12px;
  background: var(--brand-soft); color: var(--brand-strong); font-size: 14px; font-weight: 550; cursor: pointer;
  transition: filter .15s ease; }
.field input[type="file"]::file-selector-button:hover { filter: brightness(1.05); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--text) 24%, var(--line)); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px;
  padding: 11px 18px; min-height: 44px; font-size: 15px; font-weight: 550; cursor: pointer;
  background: var(--brand-soft); color: var(--brand-strong);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background .15s ease; }
.btn:hover { color: var(--brand-strong); filter: brightness(1.04); }
.btn:active { transform: scale(.985); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff;
  box-shadow: 0 8px 18px -8px var(--brand); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.05);
  box-shadow: 0 12px 22px -8px var(--brand); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-block { width: 100%; }
.alert { border-radius: 11px; padding: 12px 15px; margin-bottom: 16px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.alert-success { background: var(--ok-soft); color: color-mix(in srgb, var(--ok) 82%, var(--text)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 550;
  white-space: nowrap; background: var(--brand-soft); color: var(--brand-strong); }
.badge-off { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text-sub); }
.muted { color: var(--text-sub); font-size: 13.5px; }
.emp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.emp { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow-sm); }
.emp .emp-name { font-size: 16.5px; font-weight: 650; }
.emp .emp-desc { color: var(--text-sub); font-size: 13.5px; margin: 6px 0 12px; }
.filter-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filter-form select, .filter-form input { min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; background: var(--surface); color: var(--text); }
.empty { border: 1.5px dashed color-mix(in srgb, var(--brand) 32%, var(--line)); border-radius: 14px;
  padding: 32px 20px; text-align: center; color: var(--text-sub); font-size: 14.5px;
  background: color-mix(in srgb, var(--brand-soft) 34%, var(--surface)); }

/* 桌面宽屏：字段数 ≥4 的面板表单双列排布（长说明文本域与按钮行整行） */
@media (min-width: 1024px) {
  .panel form:has(> .field ~ .field ~ .field) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
  .panel form:has(> .field ~ .field ~ .field) > .field:has(> textarea) { grid-column: 1 / -1; }
  .panel form:has(> .field ~ .field ~ .field) > :not(.field) { grid-column: 1 / -1; }
}

.empty::before { content: ""; display: block; width: 42px; height: 42px; margin: 0 auto 10px; opacity: .8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.8A2.8 2.8 0 0 1 6.8 4h10.4A2.8 2.8 0 0 1 20 6.8v6.4a2.8 2.8 0 0 1-2.8 2.8H12l-4.8 3.8c-.6.5-1.5.1-1.5-.7V16H6.8A2.8 2.8 0 0 1 4 13.2z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* 移动端（≤860px）：抽屉侧边栏 + 顶栏一行 + 表格卡片化 */
@media (max-width: 860px) {
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    width: min(302px, 85vw); flex: none; height: 100vh; height: 100dvh; overflow-y: auto;
    border-right: 1px solid var(--line); box-shadow: var(--shadow-lg);
    transform: translateX(-106%); transition: transform .32s cubic-bezier(.32, .72, .24, 1); padding: 16px 14px; }
  body.drawer-open .sidebar { transform: translateX(0); }
  body.drawer-open { overflow: hidden; }
  .drawer-close { display: block; }
  .side-brand { padding-bottom: 12px; }
  .side-nav a { min-height: 52px; padding: 13px 14px; font-size: 16px; border-radius: 12px; }
  .side-nav a .nav-ico { width: 23px; height: 23px; flex-basis: 23px; }
  .topbar { padding: 7px 12px; gap: 10px; }
  .burger { display: block; }
  .top-brand { display: flex; flex: 1 1 auto; }
  .top-title { display: none; }
  .top-actor { display: none; }
  .top-logout { min-height: 44px; padding: 10px 14px; }
  .content { padding: 18px 14px 30px; }
  .panel { padding: 18px 16px; border-radius: 14px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 16px; }
  .card .num { font-size: 26px; }
  .emp-grid { grid-template-columns: 1fr; }
  .login-wrap { padding: 16px; }
  .login-card { padding: 28px 22px 24px; }

  /* 表格 → 卡片：表头行隐藏，每行一张卡，单元格左字段名（data-th）右值 */
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr:first-child { display: none; }
  table.list tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    padding: 10px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
  table.list td { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 9px 0; border-bottom: 1px dashed var(--line); text-align: right; }
  table.list td:last-child { border-bottom: 0; }
  table.list td::before { content: attr(data-th); color: var(--text-sub); font-size: 13px;
    text-align: left; flex: 0 1 40%; padding-top: 1px; }
  table.list td > * { min-width: 0; }
  table.list td .btn { min-height: 44px; }
}

/* ===== M3 聊天（试聊页 / 会话详情 / 访客接待页） ===== */
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.chat-log { display: flex; flex-direction: column; gap: 12px; padding: 8px 2px 2px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 15px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; box-shadow: var(--shadow-sm); }
.msg-ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-bottom-left-radius: 6px; }
.msg-visitor { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 8px 18px -8px var(--brand); }
.msg-meta { margin-top: 6px; font-size: 11.5px; color: var(--text-sub); }
.msg-visitor .msg-meta { color: rgba(255, 255, 255, .78); }
.chat-form { display: flex; gap: 10px; margin-top: 14px; }
.chat-form input[type="text"], .pub-form input[type="text"] { border: 1px solid var(--line); border-radius: 12px;
  padding: 0 14px; background: var(--surface); color: var(--text); caret-color: var(--brand); min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease; }
.chat-form input[type="text"]::placeholder, .pub-form input[type="text"]::placeholder { color: color-mix(in srgb, var(--text-sub) 78%, transparent); }
.chat-form input[type="text"]:focus, .pub-form input[type="text"]:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.chat-form input[type="text"] { flex: 1; min-height: 48px; font-size: 16px; }
.chat-form .btn { min-width: 88px; border-radius: 12px; }

/* 访客接待页（免登录，手机优先，全屏聊天布局） */
.pub-shell { display: flex; flex-direction: column; min-height: 100dvh; background: var(--bg); }
.pub-head { padding: 16px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 30; }
.pub-shop { font-size: 19px; font-weight: 700; color: var(--text); letter-spacing: .01em; }
.pub-brand { margin-top: 2px; font-size: 12.5px; color: var(--text-sub); }
.pub-emps { margin-top: 11px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pub-emps .badge { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff;
  padding: 8px 15px; font-size: 14px; box-shadow: 0 6px 14px -6px var(--brand); }
.pub-emp-link { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 14px;
  transition: border-color .15s ease, color .15s ease, background .15s ease; }
.pub-emp-link:hover { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }
.pub-main { flex: 1; padding: 16px 14px 10px; max-width: 780px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.pub-form { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px -10px rgba(16, 24, 40, .18); }
.pub-form input[type="text"] { flex: 1; min-height: 48px; font-size: 16px; }
.pub-form .btn { min-width: 88px; border-radius: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 二期 A 批：数据报表（SVG 趋势图/消费构成条）与 AI 图片网格 */
.chart-box { margin-top: 6px; }
.chart-box svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 2px 0 4px; }
.chart-key { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-sub); }
.chart-key i { width: 11px; height: 11px; border-radius: 4px; display: inline-block; }
.comp-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.comp-name { flex: 0 0 168px; font-size: 14px; color: var(--text); }
.comp-track { flex: 1; height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.comp-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-strong)); border-radius: 6px; min-width: 0; }
.comp-val { flex: 0 0 auto; font-size: 14px; color: var(--text-sub); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .comp-row { flex-wrap: wrap; gap: 6px 10px; }
  .comp-name { flex: 1 1 100%; }
  .comp-track { flex: 1 1 auto; }
}
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.img-item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.img-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.img-ph { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; color: var(--text-sub); background: var(--surface-2); font-size: 14px; }
.img-meta { padding: 10px 12px; }
.img-prompt { font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.img-err { margin-top: 5px; font-size: 12.5px; color: var(--danger); line-height: 1.45; }
