/* ==========================================================================
   黄河产发 · 智能数据库 — 设计系统与全部页面样式
   纯原生 CSS，无外链、无第三方库、无外网字体
   ========================================================================== */

:root {
  --green-900: #062f20;
  --green-800: #07402a;
  --green-700: #0B5D3B;
  --green-600: #0F766E;
  --green-500: #12866a;
  --gold: #C9A227;
  --gold-soft: #E4C55C;
  --bg: #F5F7F4;
  --card: #FFFFFF;
  --text: #17251D;
  --muted: #6B7A70;
  --muted-2: #8A988E;
  --line: #E3E9E2;
  --line-soft: #EEF2EE;
  --line-strong: #CBD6CC;
  --danger: #C2410C;
  --danger-bg: #FBEAE2;
  --warn: #B45309;
  --warn-bg: #FDF1E3;
  --ok: #15803D;
  --ok-bg: #E8F5EC;
  --info: #64748B;
  --info-bg: #EEF1F4;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(11, 54, 36, .05), 0 2px 10px rgba(11, 54, 36, .04);
  --shadow-md: 0 6px 20px rgba(11, 54, 36, .08);
  --shadow-lg: 0 18px 48px rgba(11, 54, 36, .16);
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "WenQuanYi Micro Hei", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ------------------------------ 基础重置 ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
::selection { background: rgba(201, 162, 39, .28); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C9D6CC; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #B3C5B8; border: 2px solid transparent; background-clip: content-box; }

/* ------------------------------ 启动画面 ------------------------------ */
.boot-splash {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; background: radial-gradient(circle at 50% 30%, #0F5A3C 0%, #08351f 62%, #062a19 100%);
  color: #EAF5EE; padding: 24px; text-align: center;
}
.boot-mark { width: 64px; height: 64px; border-radius: 18px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; margin-bottom: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.boot-title { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.boot-sub { font-size: 12.5px; color: rgba(234, 245, 238, .6); }
.boot-spinner { width: 26px; height: 26px; margin-top: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .18); border-top-color: var(--gold-soft); animation: spin .9s linear infinite; }
.boot-hint { font-size: 12px; color: rgba(234, 245, 238, .48); }
.noscript { padding: 40px; text-align: center; color: var(--danger); font-size: 15px; }

/* ------------------------------ 骨架屏 ------------------------------ */
.sk { position: relative; overflow: hidden; background: #EDF1ED; border-radius: 8px; display: block; }
.sk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); transform: translateX(-100%); animation: shimmer 1.25s infinite; }
.sk-line { height: 12px; margin-bottom: 9px; }
.sk-line:last-child { margin-bottom: 0; }
.sk-line.w20 { width: 20%; } .sk-line.w30 { width: 30%; } .sk-line.w40 { width: 40%; }
.sk-line.w50 { width: 50%; } .sk-line.w60 { width: 60%; } .sk-line.w70 { width: 70%; }
.sk-line.w80 { width: 80%; } .sk-line.w90 { width: 90%; } .sk-line.w100 { width: 100%; }
.sk-line.lg { height: 22px; }
.sk-circle { border-radius: 50%; }
.sk-kpi { height: 108px; border-radius: var(--radius); }
.sk-card { height: 148px; border-radius: var(--radius); }
.sk-chart { height: 220px; border-radius: var(--radius); }
.sk-row { height: 44px; border-radius: 8px; margin-bottom: 10px; }
.sk-page { display: flex; flex-direction: column; gap: 16px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.sk-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }

/* ------------------------------ 布局骨架 ------------------------------ */
.app-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left .2s ease;
}
.page {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 22px 26px 56px;
  flex: 1;
  min-width: 0;
}
.page-loading { display: flex; align-items: center; justify-content: center; min-height: 50vh; }

/* 侧边栏 */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: linear-gradient(180deg, #0B5D3B 0%, #08452c 58%, #062f20 100%);
  color: #E8F3EC; display: flex; flex-direction: column; z-index: 70;
  transition: width .2s ease, transform .26s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.sidebar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 12% -4%, rgba(201, 162, 39, .18), transparent 46%),
              radial-gradient(circle at 90% 110%, rgba(15, 118, 110, .22), transparent 55%);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 19px 18px 12px; position: relative; z-index: 1; flex: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #E4C55C, #C9A227); display: grid; place-items: center; color: #0B3D28; flex: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .22); }
.brand-text { min-width: 0; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; color: #fff; }
.brand-sub { font-size: 10.5px; color: rgba(232, 243, 236, .58); white-space: nowrap; margin-top: 2px; letter-spacing: .5px; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 10px 14px; position: relative; z-index: 1; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border: 2px solid transparent; background-clip: content-box; }
.nav-group { margin-top: 13px; }
.nav-group:first-child { margin-top: 2px; }
.nav-label { font-size: 10.5px; letter-spacing: 2.2px; color: rgba(232, 243, 236, .42); padding: 0 12px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px;
  color: rgba(240, 248, 243, .82); font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background .15s ease, color .15s ease; margin-bottom: 2px; position: relative;
  text-decoration: none; user-select: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav-item .ico { flex: none; display: grid; place-items: center; opacity: .92; }
.nav-item .nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: rgba(201, 162, 39, .9); color: #211a02; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge.is-danger { background: #E2703F; color: #fff; }
.sidebar-foot { padding: 12px 14px 16px; position: relative; z-index: 1; flex: none; }
.ai-card {
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px; padding: 11px 12px; cursor: pointer; transition: background .15s ease;
  text-align: left; width: 100%; color: inherit;
}
.ai-card:hover { background: rgba(255, 255, 255, .15); }
.ai-title { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; color: #fff; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #54D08A; box-shadow: 0 0 0 0 rgba(84, 208, 138, .7); animation: pulseDot 2.2s infinite; flex: none; }
.pulse-dot.is-gold { background: var(--gold-soft); box-shadow: 0 0 0 0 rgba(228, 197, 92, .7); }
.ai-meta { font-size: 10.5px; color: rgba(232, 243, 236, .62); margin-top: 4px; line-height: 1.5; }
.ai-tag { display: inline-block; margin-top: 7px; font-size: 10px; padding: 1px 7px; border-radius: 99px; background: rgba(201, 162, 39, .18); color: #EED98F; border: 1px solid rgba(201, 162, 39, .35); }
.sidebar-note { padding: 0 4px; margin-top: 10px; font-size: 10.5px; color: rgba(232, 243, 236, .38); line-height: 1.55; }
.nav-scrim { display: none; }

/* 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 16px; padding: 0 26px;
  background: rgba(255, 255, 255, .93); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; min-width: 0; }
.crumbs .crumb-sep { color: #B9C6BC; }
.crumbs .cur { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumbs .crumb-link { cursor: pointer; color: var(--muted); }
.crumbs .crumb-link:hover { color: var(--green-700); text-decoration: none; }
.search { position: relative; flex: 1; max-width: 440px; min-width: 0; margin-left: 8px; }
.search-box { display: flex; align-items: center; gap: 8px; height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; background: #F7FAF7; padding: 0 11px; color: var(--muted); transition: border-color .15s, background .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--green-600); background: #fff; box-shadow: 0 0 0 3px rgba(15, 118, 110, .1); }
.search-box input { flex: 1; border: none; background: transparent; outline: none; font-size: 13.5px; color: var(--text); min-width: 0; }
.search-box input::placeholder { color: #9AA89E; }
.search-box kbd { font-family: inherit; font-size: 10.5px; color: var(--muted-2); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; background: #fff; white-space: nowrap; }
.search-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 80; overflow-y: auto; max-height: 68vh; }
.search-group-label { padding: 9px 14px 4px; font-size: 10.5px; letter-spacing: 1.6px; color: var(--muted-2); font-weight: 700; }
.search-result { display: flex; gap: 10px; padding: 9px 14px; cursor: pointer; border-top: 1px solid var(--line-soft); align-items: center; }
.search-result:first-child { border-top: none; }
.search-result:hover, .search-result.is-active { background: #F4F9F5; }
.search-result .sr-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result .sr-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result .sr-body { min-width: 0; flex: 1; }
.search-empty { padding: 18px 14px; color: var(--muted); font-size: 13px; text-align: center; }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: none; }
.today { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.menu-btn { display: none; }
.topbar .menu-btn { display: none; }
.topbar-divider { width: 1px; height: 22px; background: var(--line); }

/* ------------------------------ 页面标题 / 通用容器 ------------------------------ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head-main { min-width: 0; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-desc { font-size: 13px; color: var(--muted); margin-top: 5px; max-width: 860px; line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.section-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 12px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mt0 { margin-top: 0 !important; } .mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0 !important; }
.divider { height: 1px; background: var(--line-soft); border: none; margin: 0; }
.grid { display: grid; gap: 16px; min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.grid-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.card-body { padding: 16px 18px; min-width: 0; }
.card-body.tight { padding: 12px 14px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-hover { transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-hover:hover { border-color: #BFD5C6; box-shadow: var(--shadow-md); }
.clickable { cursor: pointer; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; }
.kpi { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px 14px; box-shadow: var(--shadow-sm); overflow: hidden; min-width: 0; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--kpi-accent, var(--green-700)); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--kpi-bg, #EEF5F0); color: var(--kpi-accent, var(--green-700)); flex: none; }
.kpi-value { font-size: 25px; font-weight: 700; letter-spacing: -.5px; margin-top: 8px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-value .unit { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-sub { font-size: 11.5px; color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi-sub .up { color: var(--ok); font-weight: 700; }
.kpi-sub .down { color: var(--danger); font-weight: 700; }

/* 统计条 */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat-cell { background: #fff; padding: 11px 14px; min-width: 0; }
.stat-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 17px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-value .unit { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-left: 2px; }

/* ------------------------------ 按钮 ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid transparent; font-size: 13.5px; font-weight: 600; line-height: 1;
  white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .06s;
  background: transparent; color: var(--text); text-decoration: none; user-select: none; vertical-align: middle;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: 0 2px 8px rgba(11, 93, 59, .22); }
.btn-primary:hover { background: #0a4f32; }
.btn-gold { background: var(--gold); color: #241d02; box-shadow: 0 2px 8px rgba(201, 162, 39, .24); }
.btn-gold:hover { background: #b9931f; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: #F2F6F1; border-color: #B9CBBE; }
.btn-subtle { background: #EEF5F0; color: var(--green-800); }
.btn-subtle:hover { background: #E2EFE6; }
.btn-danger { background: #fff; border-color: #E8C6B8; color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #a93709; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-icon { width: 36px; padding: 0; flex: none; }
.btn-icon.btn-sm { width: 30px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-ghost.is-loading::after, .btn-subtle.is-loading::after, .btn-danger.is-loading::after { border-color: rgba(11, 93, 59, .25); border-top-color: var(--green-700); }
.btn-link { background: none; border: none; color: var(--green-700); font-weight: 600; font-size: 13px; padding: 0; height: auto; display: inline-flex; align-items: center; gap: 4px; }
.btn-link:hover { text-decoration: underline; }

/* ------------------------------ 表单 ------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; color: #41574a; font-weight: 600; }
.field-label .req { color: var(--danger); margin-left: 2px; }
.field-hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.input, .select, .textarea {
  height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff;
  padding: 0 11px; font-size: 13.5px; color: var(--text); width: 100%;
  transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.input:hover, .select:hover, .textarea:hover { border-color: #B9CBBE; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(15, 118, 110, .13); }
.input::placeholder, .textarea::placeholder { color: #9AA89E; }
.textarea { height: auto; min-height: 92px; padding: 9px 11px; resize: vertical; line-height: 1.65; }
.select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, #6B7A70 50%), linear-gradient(135deg, #6B7A70 50%, transparent 50%); background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.input[type="number"] { font-variant-numeric: tabular-nums; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(194, 65, 12, .1); }
.field-error { font-size: 11.5px; color: var(--danger); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.toolbar .field { width: auto; min-width: 142px; }
.toolbar .field.grow { flex: 1; min-width: 200px; }
.toolbar .toolbar-spacer { flex: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; user-select: none; color: var(--text); }
.check input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--green-700); cursor: pointer; }
.seg { display: inline-flex; padding: 3px; background: #EEF3EF; border-radius: 10px; gap: 2px; }
.seg button { border: none; background: transparent; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg button.is-active { background: #fff; color: var(--green-800); box-shadow: 0 1px 4px rgba(11, 54, 36, .12); }
input[type="range"] { width: 100%; accent-color: var(--green-700); }
.switch { position: relative; width: 40px; height: 22px; border-radius: 99px; background: #D6DFD8; flex: none; display: inline-block; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch.is-on { background: var(--green-600); }
.switch.is-on::after { transform: translateX(18px); }

/* ------------------------------ 徽章 / 标签 ------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid transparent; vertical-align: middle; }
.badge-neutral { background: #EEF1EE; color: #4A5C50; border-color: #E1E7E1; }
.badge-ok { background: var(--ok-bg); color: #146C33; border-color: #C9E9D3; }
.badge-warn { background: var(--warn-bg); color: #9A4C0B; border-color: #F2D9BC; }
.badge-danger { background: var(--danger-bg); color: #A93A0F; border-color: #F1CDBE; }
.badge-info { background: var(--info-bg); color: #4A6076; border-color: #DCE3EA; }
.badge-gold { background: #FBF4DE; color: #7A5C08; border-color: #EEDFB0; }
.badge-teal { background: #E6F3F1; color: #0B5D50; border-color: #C4E4DF; }
.badge-lg { height: 25px; padding: 0 10px; font-size: 12.5px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; background: #F2F6F1; border: 1px solid #E1E8E2; color: #41574a; white-space: nowrap; }
.tag.is-gold { background: #FBF6E4; border-color: #EEE2B8; color: #75591a; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dept-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #41574a; white-space: nowrap; }
.meter { height: 6px; background: #E8EEE8; border-radius: 99px; overflow: hidden; min-width: 40px; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0B5D3B, #2E9E71); transition: width .3s ease; }
.meter.is-gold > i { background: linear-gradient(90deg, #C9A227, #E4C55C); }
.meter.is-danger > i { background: linear-gradient(90deg, #C2410C, #E2703F); }
.meter.is-muted > i { background: #94A3A0; }
.conf-line { display: flex; align-items: center; gap: 8px; min-width: 96px; }
.conf-line .meter { flex: 1; min-width: 38px; }
.conf-val { font-size: 11.5px; font-weight: 700; color: #41574a; font-variant-numeric: tabular-nums; }

/* ------------------------------ 表格 ------------------------------ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.table-wrap.borderless { border: none; border-radius: 0; }
.ds-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 680px; }
.ds-table th {
  background: #F2F6F1; color: #41574a; font-weight: 700; text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12px; letter-spacing: .2px;
  position: sticky; top: 0; z-index: 1;
}
.ds-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.ds-table tbody tr:last-child td { border-bottom: none; }
.ds-table tbody tr:nth-child(even) { background: #FAFCFA; }
.ds-table tbody tr:hover { background: #F2F9F4; }
.ds-table tr[data-click] { cursor: pointer; }
.ds-table .cell-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-table .cell-center { text-align: center; }
.ds-table .cell-actions { text-align: right; white-space: nowrap; }
.ds-table .cell-title { font-weight: 600; color: var(--text); min-width: 180px; }
.ds-table th.cell-num { text-align: right; }
.ds-table th.cell-center { text-align: center; }
.ds-table.compact td { padding: 8px 10px; }
.ds-table.compact th { padding: 8px 10px; }
.table-empty { padding: 34px 16px; }
.table-note { padding: 10px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-soft); background: #FBFDFB; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-info { font-size: 12.5px; color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.pager-btn { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.pager-btn:hover:not([disabled]):not(.is-active) { border-color: var(--green-600); color: var(--green-700); }
.pager-btn.is-active { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.pager-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pager-ellipsis { color: var(--muted-2); padding: 0 2px; font-size: 12px; }

/* ------------------------------ 列表 / 文档卡 ------------------------------ */
.list { display: flex; flex-direction: column; min-width: 0; }
.list-item { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); align-items: center; min-width: 0; transition: background .12s; }
.list-item:last-child { border-bottom: none; }
.list-item.clickable:hover { background: #F6FAF7; }
.list-main { min-width: 0; flex: 1; }
.list-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-side { flex: none; text-align: right; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.doc-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
.doc-card:hover { border-color: #BFD5C6; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.doc-head { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.doc-icon { width: 36px; height: 36px; border-radius: 10px; background: #EEF5F0; color: var(--green-700); display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; }
.doc-title { font-size: 14px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.doc-summary { font-size: 12.5px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.doc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.doc-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ------------------------------ 图表 ------------------------------ */
.chart { width: 100%; min-width: 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); }
.chart-grid-line { stroke: #E9EFEA; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-axis-line { stroke: #DCE5DD; stroke-width: 1; }
.chart-label { font-size: 11px; fill: #6B7A70; }
.chart-value { font-size: 10.5px; fill: #41574a; font-weight: 600; }
.chart-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-legend .lg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.chart-legend .lg b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-empty { display: flex; align-items: center; justify-content: center; min-height: 160px; color: var(--muted); font-size: 12.5px; }

/* 横向条形图 */
.hbars { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.hbar { display: grid; grid-template-columns: minmax(68px, 92px) minmax(0, 1fr) auto; gap: 10px; align-items: center; min-width: 0; }
.hbar-label { font-size: 12.5px; color: #41574a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 9px; background: #EEF2EE; border-radius: 99px; overflow: hidden; min-width: 30px; }
.hbar-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0B5D3B, #2E9E71); transition: width .4s ease; }
.hbar-fill.is-gold { background: linear-gradient(90deg, #C9A227, #E4C55C); }
.hbar-fill.is-teal { background: linear-gradient(90deg, #0F766E, #37A79C); }
.hbar-fill.is-muted { background: #9DAFA3; }
.hbar-value { font-size: 12px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; min-width: 42px; }
.hbar-value .u { color: var(--muted); font-weight: 500; font-size: 11px; margin-left: 2px; }

/* 部门对比 */
.dept-card { padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-width: 0; }
.dept-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dept-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.dept-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.dept-stat { background: #F8FAF8; border: 1px solid var(--line-soft); border-radius: 9px; padding: 8px 10px; min-width: 0; }
.dept-stat .v { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dept-stat .l { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------ 空状态 / 提示条 / 加载 ------------------------------ */
.empty { padding: 38px 18px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.empty-art { width: 96px; height: 72px; margin-bottom: 12px; position: relative; }
.empty-art::before { content: ""; position: absolute; left: 8px; top: 8px; right: 8px; bottom: 14px; border: 2px dashed #CBD8CE; border-radius: 10px; background: #F8FBF8; }
.empty-art::after { content: ""; position: absolute; left: 26px; top: 26px; width: 30px; height: 4px; border-radius: 4px; background: #D6E2D9; box-shadow: 0 11px 0 #E1EAE3, 0 22px 0 #E8EFE9; }
.empty-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.empty-desc { font-size: 12.5px; color: var(--muted); max-width: 420px; line-height: 1.7; }
.empty-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.banner { display: flex; gap: 12px; padding: 13px 16px; border-radius: 12px; border: 1px solid; font-size: 13.5px; align-items: flex-start; line-height: 1.65; min-width: 0; }
.banner-icon { flex: none; margin-top: 1px; }
.banner-body { min-width: 0; flex: 1; }
.banner-title { font-weight: 700; margin-bottom: 2px; }
.banner-info { background: #F0F7F4; border-color: #CFE3D9; color: #0B4A31; }
.banner-success { background: #EDF8F0; border-color: #BFE4CA; color: #146C33; }
.banner-warn { background: #FDF5E8; border-color: #F0D9B4; color: #8A4B0B; }
.banner-danger { background: #FCEFE9; border-color: #EECABC; color: #9C3A12; }
.loading-inline { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; padding: 20px; justify-content: center; }
.spinner { width: 17px; height: 17px; border-radius: 50%; border: 2px solid rgba(11, 93, 59, .18); border-top-color: var(--green-700); animation: spin .75s linear infinite; flex: none; }
.spinner.is-light { border-color: rgba(255, 255, 255, .3); border-top-color: #fff; }
.error-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 52px 20px; text-align: center; }
.error-state .etitle { font-size: 16px; font-weight: 700; }
.error-state .edesc { font-size: 13px; color: var(--muted); max-width: 520px; line-height: 1.7; }

/* ------------------------------ Toast ------------------------------ */
.toast-root { position: fixed; top: 74px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; pointer-events: none; max-width: min(430px, calc(100vw - 32px)); }
.toast { pointer-events: auto; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green-600); border-radius: 10px; box-shadow: 0 12px 34px rgba(11, 54, 36, .16); padding: 11px 13px; display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; line-height: 1.55; animation: toastIn .22s cubic-bezier(.2, .8, .2, 1); min-width: 240px; }
.toast .toast-icon { flex: none; margin-top: 1px; }
.toast .toast-msg { flex: 1; min-width: 0; word-break: break-word; }
.toast .toast-close { flex: none; border: none; background: none; color: var(--muted-2); padding: 0; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; }
.toast .toast-close:hover { background: #F0F4F0; color: var(--text); }
.toast-success { border-left-color: var(--ok); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warn); }
.toast-info { border-left-color: var(--green-600); }
.toast.is-out { animation: toastOut .18s ease forwards; }

/* ------------------------------ 遮罩 / 抽屉 / 模态 ------------------------------ */
.overlay-root { position: relative; z-index: 100; }
.overlay { position: fixed; inset: 0; background: rgba(10, 30, 22, .44); z-index: 100; display: flex; justify-content: flex-end; animation: fade .18s ease; }
.overlay.is-modal { justify-content: center; align-items: center; padding: 20px; z-index: 120; }
.drawer { width: min(580px, 100%); height: 100%; background: #fff; display: flex; flex-direction: column; animation: slideIn .24s cubic-bezier(.2, .8, .2, 1); box-shadow: -12px 0 40px rgba(0, 0, 0, .18); min-width: 0; }
.drawer.is-wide { width: min(760px, 100%); }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; flex: none; background: linear-gradient(180deg, #FBFDFB, #fff); }
.drawer-head-main { min-width: 0; flex: 1; }
.drawer-title { font-size: 16.5px; font-weight: 700; line-height: 1.4; }
.drawer-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.drawer-close { flex: none; width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: #F2F6F1; color: var(--muted); display: grid; place-items: center; }
.drawer-close:hover { background: #E6EEE7; color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.drawer-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; flex: none; flex-wrap: wrap; background: #FBFDFB; }
.modal { width: min(540px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 26px 70px rgba(0, 0, 0, .25); display: flex; flex-direction: column; max-height: calc(100vh - 40px); animation: modalIn .2s cubic-bezier(.2, .8, .2, 1); min-width: 0; }
.modal.is-wide { width: min(720px, 100%); }
.modal.is-xwide { width: min(1080px, 100%); }
.modal-head { padding: 17px 20px 12px; display: flex; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.modal-title { font-size: 16px; font-weight: 700; flex: 1; min-width: 0; }
.modal-body { padding: 18px 20px; overflow-y: auto; font-size: 13.5px; line-height: 1.7; color: var(--text); }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.modal-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: #EEF5F0; color: var(--green-700); }
.modal-icon.is-danger { background: var(--danger-bg); color: var(--danger); }

/* ------------------------------ 上传页 ------------------------------ */
.dropzone { border: 2px dashed #C4D4C8; border-radius: var(--radius); background: linear-gradient(180deg, #FBFDFB, #F3F8F4); padding: 32px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--green-600); background: #EFF8F2; box-shadow: inset 0 0 0 3px rgba(15, 118, 110, .06); }
.dropzone.is-over { transform: none; }
.dropzone-icon { width: 54px; height: 54px; border-radius: 15px; background: #fff; border: 1px solid var(--line); color: var(--green-700); display: grid; place-items: center; margin: 0 auto 12px; box-shadow: var(--shadow-sm); }
.dropzone-title { font-size: 15.5px; font-weight: 700; }
.dropzone-desc { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.7; }
.dropzone-types { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-row { display: flex; align-items: center; gap: 10px; background: #FBFDFB; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-width: 0; }
.file-row .fname { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-row .fmeta { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.file-row .fprog { flex: 1; max-width: 180px; }
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.pipe-step { position: relative; padding-top: 36px; text-align: center; min-width: 0; }
.pipe-step::before { content: ""; position: absolute; top: 13px; left: 0; right: 0; height: 2px; background: #E3EAE4; }
.pipe-step:first-child::before { left: 50%; }
.pipe-step:last-child::before { right: 50%; }
.pipe-dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #EDF2ED; color: #8A9A8E; border: 2px solid #DCE5DD; font-size: 12px; font-weight: 700; z-index: 2; }
.pipe-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pipe-detail { font-size: 11px; color: var(--muted-2); margin-top: 2px; line-height: 1.45; word-break: break-word; }
.pipe-ms { font-size: 10px; color: var(--muted-2); margin-top: 1px; font-variant-numeric: tabular-nums; }
.pipe-step.is-done .pipe-dot { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.pipe-step.is-done .pipe-label { color: var(--green-800); }
.pipe-step.is-active .pipe-dot { background: #fff; color: var(--gold); border-color: var(--gold); animation: pulse 1.3s infinite; }
.pipe-step.is-active .pipe-label { color: var(--text); }
.pipe-step.is-failed .pipe-dot { background: var(--danger); color: #fff; border-color: var(--danger); }
.result-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.result-head { display: flex; align-items: flex-start; gap: 12px; padding: 15px 18px; background: linear-gradient(180deg, #F7FBF8, #fff); border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.result-sec { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.result-sec:last-child { border-bottom: none; }
.result-sec-title { font-size: 12px; font-weight: 700; color: #41574a; letter-spacing: .4px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.entity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; }
.entity { min-width: 0; }
.entity .k { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.entity .v { font-size: 12.5px; line-height: 1.6; word-break: break-word; }
.entity .v span { display: inline-block; margin: 0 6px 3px 0; }
.sample-hint { border: 1px dashed #D8E2DA; border-radius: 10px; padding: 11px 13px; font-size: 12px; color: var(--muted); line-height: 1.7; background: #FBFDFB; }
.sample-hint b { color: #41574a; }

/* ------------------------------ 详情页 ------------------------------ */
.detail-hero { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.detail-hero-main { flex: 1; min-width: 220px; }
.detail-title { font-size: 21px; font-weight: 700; line-height: 1.4; letter-spacing: -.2px; word-break: break-word; }
.detail-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; }
.kv { min-width: 0; }
.kv .k { font-size: 11.5px; color: var(--muted); }
.kv .v { font-size: 13.5px; font-weight: 600; margin-top: 2px; word-break: break-word; }
/* 原文件在线预览（PDF / 图片） */
.file-preview { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 240px; }
.file-preview-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: #4b6155; font-size: 13px; background: #F4F6F4; border: 1px dashed #CBD8CE; border-radius: 10px; pointer-events: none; }
.file-preview-frame { width: 100%; height: min(74vh, 860px); border: 1px solid var(--line-soft); border-radius: 10px; background: #F4F6F4; }
.file-preview-image { max-width: 100%; max-height: min(74vh, 860px); display: block; margin: 0 auto; border-radius: 10px; border: 1px solid var(--line-soft); background: #fff; }
.text-preview { font-size: 13px; line-height: 1.9; color: #26392c; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: hidden; position: relative; }
.text-preview.is-open { max-height: none; }
.text-preview-wrap { position: relative; }
.text-preview-wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff); pointer-events: none; }
.text-preview-wrap.is-open::after { display: none; }
.analysis-list { display: flex; flex-direction: column; gap: 10px; }

/* ------------------------------ 价格 / 比价可视化 ------------------------------ */
.range-viz { min-width: 190px; width: 100%; }
.range-track { position: relative; height: 8px; background: #EEF2EE; border-radius: 99px; margin: 8px 0 4px; }
.range-fill { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, #A9CDB8, #6FA98A); border-radius: 99px; }
.range-marker { position: absolute; top: -4px; width: 2px; height: 16px; background: #1F3A2B; border-radius: 2px; }
.range-marker.is-high { background: var(--danger); width: 3px; }
.range-marker.is-low { background: var(--warn); width: 3px; }
.range-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; gap: 6px; }
.range-quote { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; justify-content: space-between; gap: 8px; }
.verdict-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid; flex-wrap: wrap; }
.verdict-banner .vb-main { flex: 1; min-width: 200px; }
.verdict-banner .vb-title { font-size: 17px; font-weight: 700; }
.verdict-banner .vb-desc { font-size: 12.5px; opacity: .85; margin-top: 3px; line-height: 1.6; }
.verdict-high { background: #FCEFE7; border-color: #EEC7B5; color: #8E3408; }
.verdict-low { background: #FDF5E5; border-color: #EFD9B1; color: #7C4A08; }
.verdict-ok { background: #EDF8F0; border-color: #BFE4CA; color: #146C33; }
.verdict-missing { background: #F1F4F6; border-color: #DCE3E8; color: #45596B; }
.compare-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cstep { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; font-weight: 600; }
.cstep .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #EEF2EE; font-size: 12px; flex: none; }
.cstep.is-active { border-color: var(--green-600); color: var(--green-800); box-shadow: 0 0 0 3px rgba(15, 118, 110, .08); }
.cstep.is-active .num { background: var(--green-700); color: #fff; }
.cstep.is-done { color: var(--green-800); border-color: #CFE3D9; background: #F6FBF7; }
.cstep.is-done .num { background: #DCEFE2; color: var(--green-800); }
.cstep-sep { color: #C3CFC5; display: flex; align-items: center; }
.quote-editor { width: 100%; }
.quote-editor .ds-table { min-width: 640px; }
.quote-editor .input, .quote-editor .select { height: 32px; font-size: 12.5px; border-radius: 7px; }
.quote-editor td { padding: 6px 8px; }
.quote-editor th { padding: 8px; }
.quote-total { display: flex; align-items: center; gap: 14px; justify-content: flex-end; padding: 10px 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.quote-total b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.match-cell { display: flex; flex-direction: column; gap: 2px; min-width: 100px; }
.match-cell .mname { font-size: 12px; color: #41574a; font-weight: 600; }
.source-chips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 120px; }
.source-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #F2F6F1; border: 1px solid #E1E8E2; color: #41574a; cursor: pointer; max-width: 160px; }
.source-chip:hover { border-color: var(--green-600); color: var(--green-700); }
.source-chip .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------ 联动 ------------------------------ */
.gap-bar { display: grid; grid-template-columns: minmax(64px, 100px) minmax(0, 1fr) minmax(64px, 100px); gap: 8px; align-items: center; min-width: 260px; }
.gap-bar .gside { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gap-bar .gside.a { text-align: right; color: var(--green-800); font-weight: 600; }
.gap-bar .gside.b { text-align: left; color: var(--warn); font-weight: 600; }
.gap-dual { display: flex; flex-direction: column; gap: 3px; }
.gap-dual .gtrack { height: 7px; background: #EEF2EE; border-radius: 99px; overflow: hidden; }
.gap-dual .gfill { display: block; height: 100%; border-radius: 99px; }
.gap-dual .gfill.a { background: linear-gradient(90deg, #0B5D3B, #2E9E71); }
.gap-dual .gfill.b { background: linear-gradient(90deg, #C9A227, #E4C55C); }
.supplier-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.supplier-row:last-child { border-bottom: none; }
.supplier-mark { width: 32px; height: 32px; border-radius: 9px; background: #EEF5F0; color: var(--green-700); display: grid; place-items: center; flex: none; }
.finding-row { padding: 13px 18px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.finding-row:last-child { border-bottom: none; }
.finding-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.finding-title { font-size: 13.5px; font-weight: 600; }
.finding-detail { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.7; }
.finding-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted-2); margin-top: 6px; }

/* ------------------------------ 问答 ------------------------------ */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.chat-card { display: flex; flex-direction: column; height: calc(100vh - 232px); min-height: 520px; overflow: hidden; }
.chat-thread { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.chat-welcome { padding: 10px 4px 2px; }
.chat-welcome h3 { font-size: 17px; font-weight: 700; }
.chat-welcome p { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.7; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chat-chip { border: 1px solid var(--line-strong); background: #FBFDFB; border-radius: 99px; padding: 6px 13px; font-size: 12.5px; color: #41574a; transition: all .15s; }
.chat-chip:hover { border-color: var(--green-600); background: #EFF8F2; color: var(--green-800); }
.msg { display: flex; gap: 10px; max-width: 90%; min-width: 0; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; }
.msg.assistant .msg-avatar { background: linear-gradient(135deg, #0B5D3B, #0F766E); color: #fff; }
.msg.user .msg-avatar { background: #E7EEE8; color: var(--green-800); }
.msg-content { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.msg.user .msg-content { align-items: flex-end; }
.bubble { background: #F4F8F4; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.msg.user .bubble { background: var(--green-700); color: #fff; border-color: transparent; border-top-right-radius: 4px; }
.msg.assistant .bubble { border-top-left-radius: 4px; }
.msg-time { font-size: 10.5px; color: var(--muted-2); padding: 0 2px; }
.msg-mode { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted-2); }
.citations { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.citation { display: flex; align-items: flex-start; gap: 8px; border: 1px solid var(--line); background: #FBFDFB; border-radius: 9px; padding: 8px 10px; cursor: pointer; transition: all .15s; text-align: left; width: 100%; }
.citation:hover { border-color: var(--green-600); background: #F2FAF5; }
.citation .cico { color: var(--green-600); flex: none; margin-top: 1px; }
.citation .cbody { min-width: 0; flex: 1; }
.citation .ctitle { font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citation .csnippet { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citation .cscore { font-size: 10.5px; color: var(--muted-2); flex: none; font-variant-numeric: tabular-nums; }
.followups { display: flex; flex-wrap: wrap; gap: 6px; }
.followup { border: 1px dashed #CBD8CE; background: #fff; border-radius: 99px; padding: 4px 11px; font-size: 11.5px; color: #41574a; }
.followup:hover { border-color: var(--green-600); color: var(--green-800); background: #F4FAF6; }
.chat-composer { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-end; background: #fff; flex: none; }
.chat-composer textarea { flex: 1; min-height: 42px; max-height: 130px; resize: none; border: 1px solid var(--line-strong); border-radius: 11px; padding: 10px 12px; font-size: 13.5px; line-height: 1.6; outline: none; background: #FBFDFB; }
.chat-composer textarea:focus { border-color: var(--green-600); background: #fff; box-shadow: 0 0 0 3px rgba(15, 118, 110, .1); }
.chat-composer .hint { font-size: 10.5px; color: var(--muted-2); padding: 0 2px 2px; }
.typing { display: inline-flex; align-items: center; gap: 4px; padding: 13px 16px; background: #F4F8F4; border: 1px solid var(--line); border-radius: 14px; border-top-left-radius: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8FA79A; animation: typing 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }
.history-list { display: flex; flex-direction: column; max-height: 480px; overflow-y: auto; }
.history-item { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background .12s; }
.history-item:hover { background: #F6FAF7; }
.history-item:last-child { border-bottom: none; }
.history-q { font-size: 12.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.history-meta { font-size: 11px; color: var(--muted-2); margin-top: 3px; display: flex; gap: 8px; align-items: center; }

/* ------------------------------ 自治引擎 ------------------------------ */
.rule-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; min-width: 0; }
.rule-row:last-child { border-bottom: none; }
.rule-main { flex: 1; min-width: 200px; }
.rule-label { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rule-desc { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.65; }
.rule-value { font-size: 12.5px; font-weight: 700; color: var(--green-800); background: #EEF5F0; border: 1px solid #DCE9DF; border-radius: 8px; padding: 4px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline { position: relative; margin: 0; padding: 4px 0 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 15px 24px; border-left: 2px solid #E6ECE7; margin-left: 6px; min-width: 0; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline .t-dot { position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--green-600); border: 2px solid #fff; box-shadow: 0 0 0 2px #E1EAE4; }
.timeline .t-dot.is-gold { background: var(--gold); box-shadow: 0 0 0 2px #F0E6C6; }
.timeline .t-dot.is-warn { background: var(--warn); box-shadow: 0 0 0 2px #F3E2C9; }
.timeline .t-title { font-size: 13px; font-weight: 600; line-height: 1.5; }
.timeline .t-detail { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.65; word-break: break-word; }
.timeline .t-time { font-size: 11px; color: var(--muted-2); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.run-progress { display: flex; flex-direction: column; gap: 8px; }
.run-bar { height: 8px; border-radius: 99px; background: #E8EEE8; overflow: hidden; }
.run-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0B5D3B, #C9A227); border-radius: 99px; transition: width .35s ease; }
.run-step-list { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.md { font-size: 13px; line-height: 1.85; color: #26392c; word-break: break-word; }
.md h1, .md h2, .md h3 { font-weight: 700; color: var(--text); margin: 14px 0 6px; line-height: 1.45; }
.md h1 { font-size: 17px; } .md h2 { font-size: 15px; } .md h3 { font-size: 14px; }
.md h1:first-child, .md h2:first-child, .md h3:first-child { margin-top: 0; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 20px; list-style: revert; }
.md li { margin: 2px 0; }
.md code { background: #F1F5F1; border: 1px solid #E1E8E2; border-radius: 5px; padding: 1px 5px; font-size: 12px; }
.md pre { background: #F6F9F6; border: 1px solid var(--line); border-radius: 9px; padding: 12px; overflow-x: auto; }
.md table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12.5px; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; }
.md th { background: #F4F8F4; font-weight: 600; }
.md strong { font-weight: 700; color: var(--text); }
.md hr { border: none; border-top: 1px solid var(--line); margin: 12px 0; }
.md blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--gold); background: #FBF8EE; color: #5c5330; }

/* ------------------------------ 设置 ------------------------------ */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.setting-row:last-child { border-bottom: none; }
.setting-row .sr-label { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.setting-row .sr-desc { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.65; }
.setting-row .sr-control { min-width: 0; }
.slider-row { display: flex; align-items: center; gap: 10px; }
.slider-row output { min-width: 52px; text-align: right; font-size: 13px; font-weight: 700; color: var(--green-800); font-variant-numeric: tabular-nums; }
.provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.provider { border: 1px solid var(--line-strong); border-radius: 11px; padding: 12px 14px; cursor: pointer; background: #fff; text-align: left; transition: all .15s; min-width: 0; }
.provider:hover { border-color: var(--green-600); }
.provider.is-active { border-color: var(--green-700); background: #F5FBF7; box-shadow: 0 0 0 3px rgba(11, 93, 59, .08); }
.provider .pname { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.provider .pdesc { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.55; }
.info-table { width: 100%; font-size: 13px; }
.info-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 0; width: 150px; vertical-align: top; font-size: 12.5px; }
.info-table td { padding: 8px 0; word-break: break-all; }
.info-table tr + tr th, .info-table tr + tr td { border-top: 1px solid var(--line-soft); }

/* ------------------------------ 动画 ------------------------------ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes modalIn { from { transform: translateY(10px) scale(.985); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateX(16px); opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, .35); } 50% { box-shadow: 0 0 0 6px rgba(201, 162, 39, 0); } }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(84, 208, 138, .55); } 70% { box-shadow: 0 0 0 7px rgba(84, 208, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(84, 208, 138, 0); } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* 环形图：自适应宽度，避免在弹性布局中被拉伸导致右侧内容溢出 */
.chart-donut { width: auto; display: inline-flex; flex-direction: column; align-items: center; max-width: 100%; flex: none; }
.chart-donut svg { width: auto; height: auto; max-width: 100%; flex: none; }
.chart-donut .chart-legend { justify-content: center; }
.chart-donut .chart-empty { min-width: 180px; }

/* 弹层打开时锁定页面滚动 */
body.overlay-open { overflow: hidden; }

/* 品牌副标题防溢出 */
.brand-sub { overflow: hidden; text-overflow: ellipsis; }

/* 阈值滑块在窄容器内不被压缩溢出 */
.slider-row input[type="range"] { flex: 1 1 auto; min-width: 0; }
.slider-row output { flex: none; }

/* ============================== 登录 / 注册页 ============================== */
.app-shell.is-hidden { display: none; }
.login-host { min-height: 100vh; }
.login-loading { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.boot-overlay { position: fixed; inset: 0; z-index: 600; }
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 46%) minmax(0, 1fr);
  background: var(--bg);
}
.login-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(158deg, #0B5D3B 0%, #08452c 55%, #062f20 100%);
  color: #EAF5EE;
  padding: 40px clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  min-height: 100vh;
}
.login-brand::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -160px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, .22), transparent 65%);
  pointer-events: none;
}
.login-brand::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  left: -220px;
  bottom: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, .3), transparent 68%);
  pointer-events: none;
}
.login-brand-head { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-brand-mark { width: 42px; height: 42px; border-radius: 12px; }
.login-brand-name { font-size: 16px; font-weight: 700; letter-spacing: .3px; color: #fff; }
.login-brand-sub { font-size: 11.5px; color: rgba(234, 245, 238, .58); margin-top: 2px; }
.login-brand-body { position: relative; z-index: 1; max-width: 520px; }
.login-headline { font-size: clamp(24px, 2.5vw, 34px); line-height: 1.36; font-weight: 700; letter-spacing: -.6px; color: #fff; margin: 0; }
.login-slogan { font-size: 12.5px; color: rgba(234, 245, 238, .66); margin: 14px 0 0; letter-spacing: .3px; }
.login-feature-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.login-feature-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(234, 245, 238, .86); line-height: 1.5; }
.login-feature-list svg { color: var(--gold-soft); flex: none; }
.login-brand-foot { position: relative; z-index: 1; font-size: 11px; color: rgba(234, 245, 238, .45); line-height: 1.75; }
.login-company { color: rgba(234, 245, 238, .62); font-size: 12px; }
.login-demo-note { margin-top: 4px; }
.login-version { color: rgba(201, 162, 39, .8); margin-top: 4px; }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 16px; min-height: 100vh; }
.login-card {
  width: min(438px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 26px 28px 24px;
}
.login-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-card-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-bottom: 18px; }
.login-tabs button { height: 34px; font-size: 13.5px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form .btn-lg { margin-top: 4px; }
.login-error {
  display: flex; align-items: flex-start; gap: 7px;
  background: var(--danger-bg); border: 1px solid #F1CDBE; color: #A93A0F;
  border-radius: 9px; padding: 8px 10px; font-size: 12.5px; line-height: 1.6;
}
.login-error-icon { flex: none; margin-top: 1px; }
.login-register-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.login-register-note svg { flex: none; margin-top: 2px; color: var(--green-600); }
.login-copyright { font-size: 11px; color: var(--muted-2); text-align: center; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: 40px; }
.btn-input-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: none; background: transparent; color: var(--muted-2);
  border-radius: 7px; display: grid; place-items: center;
}
.btn-input-toggle:hover { background: #F0F4F0; color: var(--text); }
.seg button.is-disabled { opacity: .5; cursor: not-allowed; }

/* 禁用控件与锁定状态 */
.select:disabled, .input:disabled {
  background-color: #F5F7F4; color: var(--muted); cursor: not-allowed; opacity: 1;
}
.select:disabled { background-image: none; }
.dropzone.is-disabled { opacity: .62; cursor: not-allowed; border-color: #DCE5DD; background: #F7F9F7; }
.dropzone.is-disabled:hover { border-color: #DCE5DD; background: #F7F9F7; box-shadow: none; }

/* ============================== v1.2 审批与账号状态 ============================== */
.login-error.is-warning { background: var(--warn-bg); border-color: #F0D9B4; color: #8A4B0B; }
.login-approval-note {
  display: flex; align-items: flex-start; gap: 7px;
  background: #FBF4DE; border: 1px solid #EEDFB0; border-radius: 9px;
  padding: 8px 10px; font-size: 12.5px; color: #7A5C08; line-height: 1.6;
}
.login-approval-note svg { flex: none; margin-top: 1px; }
.login-pending { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 4px 2px 2px; }
.login-pending-icon {
  width: 54px; height: 54px; border-radius: 50%;
  background: #FBF4DE; border: 1px solid #EEDFB0; color: var(--gold);
  display: grid; place-items: center;
}
.login-pending-title { font-size: 17px; font-weight: 700; }
.login-pending-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; }
.login-pending-info {
  width: 100%; background: #F8FBF8; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; text-align: left;
}
.login-pending-info > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.login-pending-info .k { color: var(--muted); }
.login-pending .sample-hint { width: 100%; text-align: left; }
.user-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; min-width: 180px; }
.user-actions .btn[disabled] { opacity: .45; }
.switch { border: none; padding: 0; cursor: pointer; }
.switch:disabled { opacity: .55; cursor: not-allowed; }

/* ============================== 当前用户卡与菜单 ============================== */
.user-card-wrap { position: relative; margin-top: 10px; }
.user-card {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px; padding: 9px 10px; color: #EAF5EE; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.user-card:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .22); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #E4C55C, #C9A227); color: #2b2205;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.user-avatar.is-small { width: 28px; height: 28px; font-size: 12px; }
.user-info { min-width: 0; flex: 1; }
.user-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-dept { font-size: 10.5px; color: rgba(234, 245, 238, .6); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; min-width: 0; }
.user-role-badge { height: 17px; font-size: 10px; padding: 0 6px; }
.user-account { color: rgba(234, 245, 238, .48); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-caret { flex: none; color: rgba(234, 245, 238, .55); }
.user-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 120; overflow: hidden;
}
.user-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: none; background: transparent; padding: 9px 10px; border-radius: 8px;
  font-size: 13px; color: var(--text); text-align: left; cursor: pointer;
}
.user-menu-item:hover { background: #F2F7F3; }
.user-menu-item.is-danger { color: var(--danger); }
.user-menu-item.is-danger:hover { background: var(--danger-bg); }
.user-cell { display: flex; align-items: center; gap: 8px; min-width: 168px; }
.user-cell .badge { flex: none; }

/* ============================== 多选 / 批量删除 ============================== */
input[type="checkbox"].row-checkbox {
  width: 15px; height: 15px; accent-color: var(--green-700);
  cursor: pointer; vertical-align: middle; margin: 0;
}
.table-check { width: 38px; text-align: center; }
.table-check .row-checkbox { display: block; margin: 0 auto; }
.select-all { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; user-select: none; }
.card-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: none; border: 1px solid var(--line-strong);
  border-radius: 6px; background: #fff; cursor: pointer;
}
.card-check:hover { border-color: var(--green-600); }
.card-check input { margin: 0; cursor: pointer; }
.doc-card.is-selected { border-color: var(--green-600); box-shadow: 0 0 0 2px rgba(15, 118, 110, .12); }
.selection-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #F0F7F4; border: 1px solid #CFE3D9; border-radius: 10px;
  padding: 8px 12px; font-size: 12.5px; color: #41574a;
}
.selection-bar strong { color: var(--green-800); font-size: 13px; }
.selection-bar .spacer { flex: 1; }
.selection-note { font-size: 11.5px; color: var(--muted-2); }

/* ============================== 响应式 ============================== */
@media (max-width: 1199px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1279px) {
  :root { --sidebar-w: 220px; }
  .page { padding: 20px 22px 52px; }
  .topbar { padding: 0 22px; }
  .today { display: none; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-1-2, .grid-3-2 { grid-template-columns: minmax(0, 1fr); }
  .chat-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .doc-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  :root { --sidebar-w: 76px; }
  .brand { padding: 18px 0 12px; justify-content: center; }
  .brand-text { display: none; }
  .nav { padding: 4px 8px 14px; }
  .nav-label { display: none; }
  .nav-group { margin-top: 8px; }
  .nav-group:first-child { margin-top: 2px; }
  .nav-item { justify-content: center; padding: 0; gap: 0; height: 44px; }
  .nav-item .nav-text, .nav-badge { display: none; }
  .nav-item.active::before { top: 12px; bottom: 12px; }
  .sidebar-foot { padding: 10px 8px 14px; }
  .ai-card { padding: 10px 0; display: grid; place-items: center; overflow: hidden; }
  .ai-title { justify-content: center; font-size: 0; gap: 0; }
  .ai-title .pulse-dot { width: 9px; height: 9px; }
  .ai-meta, .sidebar-note, .ai-tag { display: none; }
  .page { padding: 18px 20px 48px; }
  .topbar { padding: 0 20px; gap: 12px; }
  .crumbs { font-size: 12.5px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: minmax(0, 1fr); }
  .chat-card { height: calc(100vh - 200px); }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; }
  .pipe-step:nth-child(4)::before { left: 50%; }
}
@media (max-width: 767px) {
  :root { --sidebar-w: 0px; --topbar-h: 58px; }
  .app-main { margin-left: 0; }
  .sidebar { width: 264px; transform: translateX(-100%); box-shadow: 18px 0 50px rgba(0, 0, 0, .25); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(8, 26, 18, .45); z-index: 65; animation: fade .18s ease; }
  body.nav-open { overflow: hidden; }
  .menu-btn, .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-divider { display: none; }
  .crumbs .crumb-mid { display: none; }
  .crumbs .crumb-sep.hide-mobile { display: none; }
  .search { margin-left: 0; max-width: none; }
  .search-box kbd { display: none; }
  .topbar-right .btn-upload-label { display: none; }
  .topbar-right { gap: 8px; }
  .page { padding: 16px 14px 44px; }
  .page-head { margin-bottom: 14px; gap: 10px; }
  .page-title { font-size: 19px; }
  .page-actions { width: 100%; }
  .grid-2, .grid-3, .grid-4, .grid-2-1, .grid-1-2, .grid-3-2, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 13px; }
  .kpi-value { font-size: 21px; }
  .grid { gap: 12px; }
  .stack { gap: 12px; }
  .card-body { padding: 14px; }
  .section-head { padding: 13px 14px; }
  .toolbar .field { min-width: 0; flex: 1 1 44%; }
  .toolbar .field.grow { flex-basis: 100%; }
  .toolbar .btn { flex: 1 1 auto; }
  .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .chat-layout { grid-template-columns: minmax(0, 1fr); }
  .chat-card { height: calc(100vh - 210px); min-height: 460px; }
  .chat-thread { padding: 14px; }
  .msg { max-width: 96%; }
  .setting-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .dept-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gap-bar { min-width: 220px; grid-template-columns: minmax(54px, 74px) minmax(0, 1fr) minmax(54px, 74px); }
  .drawer { width: 100%; }
  .drawer-body { padding: 15px; }
  .drawer-head { padding: 14px 15px; }
  .drawer-foot { padding: 11px 15px; }
  .file-preview-frame { height: 70vh; }
  .modal-foot { padding: 11px 15px; }
  .modal-body { padding: 15px; }
  .toast-root { left: 12px; right: 12px; top: 64px; max-width: none; }
  .search-pop { position: fixed; left: 8px; right: 8px; top: calc(var(--topbar-h) - 4px); }
  .sk-split { grid-template-columns: minmax(0, 1fr); }
  .dept-card { padding: 13px; }
  .verdict-banner { padding: 14px; gap: 10px; }
  .verdict-banner .vb-title { font-size: 15.5px; }
  .timeline { padding-top: 0; }
  .compare-steps { gap: 6px; }
  .cstep { padding: 7px 10px; font-size: 12px; }
  .cstep .num { width: 19px; height: 19px; font-size: 11px; }
  .chat-composer { padding: 10px; gap: 8px; }
  .chat-composer .hint { display: none; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kpi-value { font-size: 19px; }
  .page-title { font-size: 18px; }
  .toolbar { gap: 8px; }
  .toolbar .field { flex-basis: 100%; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe-step:nth-child(3)::before { left: 50%; }
  .pipe-step:nth-child(5)::before { left: 50%; }
  .page-head .page-actions .btn { flex: 1 1 auto; }
  .drawer-body { gap: 14px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-card { padding: 13px; }
  .dept-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hbar { grid-template-columns: minmax(60px, 74px) minmax(0, 1fr) auto; }
  .msg-avatar { width: 26px; height: 26px; font-size: 10px; }
  .bubble { padding: 10px 12px; font-size: 13px; }
  .search-box { height: 34px; }
  .topbar-right .btn-sm { height: 34px; }
  .run-step-list, .chart-legend { font-size: 11px; }
}

/* ============================== v1.1 响应式补充 ============================== */
@media (min-width: 768px) and (max-width: 1023px) {
  .user-card { padding: 6px; justify-content: center; }
  .user-info, .user-caret { display: none; }
  .user-avatar { width: 30px; height: 30px; font-size: 12px; }
  .user-card-wrap { margin-top: 8px; }
  .user-menu { left: 100%; right: auto; bottom: 0; width: 192px; margin-left: 8px; }
}
@media (max-width: 900px) {
  .login-page { grid-template-columns: minmax(0, 1fr); }
  .login-brand { min-height: 0; padding: 22px 20px; gap: 14px; }
  .login-brand-body { display: none; }
  .login-brand-foot { display: none; }
  .login-panel { min-height: 0; padding: 22px 16px 28px; justify-content: flex-start; }
  .login-card { padding: 20px 18px; border-radius: 16px; }
}
@media (max-width: 767px) {
  .login-brand { padding: 18px 16px; }
  .login-brand-name { font-size: 15px; }
  .login-tabs button { height: 32px; }
  .login-form { gap: 12px; }
  .user-menu { left: 0; right: 0; bottom: calc(100% + 8px); width: auto; margin-left: 0; }
  .user-cell { min-width: 150px; }
  .selection-bar { font-size: 12px; padding: 8px 10px; }
  .selection-bar .btn { height: 30px; }
}
@media (max-width: 480px) {
  .login-panel { padding: 16px 10px 22px; }
  .login-card { padding: 18px 15px; }
  .login-headline { font-size: 22px; }
  .login-copyright { font-size: 10.5px; padding: 0 8px; }
  .user-card { padding: 8px; }
}

/* ============================== v1.3 业务板块 ============================== */
.segment-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px;
  background: #F1F6F2; border: 1px solid #DCE7DE;
  font-size: 11.5px; color: #334b3a; white-space: nowrap;
  max-width: 100%;
}
.segment-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.segment-chip .segment-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--seg-color, #0B5D3B); flex: none; }
.segment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.segment-card { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.segment-card.is-disabled { background: #FAFBFA; }
.segment-card-head { display: flex; align-items: flex-start; gap: 10px; }
.segment-color { width: 34px; height: 34px; border-radius: 9px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.segment-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.segment-name { font-size: 15px; font-weight: 700; }
.segment-code { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }
.segment-sort { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.segment-keywords { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; }
.segment-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #F7FAF7; border: 1px solid #E6EEE7; border-radius: 9px; padding: 8px 10px; }
.segment-stat .v { font-size: 18px; font-weight: 700; line-height: 1.1; }
.segment-stat .l { display: block; font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.segment-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-top: 2px; }
.segment-desc { font-size: 12px; color: var(--muted); line-height: 1.6; border-top: 1px dashed var(--line); padding-top: 8px; }
.segment-color-input { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.segment-color-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.segment-color-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); cursor: pointer; padding: 0; }
.segment-color-swatch.is-active { border-color: #26392c; }
.segment-dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.segment-dash-card {
  text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--seg-color, #0B5D3B);
  border-radius: 10px; background: #fff; padding: 11px 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.segment-dash-card:hover { border-color: #BFD6C6; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.segment-dash-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.segment-dash-name { font-weight: 700; font-size: 13.5px; }
.segment-dash-stats { display: flex; gap: 18px; }
.segment-dash-stats b { font-size: 17px; display: block; line-height: 1.1; }
.segment-dash-stats .l { font-size: 11px; color: var(--muted-2); }
@media (max-width: 767px) {
  .segment-grid { grid-template-columns: 1fr; }
  .segment-dash-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

/* ============================== v1.4 数据管理 ============================== */
.data-section-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.data-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.data-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.data-overview-item {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-radius: 10px; background: #FBFDFB; padding: 9px 10px;
}
.data-overview-item .doi-icon { width: 28px; height: 28px; border-radius: 8px; background: #EDF5EF; color: var(--green); display: grid; place-items: center; flex: none; }
.data-overview-item .doi-label { font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.data-overview-item .doi-value { font-size: 16px; font-weight: 700; line-height: 1.15; margin-top: 1px; }
.data-overview-item .doi-unit { font-size: 10.5px; font-weight: 500; color: var(--muted-2); margin-left: 3px; }
.data-toolbar { padding-top: 2px; }
.data-guide {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #F8FBF8; border: 1px solid #E4EEE6; border-radius: 10px; padding: 10px 12px;
}
.data-guide-title { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: #334b3a; }
.data-guide-desc { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; line-height: 1.55; }
.danger-zone { border: 1px solid #F0D3C8; background: #FFFDFB; border-radius: 11px; padding: 12px 14px; }
.danger-zone-head { display: flex; align-items: flex-start; gap: 9px; padding-bottom: 10px; }
.danger-zone-icon { width: 30px; height: 30px; border-radius: 9px; background: #FBEDE7; color: var(--danger); display: grid; place-items: center; flex: none; }
.danger-zone-title { font-size: 13px; font-weight: 700; color: #9a3f1c; }
.danger-zone-sub { font-size: 11.5px; color: #9a6248; margin-top: 2px; line-height: 1.55; }
.danger-zone-block { display: flex; flex-direction: column; gap: 6px; }
.danger-zone-label { font-size: 12.5px; font-weight: 700; color: #7a3a20; }
.danger-zone-desc { font-size: 11.5px; color: #9a6248; line-height: 1.55; }
.danger-divider { height: 1px; background: #F3E1D9; margin: 12px 0; }
.danger-note {
  display: flex; align-items: flex-start; gap: 8px;
  background: #FDF1EC; border: 1px solid #F0D3C8; border-radius: 9px;
  padding: 9px 11px; font-size: 12.5px; color: #8a3f1f; line-height: 1.65;
}
.danger-note svg { flex: none; margin-top: 1px; color: var(--danger); }
@media (max-width: 1023px) {
  .data-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .data-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-overview-item { padding: 8px; gap: 7px; }
  .data-overview-item .doi-value { font-size: 15px; }
  .data-guide { align-items: flex-start; }
}

/* ============================== v1.5 品牌 Logo ============================== */
.boot-logo { width: 64px; height: 64px; object-fit: contain; display: block; }
.brand-mark-img {
  width: 38px; height: 38px; border-radius: 0; background: none;
  box-shadow: none; object-fit: contain; display: block;
}
.login-brand-mark {
  width: 44px; height: 44px; border-radius: 0; background: transparent;
  box-shadow: none; object-fit: contain; display: block;
}
.login-card-head { flex-direction: column; align-items: flex-start; gap: 8px; }
.login-card-logo { width: 210px; max-width: 100%; height: auto; display: block; }
.login-card-head .login-card-sub { margin-top: 0; }
@media (max-width: 480px) {
  .login-card-logo { width: 200px; }
  .brand-mark-img { width: 34px; height: 34px; }
  .login-brand-mark { width: 38px; height: 38px; }
  .boot-logo { width: 56px; height: 56px; }
}

/* ============================== v1.6 通知中心 ============================== */
.topbar-icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.topbar-icon-btn:hover { background: #F3F7F3; border-color: var(--line-strong); }
.notif-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; line-height: 1; box-shadow: 0 0 0 2px #fff;
}
.notif-badge[hidden] { display: none; }
.notif-item {
  display: flex; gap: 11px; width: 100%; text-align: left; background: #fff;
  border: 1px solid var(--line); border-left: 3px solid var(--green-600);
  border-radius: 10px; padding: 11px 12px; cursor: pointer;
}
.notif-item:hover { background: #F7FAF7; }
.notif-item.is-high, .notif-item.is-danger { border-left-color: var(--danger); }
.notif-item.is-warn { border-left-color: var(--warn); }
.notif-item-icon {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  background: #F1F6F2; display: grid; place-items: center; color: var(--green-700);
}
.notif-item-main { flex: 1; min-width: 0; }
.notif-item-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13.5px; }
.notif-kind {
  font-size: 10.5px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}
.notif-item-msg { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.notif-item-time { font-size: 11px; color: var(--muted-2); margin-top: 5px; }
.notif-item-action { flex: none; align-self: center; font-size: 12px; color: var(--green-700); font-weight: 600; white-space: nowrap; }

/* v1.6 移动端表格卡片化 */
@media (max-width: 640px) {
  .ds-table.table-cards { min-width: 0 !important; }
  .ds-table.table-cards thead { display: none; }
  .ds-table.table-cards tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr);
    gap: 6px; padding: 12px 13px; border-bottom: 1px solid var(--line-soft);
  }
  .ds-table.table-cards tbody tr:last-child { border-bottom: none; }
  .ds-table.table-cards tbody td {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    padding: 0; border: none; text-align: right; font-size: 13px;
  }
  .ds-table.table-cards tbody td::before {
    content: attr(data-label); flex: none; text-align: left;
    color: var(--muted); font-weight: 500; font-size: 12px;
  }
  .ds-table.table-cards tbody td.cell-num { text-align: right; }
  .ds-table.table-cards tbody td[data-label=""]::before { content: none; }
  .notif-item-action { display: none; }
  .notif-item-title { flex-wrap: wrap; }
}

/* ==========================================================================
   v1.7 文档智能分析报告
   ========================================================================== */
.insight-headline {
  padding: 13px 15px;
  background: linear-gradient(135deg, #F2F8F3 0%, #FCF9EF 100%);
  border: 1px solid #E2EDE3;
  border-left: 3px solid var(--green-600);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #1E3A2A;
}
.insight-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.insight-stat {
  min-width: 0; padding: 9px 11px;
  background: #F8FAF8; border: 1px solid var(--line-soft); border-radius: 10px;
}
.insight-stat .k { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insight-stat .v { margin-top: 2px; font-size: 17px; font-weight: 700; letter-spacing: -.2px; font-variant-numeric: tabular-nums; word-break: break-all; }
.insight-stat .s { margin-top: 1px; font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insight-stat.tone-warn .v { color: var(--warn); }
.insight-stat.tone-danger .v { color: var(--danger); }
.insight-stat.tone-ok .v { color: var(--ok); }
.insight-stat.tone-gold .v { color: #8A6A0D; }
.insight-subhead {
  display: flex; align-items: center; gap: 6px;
  margin: 2px 0 8px; font-size: 12px; font-weight: 650; color: var(--muted);
}
.insight-risks { display: grid; gap: 8px; }
.insight-risk {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px; background: #FFF;
  border: 1px solid var(--line); border-left: 3px solid #A8B5AA; border-radius: 10px;
}
.insight-risk.is-high { border-left-color: var(--danger); background: #FEF9F6; }
.insight-risk.is-medium { border-left-color: var(--warn); background: #FFFCF6; }
.insight-risk.is-low { border-left-color: #A8B5AA; background: #FAFBFA; }
.insight-risk-main { flex: 1; min-width: 0; }
.insight-risk-title { font-size: 13px; font-weight: 650; }
.insight-risk-detail { margin-top: 2px; font-size: 12px; line-height: 1.65; color: var(--muted); }
.insight-suggestions { display: grid; gap: 8px; }
.insight-suggestion {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; background: #F8FAF8;
  border: 1px solid var(--line-soft); border-radius: 10px;
}
.insight-suggestion .main { flex: 1; min-width: 0; }
.insight-suggestion .title { font-size: 12.8px; font-weight: 650; }
.insight-suggestion .detail { margin-top: 2px; font-size: 12px; line-height: 1.65; color: var(--muted); }
.insight-profile { display: flex; flex-wrap: wrap; gap: 6px; }
.nego-list { display: grid; gap: 8px; }
.nego-item {
  display: grid; gap: 8px;
  padding: 10px 12px; background: #FFF;
  border: 1px solid var(--line); border-left: 3px solid #A8B5AA; border-radius: 10px;
}
.nego-item.is-high { border-left-color: var(--danger); background: #FEF9F6; }
.nego-item.is-low { border-left-color: var(--warn); background: #FFFCF6; }
.nego-item.is-fair { border-left-color: var(--ok); background: #F8FBF8; }
.nego-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nego-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; min-width: 0; }
.nego-prices { display: flex; gap: 18px; }
.nego-price { display: flex; flex-direction: column; align-items: flex-end; }
.nego-price .k { font-size: 10.5px; color: var(--muted); }
.nego-price .v { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nego-price.is-target .v { color: var(--green-600); }
.nego-range { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nego-range .range-viz { flex: 1; min-width: 160px; margin: 0; }
.nego-range-text { white-space: nowrap; }
.nego-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nego-advice { flex: 1; min-width: 200px; font-size: 12px; line-height: 1.65; color: var(--muted); }
.nego-saving { display: flex; align-items: center; gap: 8px; }
.insight-mini {
  padding: 11px 13px; border: 1px solid #E2EDE3; border-radius: 11px;
  background: linear-gradient(135deg, #F3F8F4 0%, #FCF9EF 100%);
}
.insight-mini-head { display: flex; align-items: flex-start; gap: 8px; }
.insight-mini-headline { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.7; color: #24402F; }
.insight-mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.insight-mini-stat { min-width: 0; padding: 6px 8px; background: #FFF; border: 1px solid var(--line-soft); border-radius: 8px; }
.insight-mini-stat .k { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insight-mini-stat .v { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.insight-mini-stat.tone-warn .v { color: var(--warn); }
.insight-mini-stat.tone-danger .v { color: var(--danger); }
.insight-mini-stat.tone-gold .v { color: #8A6A0D; }
.insight-mini-risks { display: grid; gap: 4px; margin-top: 8px; }
.insight-mini-risk { display: flex; align-items: flex-start; gap: 5px; font-size: 11.8px; line-height: 1.6; color: #7A4A17; }
.insight-mini-risk.is-low { color: var(--muted); }
.insight-mini-range { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11.5px; color: #8A6A0D; }
.insight-mini-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
@media (max-width: 900px) {
  .insight-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .insight-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insight-suggestion { flex-wrap: wrap; }
  .insight-suggestion .btn { width: 100%; }
  .insight-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nego-prices { width: 100%; justify-content: space-between; }
  .nego-price { align-items: flex-start; }
  .nego-range-text { white-space: normal; }
}
