:root {
  /* ---- 设计令牌：严格对齐参考图「Softr 学习平台」样式 ----
     页面底：浅灰紫 #E5E7EE
     侧边栏：#191726（接近 black but soft）
     主面板：纯白圆角 32
     圆角分层：--radius-sm=12px(按钮/输入框)，--radius=24px(卡片)，--radius-xl=32px(主面板)
     大投影：0 8px 32px rgba(0,0,0,.08)
     hero 渐变：#2A2640 → #16152B
     课程卡配色：紫 #C7B6F2 / 橙 #FAB796 / 青黄 #C8E14F
     Virtual School 蓝：#1F2E5C / #2A2D52
  */
  --primary: #2F2B57;
  --primary-dark: #1F1B3D;
  --primary-light: #EEF0FF;
  --bg: #E5E7EE;
  --panel-bg: #FFFFFF;
  --card: #FFFFFF;
  --border: #ECEEF3;
  --border-strong: #D8DBE6;
  --text: #2E2349;
  --text-light: #5C5077;
  --text-muted: #9C93B2;
  --placeholder: #A8A2BF;
  --danger: #E5484D;
  --danger-light: #FCE9EA;
  --warn: #E89432;
  --warn-light: #FFF4E5;
  --ok: #34B17B;
  --ok-light: #E5F6EF;
  --shadow: 0 2px 8px rgba(46, 35, 73, .05);
  --shadow-md: 0 8px 24px rgba(46, 35, 73, .08);
  --shadow-lg: 0 16px 48px rgba(46, 35, 73, .12);
  --radius: 24px;
  --radius-sm: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --surface-2: #F1F2F6;   /* 中性浅灰底：输入框/分段控件/标签/进度条底 */
  --bg-soft: #F4F5F9;     /* 浅灰软底：汇总条/分录区/悬停行 */
  --sidebar-bg: #191726;
  --sidebar-fg: #B7B4C9;
  --sidebar-fg-active: #FFFFFF;
  --hero-bg-1: #2A2640;
  --hero-bg-2: #16152B;
  --course-purple: #C7B6F2;
  --course-orange: #FAB796;
  --course-lime:   #C8E14F;
  --vs-blue-1: #2A2D52;
  --vs-blue-2: #1F2E5C;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
button { cursor: pointer; border: none; font-family: inherit; }
select, input { font-family: inherit; }

/* 键盘可达性：focus-visible 统一焦点环 */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============ 登录页 ============ */
/* 企业简洁风：登录页用 slate-50 纯色底，不用渐变（规范禁止渐变背景） */
.login-page {
  height: 100vh; display: flex; align-items: center; justify-content: center;
  padding-bottom: 8vh; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}
/* 装饰几何：4 个柔和半透明形状（脱敏不卡通） */
.login-page::before, .login-page::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.login-page::before {
  width: 320px; height: 320px; top: -80px; right: -60px;
  background: radial-gradient(circle, #dbeafe 0%, #bfdbfe 100%);
  opacity: .55;
}
.login-page::after {
  width: 240px; height: 240px; bottom: -40px; left: -40px;
  background: radial-gradient(circle, #ddd6fe 0%, #c4b5fd 100%);
  opacity: .45;
}
.login-page .deco-1, .login-page .deco-2 {
  position: absolute; border-radius: 12px; pointer-events: none;
}
.login-page .deco-1 {
  width: 90px; height: 90px; top: 18%; right: 12%;
  background: #fde68a; opacity: .35; transform: rotate(15deg);
}
.login-page .deco-2 {
  width: 60px; height: 60px; bottom: 22%; left: 14%;
  background: #fbcfe8; opacity: .45; transform: rotate(-25deg);
  border-radius: 50%;
}
.login-card {
  background: var(--card); padding: 40px; border-radius: var(--radius);
  width: 380px; box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.brand-logo {
  width: 48px; height: 48px; border-radius: var(--radius-sm); margin: 0 auto 12px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
}
.login-brand h1 { font-size: 22px; }
.subtitle { color: #475569; margin-top: 6px; font-size: 13px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text-light); font-size: 13px; }
.form-group input, .form-group select {
  width: 100%; padding: 12px 14px; min-height: 44px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 14px; outline: none; background: var(--surface-2); color: var(--text);
  transition: border-color .15s ease-out, box-shadow .15s ease-out;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--primary); background: var(--card);
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4px rgba(37, 99, 235, .18);
}
/* 规范：active 用 scale(.98) 传达"已按下"，比 translateY 更明确 */
.btn-primary {
  width: 100%; padding: 12px; min-height: 44px; background: var(--primary); color: #fff;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 500;
  box-shadow: var(--shadow);
  transition: background .15s ease-out, transform .15s ease-out, box-shadow .15s ease-out;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0) scale(.98); box-shadow: var(--shadow); }
.btn-feishu {
  width: 100%; padding: 12px; min-height: 44px; background: #1f7ff0; color: #fff;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; box-shadow: var(--shadow);
  transition: background .15s ease-out, transform .15s ease-out, box-shadow .15s ease-out;
}
.btn-feishu:hover { background: #1a6fd6; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-feishu:active { transform: translateY(0) scale(.98); }
.login-divider { display: flex; align-items: center; margin: 16px 0; color: var(--text-muted); }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-divider span { padding: 0 12px; font-size: 12px; }
.login-msg { color: var(--danger); text-align: center; margin-top: 12px; min-height: 20px; font-size: 13px; }
.login-copyright { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 20px; }

/* ============ 顶部栏（主区顶部，参考图风格）============ */
.topbar {
  height: 72px; background: transparent; display: flex; align-items: center;
  justify-content: space-between; padding: 4px 8px 18px; gap: 24px;
  position: sticky; top: 0; z-index: 10;
}
/* 大搜索框 */
.topbar-search {
  flex: 1; max-width: 480px; position: relative;
}
.topbar-search input {
  width: 100%; height: 48px; padding: 0 20px 0 48px;
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 16px; font-size: 14px; color: var(--text);
  box-shadow: var(--shadow); outline: none;
  transition: box-shadow .15s ease-out, border-color .15s ease-out;
}
.topbar-search input::placeholder { color: var(--placeholder); }
.topbar-search input:focus { border-color: var(--primary); box-shadow: var(--shadow-md); }
.topbar-search .search-ico {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: var(--text-muted); pointer-events: none;
}
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.topbar-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--panel-bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 16px; cursor: pointer;
  box-shadow: var(--shadow); transition: background .15s, color .15s;
}
.topbar-icon:hover { background: var(--bg); color: var(--text); }
.topbar-avatar {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, #C7B6F2, #FAB796);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow); margin-left: 6px;
}

/* ============ 布局 ============ */
.layout { display: flex; min-height: calc(100vh - 60px); background: var(--bg); }
.sidebar {
  width: 248px; background: var(--sidebar-bg); flex-shrink: 0;
  padding: 32px 24px 24px; color: var(--sidebar-fg);
  display: flex; flex-direction: column;
  border-radius: 0 32px 32px 0;
  height: calc(100vh - 36px); margin: 18px 0 18px 18px;
  position: sticky; top: 18px; align-self: flex-start;
  overflow: hidden;
}
.sidebar-logo {
  font-size: 22px; font-weight: 700; color: #fff;
  letter-spacing: -.02em; margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.sidebar-logo .logo-mark {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(135deg, #C7B6F2, #FAB796);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(199, 182, 242, .35);
}
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  margin: 0 -24px;
  padding: 0 24px;
}
.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18);
  border-radius: 4px;
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.28);
}
.nav-group { margin-bottom: 18px; }
.nav-group-title {
  font-size: 11px; color: rgba(255,255,255,.42); padding: 4px 12px 8px;
  letter-spacing: 1.2px; font-weight: 600; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  color: var(--sidebar-fg); text-decoration: none; border-radius: 14px;
  margin-bottom: 4px; font-size: 14px; font-weight: 500;
  transition: background .15s ease-out, color .15s ease-out;
  position: relative;
}
.nav-ico {
  width: 20px; height: 20px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, #3A375F 0%, #2A2640 100%);
  color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.nav-item.active .nav-ico { color: var(--course-lime); }
.nav-item .nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 可展开子菜单（产品知识库按治疗领域） ---- */
.nav-parent { cursor: pointer; }
.nav-parent .nav-arrow {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,.45);
  transition: transform .2s ease-out, color .2s;
}
.nav-parent:hover .nav-arrow { color: rgba(255,255,255,.75); }
.nav-parent.open .nav-arrow { transform: rotate(90deg); color: #fff; }
.nav-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease-out;
  padding-left: 18px;
  margin: 0 -14px 0 0;
  border-left: 1px dashed rgba(255,255,255,.12);
}
.nav-submenu.open {
  max-height: 600px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.nav-submenu::-webkit-scrollbar { width: 4px; }
.nav-submenu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.16);
  border-radius: 3px;
}
.nav-submenu .nav-item {
  padding: 9px 14px 9px 28px;
  font-size: 13px;
  border-radius: 12px;
  margin-bottom: 2px;
  position: relative;
}
.nav-submenu .nav-item::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
}
.nav-submenu .nav-item:hover { background: rgba(255,255,255,.06); }
.nav-submenu .nav-item.active {
  background: rgba(199, 182, 242, .22);
  color: #fff;
  font-weight: 600;
}
.nav-submenu .nav-item.active::before {
  background: var(--course-lime);
  box-shadow: 0 0 0 3px rgba(200, 225, 79, .2);
}
.nav-submenu .nav-count {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.08);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
}
.nav-submenu .nav-item.active .nav-count {
  color: #fff;
  background: rgba(255,255,255,.18);
}
.nav-parent.active {
  background: linear-gradient(135deg, #3A375F 0%, #2A2640 100%);
  color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.nav-parent.active .nav-ico { color: var(--course-lime); }

/* ---- 子菜单内的分组小标题（财务会计等项较多的板块） ---- */
.nav-sub-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: rgba(255,255,255,.32); text-transform: uppercase;
  padding: 10px 14px 4px 28px;
}
.nav-sub-label:first-child { padding-top: 3px; }
/* 财务会计子菜单项较多，放宽展开高度（超出仍可滚动） */
#nav-submenu-finance.open { max-height: 980px; }

.sidebar-spacer { flex: 1; }
.sidebar-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
  margin-top: 8px;
}
.sidebar-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #C7B6F2, #FAB796);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.sidebar-user { font-size: 13px; line-height: 1.4; }
.sidebar-user .u-name { color: #fff; font-weight: 600; }
.sidebar-user .u-role { color: var(--text-muted); font-size: 11px; }

.content { flex: 1; padding: 18px 28px 28px; overflow-x: auto; min-width: 0; }

/* ============ 视图头 ============ */
/* 参考图：view 直接是大白面板，不一定有 view-head 边框，让 dashboard/子页根据需要使用 */

/* ============ Tab ============ */
.tab-bar { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: var(--radius); width: fit-content; margin-bottom: 16px; }
.tab {
  padding: 8px 20px; border-radius: 8px; background: transparent; color: var(--text-light);
  font-size: 14px; font-weight: 500; transition: all .15s;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .5); }
.tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }

/* Tab 上的状态角标（如「月更新」显示待清除条数） */
.tab-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  background: var(--danger); color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 700; line-height: 1.6;
  font-variant-numeric: tabular-nums; vertical-align: middle;
}

/* ============ 看板筛选栏 ============ */
.dash-filters {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px;
}
.df-group { display: flex; flex-direction: column; gap: 6px; }
.df-group label { font-size: 12px; color: var(--text-muted); font-weight: 600; letter-spacing: .3px; }
.df-group select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text); outline: none;
  min-width: 130px; max-width: 200px; height: 38px;
}
.df-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }

/* 分段控件（按月 / 按周） */
.seg-ctrl { display: inline-flex; background: var(--bg); border-radius: 8px; padding: 3px; gap: 2px; }
.seg {
  padding: 7px 18px; border-radius: 6px; background: transparent;
  color: var(--text-light); font-size: 13px; font-weight: 500;
  transition: all .15s; height: 32px;
}
.seg:hover { color: var(--text); }
.seg.active { background: var(--primary); color: #fff; font-weight: 600; }

.h3-note { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-left: 8px; }

/* ============ AI 分析页：筛选 + 问答窗口 ============ */
.ai-filters {
  display: flex; align-items: flex-end; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px;
}
.ai-filters .df-group { display: flex; flex-direction: column; gap: 6px; }
.ai-filters .df-group label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.ai-filters .df-group select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text); outline: none;
  min-width: 140px; height: 38px;
}

.ai-chat {
  margin-top: 18px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column;
  height: 480px;
}
.ai-chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.ai-chat-title { font-weight: 600; font-size: 14px; }
.ai-chat-msgs { flex: 1; padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.ai-msg { max-width: 88%; display: flex; flex-direction: column; }
.ai-msg-user { align-self: flex-end; align-items: flex-end; }
.ai-msg-bot { align-self: flex-start; align-items: flex-start; }
.ai-msg-from { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; padding: 0 4px; }
.ai-msg-text {
  padding: 10px 14px; border-radius: var(--radius); line-height: 1.65;
  font-size: 14px; word-break: break-word;
}
.ai-msg-user .ai-msg-text { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg-bot  .ai-msg-text { background: var(--bg); color: var(--text); border-bottom-left-radius: 4px; }
.ai-msg-sug { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.ai-sug-chip {
  background: var(--primary-light); color: var(--primary);
  padding: 4px 10px; border-radius: 14px; font-size: 12px; border: none;
  cursor: pointer; transition: all .15s;
}
.ai-sug-chip:hover { background: var(--primary); color: #fff; }
.ai-sug-chip.small { font-size: 11px; padding: 3px 8px; }

.ai-chat-input {
  display: flex; gap: 8px; padding: 10px 16px;
  border-top: 1px solid var(--border); background: var(--bg);
}
.ai-chat-input input {
  flex: 1; padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 20px; font-size: 14px; outline: none; background: var(--card);
}
.ai-chat-input input:focus { border-color: var(--primary); }
.ai-chat-input button { padding: 8px 18px; }
.ai-chat-sug {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 12px;
  border-top: 1px solid var(--border); background: var(--bg);
}

/* ============ 可折叠子栏目 ============ */
.subpanel {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.subpanel-head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; cursor: pointer;
  transition: background .15s; user-select: none;
}
.subpanel-head:hover { background: var(--bg); }
.subpanel-arrow { font-size: 12px; color: var(--primary); transition: transform .2s; }
.subpanel.open .subpanel-arrow { transform: rotate(90deg); }
.subpanel-title { font-weight: 600; font-size: 15px; }
.subpanel-note { font-size: 12px; color: var(--text-muted); }
.subpanel-body { padding: 16px 18px; border-top: 1px solid var(--border); background: var(--bg); }
.subpanel-charts { display: grid; gap: 16px; grid-template-columns: 1fr; }
.subpanel-charts .chart-row { display: grid; gap: 16px; grid-template-columns: 2fr 1fr; }
.subpanel-charts .panel { background: var(--card); }
.subpanel-charts .chart-box { height: 260px; }

/* ============ 部门汇总卡片（「按部门」视图） ============ */
.dept-cards {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.dept-card {
  min-width: 150px; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--card); cursor: pointer; box-shadow: var(--shadow);
  transition: transform .18s ease-out, box-shadow .18s ease-out, border-color .18s ease-out;
}
/* 规范：不用单侧色条装饰，改用边框色 + 浅底表达选中态 */
.dept-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.dept-card.active { border-color: var(--primary); background: var(--primary-light); }
.dept-card.active .dc-name { color: var(--primary-dark); }
.dept-card .dc-name { font-size: 14px; font-weight: 600; color: var(--text); }
.dept-card .dc-count { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.dept-card .dc-amount { font-size: 16px; font-weight: 600; color: var(--primary); margin-top: 6px; }
.dept-card .dc-qty { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ============ 卡片 / 面板 ============ */
.panel {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.panel-flush { padding: 16px; }
/* 规范：标题前不放色条/装饰，靠字重与字号建立层级 */
.panel h3 { margin-bottom: 14px; font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============ 统计卡片 ============ */
.stat-cards { display: flex; gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); padding: 22px 24px; flex: 1;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .2s ease-out, box-shadow .2s ease-out, background .2s ease-out;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px;
  border-radius: 50%; opacity: .25; transition: opacity .2s ease-out;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card:hover::after { opacity: .35; }
/* 规范：hover 上浮 2px + 阴影 sm→md，不用色条 */
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card .num { font-size: 32px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
.stat-card .label { color: var(--text-light); margin-top: 6px; font-size: 13px; }
/* 状态靠文字色表达（对比度满足 WCAG AA），不用色条 */
.stat-card.danger { background: var(--danger-light); border-color: #fecaca; }
.stat-card.danger .num { color: #b91c1c; }
.stat-card.danger::after { background: #dc2626; }
.stat-card.warn { background: var(--warn-light); border-color: #fde68a; }
.stat-card.warn .num { color: #b45309; }
.stat-card.warn::after { background: #d97706; }
.stat-card.primary .num { color: var(--primary); }
.stat-card.ok { background: var(--ok-light); border-color: #bbf7d0; }
.stat-card.ok .num { color: #15803d; }
.stat-card.ok::after { background: #16a34a; }
.stat-card .num { font-variant-numeric: tabular-nums; }

/* ============ 筛选 ============ */
.filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select {
  padding: 9px 12px; min-height: 40px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px;
  background: var(--card); color: var(--text); outline: none; min-width: 130px;
  transition: border-color .2s, box-shadow .2s;
}
.filters input:focus, .filters select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .18);
}
.filters .btn-primary { width: auto; padding: 9px 22px; min-height: 40px; }

/* ============ 表格 ============ */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { background: var(--surface-2); color: var(--text-muted); font-weight: 600; font-size: 12px; letter-spacing: 0.02em; text-transform: uppercase; }
.table tbody tr { transition: background .12s; }
/* 规范：行悬停用中性灰 gray-50，不用浅蓝（浅蓝会干扰密集数据阅读） */
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:nth-child(even) { background: var(--surface-2); }
.table tbody tr:nth-child(even):hover { background: var(--surface-2); }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); max-height: 75vh; }
.table th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--border); }
.table-dense th, .table-dense td { padding: 8px 10px; font-size: 13px; }
.total-hint { color: var(--text-light); margin: 10px 0; font-size: 13px; }

/* 财务过滤栏 + 输入控件 */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 4px; }
.inp { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--surface); color: var(--text); min-width: 120px; }
.inp:focus { outline: none; border-color: var(--primary); }
.filter-bar .btn-primary { width: auto; padding: 9px 22px; min-height: 40px; margin-left: auto; }
.filter-bar .btn-primary.gl-no-auto { margin-left: 0; }
.fb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.fb-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text); cursor: pointer; user-select: none; }
.fb-check input { width: 15px; height: 15px; accent-color: var(--primary); }
/* 报表「包含未过账凭证」开关 */
.inc-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text); cursor: pointer; user-select: none; white-space: nowrap; }
.inc-check input { width: 15px; height: 15px; accent-color: var(--primary); }
.inc-check:has(input:checked) { color: var(--primary); font-weight: 600; }
.fb-count { margin-left: auto; font-size: 12px; white-space: nowrap; }

/* ============ 记账凭证：金蝶式查询窗口 ============ */
.glv-bar { align-items: center; }
.glv-bar .inp-sm { min-width: 94px; width: 94px; flex: 0 0 auto; }
.glv-lbl { font-size: 13px; color: var(--text-light); white-space: nowrap; }
.glv-tilde { color: var(--text-light); margin: 0 -4px; }
.glv-bar .glv-subtotal { margin-left: 4px; }
.glv-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 6px; }
.glv-toolbar .btn-outline { padding: 7px 16px; }
.glv-toolbar .btn-outline.danger { color: var(--danger); border-color: var(--danger); }
.glv-toolbar .btn-outline.danger:hover { background: var(--danger); color: #fff; }
.glv-sel { margin-left: auto; font-size: 12.5px; color: var(--primary); font-weight: 600; white-space: nowrap; }
.glv-table { font-variant-numeric: tabular-nums; }
.glv-table th.glv-chk, .glv-table td.glv-chk { width: 34px; text-align: center; }
.glv-table th.glv-chk input { width: 15px; height: 15px; accent-color: var(--primary); }
.glv-table th.glv-ops, .glv-table td.glv-ops { white-space: nowrap; }
.glv-table td.glv-ops .btn-link { padding: 0 5px; }
.glv-table td.num { text-align: right; }
.glv-sub-row { background: var(--surface-2, #f7f9fb); }
.glv-sub-row td { font-weight: 600; color: var(--text-strong); border-top: 1px solid var(--border); }
.glv-sub-row td.num { font-style: italic; }
/* 导入弹窗 */
.glv-imp-step { font-size: 13px; color: var(--text); line-height: 1.6; margin: 10px 0 6px; }
.glv-imp-step b { color: var(--primary); }
.glv-imp-msg { margin-top: 12px; font-size: 13px; white-space: pre-wrap; line-height: 1.6; color: var(--text-light); min-height: 18px; }

/* ============ 产品目录（表格台账） ============ */
.cat-bar { margin-top: 14px; }
.cat-bar .inp-sm { min-width: 120px; width: auto; }
.cat-bar #cat-q { flex: 1 1 180px; min-width: 160px; }
#cat-table th.cat-sortable { cursor: pointer; user-select: none; position: relative; }
#cat-table th.cat-sortable:hover { color: var(--text); background: var(--surface-3, #eef1f6); }
#cat-table th.cat-sortable::after {
  content: "⇅"; opacity: .35; margin-left: 4px; font-size: 11px;
}
#cat-table th.sort-asc::after { content: "▲"; opacity: 1; color: var(--primary); }
#cat-table th.sort-desc::after { content: "▼"; opacity: 1; color: var(--primary); }
#cat-table td.cat-name { font-weight: 600; color: var(--text-strong); }
#cat-table .cat-row { cursor: pointer; }
#cat-table .cat-row:hover { background: var(--surface-2, #f7f9fb); }
#cat-table td .pro-level { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; }
#cat-table td .pro-level-A { background: rgba(46,204,113,.16); color: #1f9d57; }
#cat-table td .pro-level-B { background: rgba(52,152,219,.16); color: #2a7fb8; }

/* ============ 科目余额表：金蝶式筛选面板 ============ */
.inp-sm { min-width: 94px; width: 94px; flex: 0 0 auto; }
.gl-filter-wrap { position: relative; }
.filter-bar.glab-bar { margin-bottom: 6px; row-gap: 8px; }
.glab-bar #glab-kw { flex: 1 1 150px; min-width: 130px; }
.glab-bar #glab-count { margin-left: auto; }
.glab-period-label { font-size: 13px; color: var(--text-light); white-space: nowrap; }
.glab-tilde { color: var(--text-muted); }
.glab-filter-btn { display: inline-flex; align-items: center; gap: 6px; }
.glab-filter-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.glab-filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--primary); color: #fff; font-size: 11px; line-height: 1; font-weight: 600;
}
.fb-count.glab-filtered { color: var(--primary); font-weight: 600; }

.gl-filter-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  width: 466px; max-width: 94vw; padding: 18px 20px 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.gl-fp-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gl-fp-label { width: 68px; flex: 0 0 68px; font-size: 13px; color: var(--text); text-align: right; }
.gl-fp-input { flex: 1; min-width: 0; }
.gl-fp-duo { flex: 1; display: flex; gap: 8px; min-width: 0; }
.gl-fp-duo > .inp { flex: 1; min-width: 0; }
.gl-fp-checks {
  margin: 14px 0 2px; padding-top: 12px; border-top: 1px dashed var(--border);
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px;
}
.gl-fp-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; user-select: none; }
.gl-fp-check input { width: 15px; height: 15px; accent-color: var(--primary); }
.gl-fp-row-unposted {
  margin-bottom: 12px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.gl-fp-unposted { font-weight: 600; }
.gl-fp-hint { font-weight: 400; font-size: 12px; color: var(--muted); }
.gl-fp-foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; justify-content: center; gap: 14px;
}
.gl-fp-foot .btn-primary, .gl-fp-foot .btn-outline {
  width: auto; flex: 0 0 auto; min-width: 108px; justify-content: center;
  padding: 9px 26px; min-height: 40px;
}

/* 辅助核算列 / 类别小计行 / 禁用行 */
/* 12 列较宽：收紧内边距，保证「期末余额 + 方向」在常规屏宽下不被挤出 */
#glab-table th, #glab-table td { padding: 10px 9px; }
#glab-table td.num, #glab-table th.num { padding-left: 5px; }
#glab-table.hide-aux .glab-aux-cell { display: none; }
.glab-aux-tag {
  display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11px;
  background: var(--primary-light); color: var(--primary); border: 1px solid transparent;
}
.glab-subrow { background: var(--bg-soft); font-weight: 600; }
.glab-subrow .glab-sub-label { text-align: right; padding-right: 10px; color: var(--text); }
.glab-disabled-row td { opacity: .5; }
.glab-toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-12px);
  padding: 9px 20px; border-radius: 8px; font-size: 13px; z-index: 9999;
  background: var(--primary); color: #fff; opacity: 0; pointer-events: none;
  box-shadow: var(--shadow-md); transition: opacity .18s, transform .18s;
}
.glab-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 跟进表表头分组（保留浅色区分，但降饱和以符合企业风） */
.grp-sales { background: #eff6ff !important; color: var(--primary-dark) !important; }
.grp-amount { background: var(--ok-light) !important; color: #15803d !important; }
th.sub { background: var(--surface-2); color: var(--text-muted); font-size: 12px; font-weight: 500; }
.sticky-col {
  font-weight: 600;
  position: sticky; left: 0; z-index: 1;
  background: var(--card);
}
/* 表头首列同步固定，避免横向滚动时列头错位 */
.table thead th:first-child { position: sticky; left: 0; z-index: 3; }

/* ============ 分页 ============ */
.pagination { display: flex; gap: 10px; margin-top: 16px; align-items: center; justify-content: flex-end; }
.pagination button {
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); font-size: 13px;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); box-shadow: 0 2px 6px rgba(37, 99, 235, .15); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination .page-info { color: var(--text-light); font-size: 13px; }

/* ============ 状态标签 ============ */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; line-height: 1.5; }
.tag.pending { background: var(--warn-light); color: var(--warn); }
.tag.blank { background: var(--danger-light); color: var(--danger); }
.tag.matched { background: var(--ok-light); color: var(--ok); }
.tag.new { background: var(--primary-light); color: var(--primary); }

/* 行内复选筛选 */
.chk-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); cursor: pointer; user-select: none; }
.chk-inline input { width: 15px; height: 15px; accent-color: var(--primary); }

/* 新组合待匹配角标（看板 + 侧栏导航） */
.nc-badge { display: none; margin-left: 8px; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--primary-light); color: var(--primary); cursor: pointer; }
.nav-badge { display: none; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* ============ 按钮小号 ============ */
.btn-sm {
  width: auto; padding: 6px 14px; font-size: 13px; border-radius: var(--radius-sm);
  min-height: 32px; font-weight: 500;
  transition: background .15s ease-out, transform .15s ease-out, box-shadow .15s ease-out, color .15s ease-out;
}
.btn-sm:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-sm:active { transform: translateY(0) scale(.98); }

/* ============ 点数管理板块 ============ */
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 13px; font-weight: 500; padding: 2px 4px; border-radius: 4px; }
.btn-link:hover { color: var(--ok); text-decoration: underline; }
.caret { display: inline-block; color: var(--text-muted); font-size: 12px; min-width: 14px; }

/* 次级按钮（导出等） */
.btn-outline {
  width: auto; padding: 9px 18px; min-height: 40px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--text); font-size: 14px; font-weight: 500;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-outline:hover { border-color: var(--ok); color: var(--ok); background: var(--ok-light); }
[data-theme="dark"] .btn-outline { background: transparent; }
[data-theme="dark"] .btn-outline:hover { background: var(--ok-light); }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; background: rgba(16, 24, 40, .5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-card { background: #fff; border-radius: var(--radius); width: 520px; max-width: 94vw; box-shadow: var(--shadow-lg); }
.modal-box { background: #fff; border-radius: var(--radius); width: 460px; max-width: 94vw; box-shadow: var(--shadow-lg); overflow: hidden; }
[data-theme="dark"] .modal-box { background: #161b26; }
.modal-title { font-size: 16px; font-weight: 700; color: var(--text-strong, #1a1f2e); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-close { background: transparent; font-size: 24px; color: var(--text-light); line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }
.modal-foot .btn-primary { width: auto; padding: 9px 24px; }

/* 调价弹窗表单 */
.pf-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.pf-row > label { width: 76px; flex-shrink: 0; color: var(--text-muted); font-size: 13px; padding-top: 9px; }
.pf-val { font-weight: 600; padding-top: 9px; word-break: break-all; }
.pf-input { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; min-width: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.edit-info { background: var(--bg); border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; line-height: 1.8; color: var(--text-light); font-size: 13px; }
.edit-info b { color: var(--text); }

/* ============ 上传区（周更新 / 月更新，Tab 切换） ============ */
.upload-card { max-width: 680px; }
.upload-card-head {
  display: flex; gap: 12px; align-items: flex-start;
  padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border);
}
.upload-card-head h3 { margin-bottom: 0; font-size: 15px; }
.upload-card-sub { color: var(--text-muted); font-size: 12px; margin-top: 4px; line-height: 1.5; }
.upload-card-ico {
  width: 38px; height: 38px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.upload-card-head.weekly .upload-card-ico { background: var(--primary-light); }
.upload-card-head.monthly .upload-card-ico { background: var(--warn-light); }

.upload-zone {
  border: 2px dashed var(--border); border-radius: 12px; padding: 32px 20px;
  text-align: center; cursor: pointer; transition: all .2s;
}
.upload-zone:hover { border-color: var(--primary); background: #fafbff; }
.upload-icon { font-size: 36px; margin-bottom: 8px; }
.upload-hint { color: var(--text-light); margin-bottom: 16px; word-break: break-all; }
.upload-result { margin-top: 14px; }

/* 月更新：月份选择 + 删除预览 */
.month-row { display: flex; gap: 8px; align-items: center; }
.month-row select { flex: 1; min-width: 0; }
.btn-outline {
  background: transparent; border: 1px solid var(--primary); color: var(--primary);
  white-space: nowrap;
}
.btn-outline:hover { background: var(--primary-light); }
.btn-danger {
  background: var(--danger); color: #fff; white-space: nowrap;
}
.btn-danger:hover { background: #cf3b40; }
.upload-preview {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; margin-bottom: 14px; font-size: 13px;
}
.preview-warn {
  color: var(--warn); font-weight: 500; line-height: 1.6;
}
.preview-warn b { color: var(--danger); }
.preview-empty { color: var(--text-muted); }

/* ============ 提醒铃铛 ============ */
.notify-bell { position: relative; cursor: pointer; font-size: 18px; padding: 4px; }
.notify-count {
  position: absolute; top: -2px; right: -6px; background: var(--danger); color: #fff;
  border-radius: 10px; font-size: 11px; padding: 1px 6px; min-width: 18px; text-align: center;
}

/* ============ 加载状态 ============ */
.loading-mask {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 40px 0; color: var(--text-light); font-size: 14px;
}
.spinner {
  width: 20px; height: 20px; border: 3px solid var(--primary-light);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 空状态 ============ */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px; color: var(--text-muted); text-align: center;
}
.empty-state .empty-ico { font-size: 40px; margin-bottom: 12px; opacity: .6; }
.empty-state .empty-title { font-size: 15px; color: var(--text-light); margin-bottom: 4px; }
.empty-state .empty-hint { font-size: 13px; }

/* ============ 深色模式 ============ */
/* 深色模式：使用语义 token（规范禁止直接反相浅色主题）。
   圆角继承浅色（8/12 分层不变），阴影按深色调整，主色提亮以满足对比度。 */
[data-theme="dark"] {
  --bg: #0f1523;
  --surface-2: #141b2a;
  --bg-soft: #161d2c;
  --card: #1a2234;
  --border: #2a3548;
  --border-strong: #3a4761;
  --text: #e6eaf2;
  --text-light: #b4bfd0;
  --text-muted: #8892a6;
  --placeholder: #5a6478;
  --primary: #4d82ff;
  --primary-dark: #6a9cff;
  --primary-light: #1e2c4d;
  --danger: #f2555a;
  --danger-light: #3a2225;
  --warn: #ffb020;
  --warn-light: #3a2e1a;
  --ok: #34c17b;
  --ok-light: #1c2e27;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, .5), 0 2px 4px -2px rgba(0, 0, 0, .4);
  --shadow-lg: var(--shadow-md);
}
[data-theme="dark"] body { color-scheme: dark; }
[data-theme="dark"] .table th { background: #161d2c; }
[data-theme="dark"] .table tbody tr:nth-child(even) { background: #171f30; }
[data-theme="dark"] .table tbody tr:hover { background: #24304a; }
[data-theme="dark"] .table tbody tr:nth-child(even):hover { background: #24304a; }
[data-theme="dark"] .tab-bar { background: #141b2a; }
[data-theme="dark"] .tab.active { background: #2a3548; color: #6a9cff; }
[data-theme="dark"] .tab:hover { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .login-card { border-color: #2a3548; }
[data-theme="dark"] .upload-zone:hover { background: #161d2c; }
[data-theme="dark"] .edit-info { background: #0f1523; }
[data-theme="dark"] th.sub { background: #161d2c; }
[data-theme="dark"] .grp-sales { background: #1e2c4d !important; color: #6a9cff !important; }
[data-theme="dark"] .grp-amount { background: #1c2e27 !important; color: #34c17b !important; }
[data-theme="dark"] .stat-card.danger { border-color: #5a2a2d; }
[data-theme="dark"] .stat-card.warn { border-color: #5a4a1a; }
[data-theme="dark"] .stat-card.ok { border-color: #1c4a35; }

/* 主题切换按钮 */
.theme-toggle {
  background: transparent; border: none; font-size: 17px; cursor: pointer;
  padding: 6px; border-radius: 8px; transition: background .15s; line-height: 1;
}
.theme-toggle:hover { background: var(--bg); }

/* ============ AI 分析报告 ============ */
.analysis-text p { margin-bottom: 8px; line-height: 1.8; color: var(--text-light); }
.analysis-text b { color: var(--text); }
.issue-list { list-style: none; padding: 0; }
.issue-list li {
  padding: 10px 12px; margin-bottom: 8px; background: var(--warn-light);
  border-left: 3px solid var(--warn); border-radius: 6px; font-size: 13px; line-height: 1.6;
}
.suggest-list { list-style: none; padding: 0; }
.suggest-list li {
  padding: 10px 14px; margin-bottom: 8px; background: var(--ok-light);
  border-left: 3px solid var(--ok); border-radius: 6px; font-size: 13px; line-height: 1.6;
}
[data-theme="dark"] .issue-list li { background: var(--warn-light); }
[data-theme="dark"] .suggest-list li { background: var(--ok-light); }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .sidebar { width: 60px; padding: 16px 8px; }
  .nav-item { justify-content: center; padding: 10px 0; }
  .nav-item .nav-ico { width: auto; }
  .nav-item span, .nav-group-title { display: none; }
  .panel-grid { grid-template-columns: 1fr; }
  .stat-cards { flex-direction: column; }
  .content { padding: 16px; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters input, .filters select { width: 100%; min-width: 0; }
  .filters .btn-primary { width: 100%; }
  .view-head h2 { font-size: 18px; }
  .modal-card { width: 100%; max-width: 100%; margin: 0 16px; }
  .form-row { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .user-name { display: none; }
}

/* ============================================================
   「Softr 学习平台」风 数据看板
   严格 1:1 复刻参考图：左深侧栏 + 主区大白面板 + Hero 渐变 + 三色卡
   ============================================================ */

.view { display: block; }
.view[style*="display:none"] { display: none !important; }

/* 主白大面板（包含看板的所有内容） */
.vs-panel {
  background: var(--panel-bg);
  border-radius: var(--radius-xl);
  padding: 32px 36px 36px;
  box-shadow: var(--shadow-lg);
  min-height: calc(100vh - 110px);
}

/* 「My progress」标题行 */
.vs-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 18px; margin-bottom: 22px;
}
.vs-section-title { font-size: 20px; font-weight: 600; color: var(--text); }
.vs-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.vs-filters select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px; background: var(--panel-bg); color: var(--text);
  outline: none; min-width: 110px; max-width: 180px; height: 38px;
  transition: border-color .15s ease-out;
}
.vs-filters select:focus { border-color: var(--primary); }
.seg-ctrl {
  display: flex; gap: 2px; background: var(--surface-2);
  border-radius: 10px; padding: 3px;
}
.seg-ctrl .seg {
  padding: 6px 14px; border-radius: 8px; background: transparent;
  color: var(--text-light); font-size: 12px; font-weight: 500; border: 0; cursor: pointer;
  transition: background .15s ease-out, color .15s ease-out;
}
.seg-ctrl .seg.active { background: var(--panel-bg); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.scope-hint {
  font-size: 12px; color: var(--text-muted); padding: 6px 14px;
  background: var(--surface-2); border-radius: 8px;
}
.btn-outline {
  background: transparent; border: 1px solid var(--border); color: var(--text-light);
  padding: 7px 14px; border-radius: 10px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background .15s ease-out, color .15s ease-out;
}
.btn-outline:hover { background: var(--surface-2); color: var(--text); }

/* === Hero 横幅（Hi, Alyssa!）+ 右侧横向 3 张彩色卡 === */
.vs-hero { margin-bottom: 30px; }
.vs-hero-banner {
  background: linear-gradient(135deg, #7C6CF0 0%, #5B49E0 100%);
  border-radius: 24px; padding: 36px 40px; color: #fff;
  position: relative; overflow: hidden;
  box-shadow: 0 12px 30px rgba(91, 73, 224, .32);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px;
  align-items: center;
}
/* 右上角柔光 */
.vs-hero-banner::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(199,182,242,.25) 0%, transparent 70%);
  pointer-events: none;
}
.vs-hero-left { position: relative; z-index: 1; }
.vs-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; letter-spacing: .04em;
  background: rgba(255,255,255,.1); padding: 5px 12px; border-radius: 999px;
  margin-bottom: 18px;
}
.vs-hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--course-lime); }
.vs-hero-title { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.vs-hero-desc { margin-top: 10px; color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.6; }
.vs-hero-desc b { color: var(--course-lime); font-weight: 700; font-variant-numeric: tabular-nums; }
.vs-hero-cta {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--hero-bg-1); padding: 12px 22px;
  border-radius: 999px; font-size: 13px; font-weight: 600; border: 0; cursor: pointer;
  transition: transform .15s ease-out, box-shadow .15s ease-out;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.vs-hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.3); }

/* 右侧横向 3 张彩色课程卡（紫/橙/青黄） */
.vs-hero-right {
  position: relative; z-index: 1;
  display: flex; gap: 14px; align-items: stretch;
}
.vs-hero-right .course-card {
  background: var(--cc, var(--course-purple));
  color: var(--cc-text, #fff);
  border-radius: 20px;
  padding: 20px 22px;
  flex: 1;
  min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(46, 35, 73, .1);
  transition: transform .2s ease-out, box-shadow .2s ease-out;
}
.vs-hero-right .course-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(46, 35, 73, .18); }
.vs-hero-right .course-card .cc-head {
  display: flex; align-items: flex-start; justify-content: space-between;
}
.vs-hero-right .course-card .cc-no {
  font-size: 12px; font-weight: 600; opacity: .55;
}
.vs-hero-right .course-card .cc-ico {
  font-size: 22px; opacity: .75;
}
.vs-hero-right .course-card .cc-title { font-size: 15px; font-weight: 700; margin: 0; }
.vs-hero-right .course-card .cc-meta { font-size: 11px; opacity: .65; margin: 0; }
.vs-hero-right .course-card .cc-foot {
  margin-top: 4px; padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.08);
  font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* === Statistics === */
.vs-stats { margin-bottom: 30px; }
.vs-stats-title {
  font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 16px;
}
.vs-stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.vs-mini-card {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 22px 26px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.vs-mini-card-wide { grid-column: span 1; }
.mc-num {
  font-size: 38px; font-weight: 700; color: var(--text);
  line-height: 1.1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.mc-label {
  margin-top: 6px; font-size: 12px; color: var(--text-muted);
}
.mc-chart {
  position: absolute; right: -10px; bottom: -10px;
  width: 100px; height: 60px; opacity: .8;
  pointer-events: none;
}

/* 月历 + Upcoming 行 */
.vs-month-row {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  margin-top: 18px;
}

.vs-upcoming-card {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 22px 26px;
  box-shadow: var(--shadow);
}
.up-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 12px;
}
.up-head button {
  background: transparent; border: 0; color: var(--text-muted);
  font-size: 12px; cursor: pointer;
}
.up-list { display: flex; flex-direction: column; gap: 10px; }
.up-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 12px;
  transition: background .15s ease-out;
}
.up-item:hover { background: var(--surface-2); }
.up-dot {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: var(--danger-light); color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.up-info { flex: 1; min-width: 0; }
.up-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* === My Assignments + Calendar/Upcoming 左右分栏 === */
.vs-assign-row {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px;
  margin-bottom: 18px; align-items: start;
}
.vs-left-col { display: flex; flex-direction: column; gap: 16px; }
.vs-assignments {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 18px 22px;
  box-shadow: var(--shadow);
}
.vs-cal-up {
  display: flex; flex-direction: column; gap: 16px;
}
.vs-top-card {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 22px 26px;
  box-shadow: var(--shadow);
}

/* 月历卡（右侧窄栏） */
.vs-month-card {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 22px 26px;
  box-shadow: var(--shadow);
}
.month-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 14px;
}
.month-nav button {
  width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2);
  border: 0; cursor: pointer; font-size: 16px; color: var(--text);
  transition: background .15s ease-out;
}
.month-nav button:hover { background: var(--primary); color: #fff; }
.month-nav button + button { margin-left: 4px; }
.month-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.month-dow {
  text-align: center; font-size: 11px; color: var(--text-muted);
  font-weight: 600; padding: 6px 0;
}
.month-cell {
  aspect-ratio: 1 / 1; max-height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 12px; color: var(--text);
  cursor: pointer; transition: background .15s ease-out;
}
.month-cell:hover { background: var(--surface-2); }
.month-cell.muted { color: var(--placeholder); }
.month-cell.today {
  background: var(--primary); color: #fff; font-weight: 700;
}

/* === My Assignments + TOP 卡片（旧双栏，保留兼容） === */
.vs-assign { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.assign-card {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 22px 26px;
  box-shadow: var(--shadow);
}
.assign-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.assign-head h3 { font-size: 15px; font-weight: 600; }
.assign-head button {
  background: transparent; border: 0; color: var(--text-muted);
  font-size: 12px; cursor: pointer;
}
.assign-period { font-size: 11px; color: var(--text-muted); }
.assign-list { display: flex; flex-direction: column; gap: 6px; }
.assign-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 10px;
  transition: background .15s ease-out; font-size: 13px;
}
.assign-row:hover { background: var(--surface-2); }
.ar-rank {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  background: var(--surface-2); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.assign-row:nth-child(1) .ar-rank { background: #C8E14F; color: #2A3808; }
.assign-row:nth-child(2) .ar-rank { background: #C7B6F2; color: #2A1A4A; }
.assign-row:nth-child(3) .ar-rank { background: #FAB796; color: #4A2410; }
.ar-name {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text); font-weight: 500;
}
.ar-meta {
  font-size: 11px; color: var(--text-muted); flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.ar-amt {
  font-size: 13px; font-weight: 700; color: var(--primary);
  font-variant-numeric: tabular-nums; flex-shrink: 0; min-width: 80px; text-align: right;
}

/* === 其他 view 在参考图框架下仍要能用，加 wrapper 样式 === */
.content .view:not(#view-dashboard) {
  background: var(--panel-bg); border-radius: var(--radius-xl);
  padding: 32px; box-shadow: var(--shadow-lg);
  min-height: calc(100vh - 110px);
}
.content .view:not(#view-dashboard) .view-head {
  margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.content .view:not(#view-dashboard) .view-head h2 {
  font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -.015em;
}
.content .view:not(#view-dashboard) .view-desc {
  color: var(--text-light); font-size: 13px; margin-top: 4px;
}

/* 看板图表区 */
.vs-charts { margin-top: 18px; }
.vs-charts-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 12px 2px; }
.vs-charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.chart-card-head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text); }
.chart-sub { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.chart-box { width: 100%; height: 300px; }

/* 滞销详情单元格（允许换行） + 补充弹窗目标信息 */
.stag-detail-cell { white-space: pre-wrap; word-break: break-word; max-width: 240px; }
.stag-target { background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 14px; font-size: 13px; color: var(--text-muted); }
.stag-target b { color: var(--text); font-weight: 600; }

/* 产品知识库：按治疗领域分板块 */
.pro-section { margin-bottom: 26px; }
.pro-section-head {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 2px 14px; grid-column: 1 / -1;
  background: linear-gradient(90deg, rgba(199,182,242,.22) 0%, rgba(255,255,255,0) 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  padding: 10px 14px;
}
.pro-section-title { font-size: 17px; font-weight: 700; color: var(--text); margin: 0; }
.pro-section-count { font-size: 12px; color: var(--text-muted); background: var(--card);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.pro-section-empty { color: var(--text-muted); font-size: 13px; padding: 6px 2px 18px; }

/* 响应式：dashboard hero 卡片在窄屏堆叠 */
@media (max-width: 1100px) {
  .vs-hero, .vs-month-row, .vs-assign { grid-template-columns: 1fr; }
  .vs-stats-grid { grid-template-columns: 1fr 1fr; }
  .vs-course-cards { flex-direction: row; }
}
@media (max-width: 900px) {
  .vs-charts-grid { grid-template-columns: 1fr; }
  .chart-card.wide { grid-column: auto; }
}
@media (max-width: 720px) {
  .vs-stats-grid, .vs-course-cards { grid-template-columns: 1fr; flex-direction: column; }
  .sidebar { display: none; }
}

/* ============================================================
   下半图风格：深蓝 banner + 3 列彩色事件卡 + 大数字卡 + 彩色方形按钮
   （对应「导入批次 / 销售跟进表」两个 view）
   ============================================================ */

/* === 深蓝顶 banner === */
.vs2-hero {
  background: linear-gradient(135deg, #2A2D52 0%, #1F2E5C 100%);
  border-radius: 24px;
  padding: 30px 34px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
  box-shadow: 0 12px 30px rgba(31, 46, 92, .3);
}
.vs2-hero::after {
  content: ''; position: absolute; right: -50px; top: -50px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
  pointer-events: none;
}
.vs2-hero-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.vs2-hero-title {
  font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2;
}
.vs2-hero-sub {
  margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.6;
}
.vs2-hero-stats {
  display: flex; gap: 28px; padding-left: 20px;
  border-left: 1px solid rgba(255,255,255,.15);
}
.vs2-hs-item { text-align: right; }
.vs2-hs-num {
  font-size: 26px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.vs2-hs-label { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 2px; }

/* === 区块标题（Upcoming events / Your Classes 风格）=== */
.vs2-section { margin-bottom: 24px; }
.vs2-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.vs2-section-head h3 { font-size: 17px; font-weight: 600; color: var(--text); }
.vs2-section-head .more {
  font-size: 12px; color: var(--text-muted); cursor: pointer;
  background: transparent; border: 0;
}
.vs2-section-head .more:hover { color: var(--primary); }

/* === 3 列彩色事件卡 === */
.vs2-events {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.event-card {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease-out, box-shadow .2s ease-out;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
/* 顶部图片占位（用柔和渐变） */
.ec-thumb {
  height: 96px; position: relative;
  display: flex; align-items: flex-end; padding: 12px 16px;
}
.ec-thumb .ec-badge {
  background: rgba(255,255,255,.9); color: #1F2E5C;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.ec-body { padding: 16px 18px 18px; }
.ec-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.45; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ec-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.ec-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); }
.ec-tags { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.ec-tag {
  font-size: 11px; padding: 3px 9px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-light); font-weight: 500;
}
.ec-tag.ok { background: var(--ok-light); color: var(--ok); }
.ec-tag.warn { background: var(--warn-light); color: var(--warn); }
.ec-tag.danger { background: var(--danger-light); color: var(--danger); }
/* 空态 */
.vs2-empty {
  grid-column: 1 / -1; padding: 40px; text-align: center;
  color: var(--text-muted); font-size: 13px;
  background: var(--surface-2); border-radius: 16px; border: 1px dashed var(--border-strong);
}

/* === 大数字卡（68 Days to holiday 风格）+ 日程表 === */
.vs2-bignum-row {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-bottom: 24px;
}
.vs2-bignum {
  background: linear-gradient(135deg, #FAB796 0%, #F5A68A 100%);
  border-radius: 20px; padding: 28px 30px; color: #4A2410;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 8px 24px rgba(250, 183, 150, .3);
}
.bn-num {
  font-size: 52px; font-weight: 700; line-height: 1;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.bn-label { margin-top: 8px; font-size: 14px; font-weight: 600; opacity: .8; }
.bn-sub { margin-top: 4px; font-size: 12px; opacity: .65; }

/* 日程表（Calendar） */
.vs2-schedule {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px 24px; box-shadow: var(--shadow);
}
.sc-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 12px;
}
.sc-list { display: flex; flex-direction: column; gap: 2px; }
.sc-row {
  display: grid; grid-template-columns: 54px 1fr auto;
  gap: 12px; align-items: center;
  padding: 9px 8px; border-radius: 10px; font-size: 13px;
  transition: background .15s ease-out;
}
.sc-row:hover { background: var(--surface-2); }
.sc-time { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sc-name { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-badge {
  font-size: 11px; padding: 3px 9px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-light); font-weight: 500; white-space: nowrap;
}

/* === 彩色方形按钮（Your Classes 风格，2×2 或 1×4）=== */
.vs2-classes {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 24px;
}
.class-btn {
  aspect-ratio: 1.6 / 1; min-height: 96px;
  border-radius: 20px; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  padding: 18px 20px; color: #fff; text-align: left;
  transition: transform .18s ease-out, box-shadow .18s ease-out, opacity .18s ease-out;
  box-shadow: 0 6px 18px rgba(46, 35, 73, .12);
}
.class-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(46, 35, 73, .18); }
.class-btn:active { transform: translateY(0) scale(.98); }
.class-btn.active {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--primary);
}
.cb-ico { font-size: 22px; opacity: .9; }
.cb-text { font-size: 15px; font-weight: 600; line-height: 1.3; }
.cb-sub { font-size: 11px; opacity: .75; margin-top: 2px; }

/* 彩色方形按钮配色（参考图 teal / coral / 深蓝 / teal） */
.cb-teal   { background: linear-gradient(135deg, #4ECDC4, #3FBDB4); }
.cb-coral  { background: linear-gradient(135deg, #FF8A7A, #F4736B); }
.cb-navy   { background: linear-gradient(135deg, #3A4A7A, #2A3560); }
.cb-purple { background: linear-gradient(135deg, #9B8AE6, #8574D6); }
.cb-lime   { background: linear-gradient(135deg, #A8D84E, #93C43C); color: #2A3808; }
.cb-amber  { background: linear-gradient(135deg, #F7B955, #E8A73C); color: #4A2F08; }

/* === 进度列表（Exams 风格）=== */
.vs2-exams {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 22px 26px; box-shadow: var(--shadow);
}
.ex-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ex-row:last-child { border-bottom: 0; }
.ex-info { flex: 1; min-width: 0; }
.ex-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ex-bar { width: 120px; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; flex-shrink: 0; }
.ex-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4ECDC4, #3FBDB4); transition: width .3s ease-out; }
.ex-pct { font-size: 12px; font-weight: 600; color: var(--text); width: 44px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* === 表格容器（下半图风格下要更轻）=== */
.vs2-table-card {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px 24px; box-shadow: var(--shadow);
}
.vs2-table-card .table-wrap { border-radius: 12px; }

@media (max-width: 1100px) {
  .vs2-events { grid-template-columns: 1fr 1fr; }
  .vs2-bignum-row { grid-template-columns: 1fr; }
  .vs2-classes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .vs2-events { grid-template-columns: 1fr; }
  .vs2-classes { grid-template-columns: 1fr; }
  .vs2-hero-stats { border-left: 0; padding-left: 0; width: 100%; justify-content: flex-start; }
}

/* ============================================================
   hero 配色修饰类（不同页面用不同主色，保持参考图多彩但统一）
   ============================================================ */
/* 各板块顶栏主色：保证每个板块互不相同的多彩渐变（2026-09-14 统一重做） */
/* 各板块顶栏主色：22 个互不相同的深饱和渐变，确保白字全程清晰（2026-09-14 加深，解决浅色顶栏看不清） */
.vs2-hero.h-teal      { background: linear-gradient(135deg, #0F766E 0%, #134E4A 100%); box-shadow: 0 12px 30px rgba(15,118,110,.30); }
.vs2-hero.h-rose      { background: linear-gradient(135deg, #BE123C 0%, #9F1239 100%); box-shadow: 0 12px 30px rgba(159,18,57,.30); }
.vs2-hero.h-amber     { background: linear-gradient(135deg, #B45309 0%, #92400E 100%); box-shadow: 0 12px 30px rgba(146,64,14,.30); }
.vs2-hero.h-slate     { background: linear-gradient(135deg, #475569 0%, #1E293B 100%); box-shadow: 0 12px 30px rgba(30,41,59,.30); }
.vs2-hero.h-blue      { background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 100%); box-shadow: 0 12px 30px rgba(30,58,138,.30); }
.vs2-hero.h-indigo    { background: linear-gradient(135deg, #4338CA 0%, #312E81 100%); box-shadow: 0 12px 30px rgba(49,46,129,.30); }
.vs2-hero.h-lime      { background: linear-gradient(135deg, #4D7C0F 0%, #3F6212 100%); box-shadow: 0 12px 30px rgba(63,98,18,.30); }
.vs2-hero.h-red       { background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%); box-shadow: 0 12px 30px rgba(153,27,27,.30); }
.vs2-hero.h-cyan      { background: linear-gradient(135deg, #0E7490 0%, #155E63 100%); box-shadow: 0 12px 30px rgba(21,94,99,.30); }
.vs2-hero.h-purple    { background: linear-gradient(135deg, #7E22CE 0%, #6B21A8 100%); box-shadow: 0 12px 30px rgba(107,33,168,.30); }
.vs2-hero.h-orange    { background: linear-gradient(135deg, #C2410C 0%, #9A3412 100%); box-shadow: 0 12px 30px rgba(154,52,18,.30); }
.vs2-hero.h-sky       { background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%); box-shadow: 0 12px 30px rgba(3,105,161,.30); }
.vs2-hero.h-emerald   { background: linear-gradient(135deg, #047857 0%, #065F46 100%); box-shadow: 0 12px 30px rgba(6,95,70,.30); }
.vs2-hero.h-gold      { background: linear-gradient(135deg, #A16207 0%, #854D0E 100%); box-shadow: 0 12px 30px rgba(133,77,14,.30); }
.vs2-hero.h-fuchsia   { background: linear-gradient(135deg, #86198F 0%, #701A75 100%); box-shadow: 0 12px 30px rgba(112,26,117,.30); }
.vs2-hero.h-magenta   { background: linear-gradient(135deg, #A21CAF 0%, #86198F 100%); box-shadow: 0 12px 30px rgba(134,25,143,.30); }
.vs2-hero.h-steel     { background: linear-gradient(135deg, #3B5BA0 0%, #2E4A82 100%); box-shadow: 0 12px 30px rgba(46,74,130,.30); }
.vs2-hero.h-mint      { background: linear-gradient(135deg, #059669 0%, #047857 100%); box-shadow: 0 12px 30px rgba(4,120,87,.30); }
.vs2-hero.h-sunset    { background: linear-gradient(135deg, #EA580C 0%, #C2410C 100%); box-shadow: 0 12px 30px rgba(194,65,12,.30); }
.vs2-hero.h-terracotta{ background: linear-gradient(135deg, #9A4B2E 0%, #7C3A1E 100%); box-shadow: 0 12px 30px rgba(124,58,30,.30); }
.vs2-hero.h-violet    { background: linear-gradient(135deg, #5B49E0 0%, #4C3FBF 100%); box-shadow: 0 12px 30px rgba(76,63,191,.30); }
.vs2-hero.h-kb        { background: linear-gradient(135deg, #1E3A5F 0%, #14253F 100%); box-shadow: 0 12px 30px rgba(20,37,63,.30); }

/* === 页面内统计条（参考图 Statistics 三数字块的紧凑版）=== */
.vs2-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.vs2-stat {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.vs2-stat::after {
  content: ''; position: absolute; right: -16px; top: -16px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--sc, #4ECDC4); opacity: .18;
}
.vs2-stat .s-num {
  font-size: 24px; font-weight: 700; color: var(--text);
  line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.vs2-stat .s-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* === 筛选行（原 .filters 在参考图风格下更轻）=== */
.vs2-filter-card {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 18px 22px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.vs2-filter-card .filters { margin-bottom: 0; }

/* ============================================================
   产品知识库（2026-09-03 新增）— 顶栏配色复用 h-kb（海军蓝，见上方配色块）
   ============================================================ */

/* 工具栏：搜索 + 筛选 */
.pro-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 14px;
}
.pro-search {
  position: relative; flex: 1 1 280px; min-width: 220px;
}
.pro-search .search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 14px; opacity: .55; pointer-events: none;
}
.pro-search input {
  width: 100%; padding: 11px 14px 11px 38px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text); font-size: 14px;
}
.pro-search input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.pro-toolbar select {
  padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--card); color: var(--text);
  font-size: 13px; min-width: 120px;
}

/* 卡片网格 */
.product-grid {
  display: grid; gap: 16px; margin-top: 6px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.pro-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px 16px;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s;
  display: flex; flex-direction: column; min-height: 188px;
}
.pro-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.pro-card-top { display: flex; align-items: flex-start; gap: 10px; }
.pro-level {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; margin-top: 2px;
}
.pro-level-A { background: linear-gradient(135deg, #6B5BE0, #4C3FBF); }
.pro-level-B { background: linear-gradient(135deg, #4ECDC4, #2BA8A0); }
.pro-level- { background: #B9B2CC; }
.pro-name { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.35; margin: 0; }
.pro-spec { font-size: 12.5px; color: var(--text-light); margin-top: 4px; }
.pro-mfr { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.pro-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.pro-tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--primary-light); color: var(--primary); font-weight: 600;
}
.pro-tag-remark { background: #FFF1D6; color: #B5791B; }

.pro-meta { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pro-price { font-size: 15px; font-weight: 700; color: var(--text); }
.pro-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600;
  border: 1px solid transparent;
}
.pro-badge-ok { background: var(--ok-light); color: var(--ok); border-color: rgba(52,177,123,.25); }
.pro-badge-warn { background: var(--warn-light); color: var(--warn); border-color: rgba(232,148,50,.25); }
.pro-badge-muted { background: #F1F0F6; color: var(--text-muted); border-color: var(--border-strong); }
[data-theme="dark"] .pro-badge-muted { background: #20283a; color: var(--text-muted); }

.pro-sp {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-strong);
  font-size: 12.5px; color: var(--text-light); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pro-sp b { color: var(--text); font-weight: 600; }

/* 产品详情弹窗 */
.modal-lg { max-width: 720px; width: 92%; }
#pm-body .pm-row { margin-bottom: 14px; }
#pm-body .pm-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
#pm-body .pm-value { font-size: 14px; color: var(--text); line-height: 1.7; white-space: pre-wrap; }
#pm-body .pm-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px;
}
#pm-body .pm-head h3 { font-size: 20px; color: var(--text); margin: 0; }
#pm-body .pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
@media (max-width: 560px) { #pm-body .pm-grid { grid-template-columns: 1fr; } }
#pm-body .pm-sp-box {
  background: var(--primary-light); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-top: 6px; white-space: pre-wrap; line-height: 1.75; font-size: 13.5px; color: var(--text);
}
[data-theme="dark"] #pm-body .pm-sp-box { background: #20283a; }
#pm-body .pm-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }

/* ============ 数据更新中心 ============ */
.dc-hint { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.dc-hint b { color: var(--text); }
.dc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 4px; }
@media (max-width: 900px) { .dc-cards { grid-template-columns: 1fr; } }
.dc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.dc-card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.dc-card-head .dc-ico { font-size: 22px; line-height: 1; }
.dc-card-head h4 { margin: 0 0 4px; font-size: 16px; color: var(--text); }
.dc-card-head p { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.dc-cols { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.8; }
.dc-cols-label { color: var(--text); font-weight: 600; margin-right: 4px; }
.dc-col { display: inline-block; background: var(--primary-light); color: var(--primary); border-radius: 5px; padding: 1px 7px; margin: 2px 4px 2px 0; font-size: 11.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }
[data-theme="dark"] .dc-col { background: #20283a; color: #9ad; }
.dc-note { margin-top: 6px; color: var(--text-muted); font-size: 11.5px; line-height: 1.55; }
.dc-zone { padding: 18px 14px; text-align: center; cursor: pointer; }
.dc-zone .upload-icon { font-size: 26px; margin-bottom: 6px; }
.dc-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.dc-result { font-size: 12.5px; }

/* 政策结算价标记 */
.tag-settle { display:inline-block; font-size:10px; line-height:1; padding:1px 5px; border-radius:4px; background:var(--warn-light); color:var(--warn); vertical-align:middle; margin-left:3px; }
[data-theme="dark"] .tag-settle { background:#3a2e14; color:#e6b35a; }
.tag-mode { display:inline-block; font-size:10px; line-height:1; padding:1px 5px; border-radius:4px; background:var(--info-light); color:var(--info); vertical-align:middle; margin-left:3px; }
[data-theme="dark"] .tag-mode { background:#16304a; color:#6db3e8; }
.tag-split { display:inline-block; font-size:10px; line-height:1; padding:1px 5px; border-radius:4px; background:var(--ok-light); color:var(--ok); vertical-align:middle; margin-left:3px; }
[data-theme="dark"] .tag-split { background:#143a26; color:#5fd39a; }
.pf-cond { border-left:3px solid var(--info); padding:6px 10px; margin:8px 0; background:var(--bg-soft); border-radius:0 6px 6px 0; }
[data-theme="dark"] .pf-cond { background:#1c2433; }
.pf-cond .pf-row:last-child { margin-bottom: 0; }

/* ============ 收入核算 ============ */
.rev-total-row { font-weight: 700; background: var(--bg-soft); }
.rev-total-row td { border-top: 2px solid var(--border); }
[data-theme="dark"] .rev-total-row { background: #1c2433; }
.rev-edit-info { font-size: 13px; font-weight: 600; color: var(--text-strong); margin-bottom: 10px; padding: 8px 10px; background: var(--bg-soft); border-radius: 6px; }
[data-theme="dark"] .rev-edit-info { background: #1c2433; }
#rev-year-pager, #rev-month-tfoot { font-variant-numeric: tabular-nums; }
/* 月度明细按药品分组 */
.rev-group-row { background: #f1eef8; cursor: pointer; font-weight: 700; }
.rev-group-row:hover { background: #e9e5f4; }
.rev-group-row td { border-top: 1px solid var(--border); padding-top: 9px; padding-bottom: 9px; }
[data-theme="dark"] .rev-group-row { background: #232b40; }
[data-theme="dark"] .rev-group-row:hover { background: #2a3450; }
.caret.collapsed { transform: rotate(-90deg); display: inline-block; }
.rev-grp-count { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-left: 6px; }
.rev-detail-indent { border-left: 3px solid #d9d2ee; padding-left: 18px; }
[data-theme="dark"] .rev-detail-indent { border-left-color: #3a4566; }
.rev-year-cell { font-weight: 700; background: var(--bg-soft); }
[data-theme="dark"] .rev-year-cell { background: #1c2433; }
/* 药品月度全字段矩阵 */
.rev-pivot-table { table-layout: auto; }
.rev-pivot-table th, .rev-pivot-table td { white-space: nowrap; }
.rev-pivot-base:first-child { min-width: 96px; }
/* 冻结「产品」列（行标识），横滚不丢上下文 */
.rev-pivot-table td.rev-sticky-col,
.rev-pivot-table thead th.rev-sticky-col {
  position: sticky; left: 0; z-index: 2; background: var(--bg);
}
.rev-pivot-table thead th.rev-sticky-col { z-index: 5; background: var(--th-bg, #f7f8fa); }
[data-theme="dark"] .rev-pivot-table td.rev-sticky-col { background: #161b26; }
[data-theme="dark"] .rev-pivot-table thead th.rev-sticky-col { background: #1f2738; }
/* 两级表头置顶冻结（第一行 top:0，第二行 top:34px） */
.rev-pivot-table thead th { position: sticky; top: 0; z-index: 3; height: 34px; background: var(--th-bg, #f7f8fa); box-shadow: 0 1px 0 var(--border); }
.rev-pivot-table thead tr:first-child th { top: 0; }
.rev-pivot-table thead tr:last-child th { top: 34px; }
.rev-pivot-table thead tr:last-child th.rev-sticky-col { top: 34px; left: 0; z-index: 6; }
.rev-mth-h { text-align: center; background: #eef2ff; }
.rev-mth-sub { text-align: center; font-size: 12px; color: var(--text-muted); background: #f7f9ff; }
.rev-year-h { background: #fdeef0 !important; }
[data-theme="dark"] .rev-mth-h { background: #232b40; }
[data-theme="dark"] .rev-mth-sub { background: #1c2433; }
[data-theme="dark"] .rev-year-h { background: #3a2540 !important; }
.rev-pivot-table .rev-group-row td.rev-pivot-base { background: transparent; position: static; }

/* H2 占位基础列（colspan=16，无文字，透明背景） */
.rev-pivot-table thead .rev-h2-base { background: transparent !important; box-shadow: none !important; border-right: 1px solid var(--border); }

[data-theme="dark"] .rev-year-cell { background: #1c2433; }
#rev-pivot-table th, #rev-pivot-table td.num { font-variant-numeric: tabular-nums; }
/* 负数（退货/退款冲销）标红 */
.rev-neg { color: #e5484d !important; font-weight: 600; }
[data-theme="dark"] .rev-neg { color: #ff7a85 !important; }
/* 可编辑数值格 */
.rev-cell { cursor: pointer; }
.rev-cell:hover { background: #fff7e6; }
[data-theme="dark"] .rev-cell:hover { background: #3a2f1a; }
.rev-cell-null { color: var(--text-muted); cursor: default; }

/* ============ 收入核算 · 药品列表(左) + 明细(右) 布局 ============ */
.rev-layout { display: flex; gap: 14px; margin: 14px 0 4px; align-items: flex-start; }
.rev-drug-panel {
  flex: 0 0 260px; width: 260px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); overflow: hidden;
  display: flex; flex-direction: column;
}
.rev-drug-search { padding: 10px; border-bottom: 1px solid var(--border); }
.rev-drug-search .inp { width: 100%; }
.rev-drug-list { max-height: 68vh; overflow-y: auto; }
.rev-drug-item {
  padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent; transition: background .12s;
}
.rev-drug-item:hover { background: var(--bg-soft); }
.rev-drug-item.active { background: #eef2ff; border-left-color: #6B5BE0; }
[data-theme="dark"] .rev-drug-item.active { background: #232b40; border-left-color: #8f82f0; }
.rev-drug-name { font-weight: 600; font-size: 13.5px; color: var(--text-strong); line-height: 1.35; word-break: break-all; }
.rev-drug-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.rev-drug-empty { padding: 24px 12px; text-align: center; color: var(--text-muted); font-size: 13px; }

.rev-detail-panel { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rev-detail-head { padding: 12px 14px; border: 1px solid var(--border); border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--bg); }
.rev-detail-title { font-size: 16px; font-weight: 700; color: var(--text-strong); }
.rev-detail-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.rev-detail-meta b { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.rev-detail-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
.rev-detail-wrap { max-height: 68vh; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* 指标 Tab + 展开基础列 */
.rev-detail-row1 { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.rev-detail-row1 .rev-detail-meta { margin-top: 0; }
.rev-detail-row2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rev-mtab {
  padding: 5px 12px; font-size: 12.5px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--bg); color: var(--text-muted);
  cursor: pointer; transition: all .12s; white-space: nowrap;
}
.rev-mtab:hover { border-color: #6B5BE0; color: #6B5BE0; }
.rev-mtab.active { background: #6B5BE0; border-color: #6B5BE0; color: #fff; font-weight: 600; }
[data-theme="dark"] .rev-mtab.active { background: #6B5BE0; color: #fff; }
.rev-base-toggle { margin-left: auto; border-style: dashed; }
.rev-base-toggle.active { background: #eef2ff; border-color: #6B5BE0; color: #6B5BE0; }
[data-theme="dark"] .rev-base-toggle.active { background: #232b40; color: #8f82f0; }
/* 月份选择器（按月显示模式下） */
.rev-month-sel {
  padding: 5px 10px; font-size: 12.5px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text-strong); cursor: pointer;
}
.rev-month-sel:focus { outline: none; border-color: #6B5BE0; }
/* 年份下拉（hero 顶部，紫色背景上） */
.rev-year-sel {
  padding: 5px 14px; font-size: 14px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.4); border-radius: 8px;
  background: rgba(255,255,255,.16); color: #fff; cursor: pointer;
}
.rev-year-sel:focus { outline: none; border-color: #fff; }
.rev-year-sel option { color: #333; background: #fff; }

/* ============ 财务会计 · 迷你金蝶 ============ */
/* 试算平衡 / 资产负债表 状态徽标 */
.total-hint.ok { color: var(--ok); font-weight: 600; }
.total-hint.warn { color: var(--danger); font-weight: 600; }
.total-hint .ok, .total-hint .warn { font-weight: 600; }

/* 资产负债表双栏布局 */
.gl-bs { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.gl-bs-col { flex: 1 1 380px; min-width: 320px; }
.gl-bs-col h4 { margin: 0 0 8px; font-size: 14px; color: var(--text-strong); }
.gl-bs-total {
  margin-top: 8px; padding: 8px 12px; font-size: 13.5px; color: var(--text-strong);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: flex; justify-content: space-between; align-items: center;
}
.gl-bs-total .num { font-variant-numeric: tabular-nums; font-weight: 700; }
.gl-bs-total.strong { background: #eef2ff; border-color: #c7d2fe; font-weight: 700; }
[data-theme="dark"] .gl-bs-total.strong { background: #232b40; border-color: #3a4a6a; }

/* 凭证分录行 */
.glv-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.glv-row .glv-account { flex: 0 0 220px; width: 220px; }
.glv-row .glv-sum { flex: 1 1 auto; }
.glv-row .glv-deb, .glv-row .glv-cre { flex: 0 0 120px; width: 120px; }
.glv-row .btn-link { flex: 0 0 auto; }
.glv-summary {
  display: flex; gap: 22px; align-items: center; margin: 10px 0 4px;
  padding: 8px 12px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13.5px;
}
.glv-summary b { font-variant-numeric: tabular-nums; color: var(--text-strong); }
.glv-summary .ok { color: var(--ok); font-weight: 600; }
.glv-summary .warn { color: var(--danger); font-weight: 600; }
.modal-msg { min-height: 18px; color: var(--danger); font-size: 12.5px; margin: 4px 0; }

/* ========== 金蝶式记账凭证弹窗 ========== */
.voucher-modal-lg { width: 1100px; max-width: 95vw; padding: 0; overflow: hidden; position: relative; }
.voucher-modal-lg .modal-box { border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.15); }

/* 工具栏 */
.voucher-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background: #f7f8fa; border-bottom: 1px solid #e8eaed; }
.vtb-left, .vtb-right { display: flex; align-items: center; gap: 6px; }
.vtb-btn { font-size: 13px; padding: 4px 12px; border-radius: 4px; white-space: nowrap; cursor: pointer; }
.vtb-dropdown { position: relative; }
.vtb-dropdown-menu { position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.1); z-index: 100; min-width: 120px; }
.vtb-dropdown-menu a { display: block; padding: 6px 14px; color: var(--text); text-decoration: none; font-size: 13px; }
.vtb-dropdown-menu a:hover { background: #f0f4ff; }
.vtb-hint { font-size: 12px; color: var(--text-muted); cursor: default; padding: 2px 6px; }
.vtb-hide { display: none !important; }

/* 可点击的快捷键入口 + 摘要自动沿用开关 */
.vtb-hint-btn { background: none; border: 1px solid #d0d5dd; border-radius: 4px; font-size: 12px; color: var(--text-muted); cursor: pointer; padding: 3px 8px; font-family: inherit; }
.vtb-hint-btn:hover { background: #eef4ff; color: #4a8cff; border-color: #4a8cff; }
.vtb-switch { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); cursor: pointer; user-select: none; padding: 3px 6px; border-radius: 4px; white-space: nowrap; }
.vtb-switch:hover { background: #eef4ff; }
.vtb-switch input { cursor: pointer; margin: 0; }

/* 快捷键说明浮层 */
.glv-shortcut-panel { position: absolute; top: 92px; right: 20px; z-index: 120; width: 408px; background: #fff; border: 1px solid #e0e4e8; border-radius: 8px; box-shadow: 0 10px 32px rgba(0,0,0,.14); padding: 10px 14px 12px; }
.glsp-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--text-strong); border-bottom: 1px solid #eef0f2; padding-bottom: 8px; margin-bottom: 8px; }
.glsp-close { background: none; border: none; font-size: 18px; line-height: 1; color: #aaa; cursor: pointer; padding: 0 4px; }
.glsp-close:hover { color: var(--text); }
.glv-shortcut-panel ul { list-style: none; margin: 0; padding: 0; }
.glv-shortcut-panel li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; font-size: 12.5px; color: var(--text); line-height: 1.5; }
.glv-shortcut-panel kbd { flex: 0 0 44px; text-align: center; background: #f4f6f8; border: 1px solid #dde1e6; border-bottom-width: 2px; border-radius: 4px; padding: 2px 4px; font-family: 'SF Mono', 'Consolas', 'Monaco', monospace; font-size: 12px; color: var(--text-strong); }

/* 弹窗内轻提示 */
.glv-toast { position: absolute; right: 24px; bottom: 62px; background: rgba(38,38,38,.92); color: #fff; font-size: 12.5px; padding: 7px 14px; border-radius: 6px; opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; pointer-events: none; z-index: 130; }
.glv-toast.show { opacity: 1; transform: translateY(0); }
.glv-toast.ok { background: rgba(22,140,80,.94); }

/* 凭证信息行 */
.voucher-info-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid #e8eaed; flex-wrap: wrap; }
.vir-cell { display: flex; align-items: center; gap: 4px; }
.vir-cell label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.vir-select { border: 1px solid #d0d5dd; border-radius: 4px; padding: 3px 6px; font-size: 13px; background: #fff; }
.vir-input { border: 1px solid #d0d5dd; border-radius: 4px; padding: 4px 8px; font-size: 13px; width: 130px; }
.vir-input.vir-small { width: 50px; text-align: center; }
.vir-unit { font-size: 13px; color: var(--text-muted); }
.vir-title { margin-left: auto; text-align: right; }
.vir-title h2 { font-size: 20px; font-weight: 600; margin: 0; color: var(--text-strong); }
.vir-period { font-size: 13px; color: var(--text-muted); margin-left: 8px; }
.vir-attach { margin-left: auto; }

/* 分录表格 */
.voucher-table-wrap { overflow-x: auto; padding: 0 16px; }
.voucher-entry-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.voucher-entry-table th { background: #f7f8fa; border: 1px solid #e0e4e8; padding: 6px 4px; font-weight: 600; font-size: 12px; color: var(--text-muted); text-align: center; }
.voucher-entry-table .vet-units th { font-size: 11px; color: #999; padding: 3px 2px; font-weight: 400; }
.voucher-entry-table td { border: 1px solid #e0e4e8; padding: 0; vertical-align: middle; height: 36px; position: relative; }
.voucher-entry-table tbody tr:hover { background: #fafbfc; }
.voucher-entry-table .vet-idx { width: 56px; }
.voucher-entry-table .vet-sum { width: 16%; }
.voucher-entry-table .vet-acct { width: 160px; }
.voucher-entry-table .vet-amt { width: 29%; }
.voucher-entry-table .vet-cell-td { padding: 0; text-align: center; }
.voucher-entry-table .vet-cell-td + .vet-cell-td { border-left: 1px solid #eef0f2; }
/* 万位右侧加粗红色分节线：分隔万级与元级 */
.voucher-entry-table .vet-cell-td.vet-cell-wan { border-right: 2px solid #d4380d; }
.voucher-entry-table .vet-cell { width: 100%; height: 100%; min-height: 34px; border: none; padding: 2px 0; font-size: 13px; text-align: center; background: transparent; outline: none; box-sizing: border-box; font-family: 'SF Mono', 'Consolas', 'Monaco', monospace; }
.voucher-entry-table .vet-cell:focus { background: #eef4ff; box-shadow: inset 0 0 0 1px #4a8cff; }

.vet-idx { width: 38px; text-align: center; color: #aaa; font-size: 12px; }
.vet-sum { width: 160px; }
.vet-acct { width: 200px; }
.vet-amt { width: 29%; }

/* 表格内输入框 */
.vet-sum-input, .vet-acct-select { width: 100%; height: 100%; border: none; padding: 4px 8px; font-size: 13px; background: transparent; outline: none; box-sizing: border-box; }
.vet-sum-input:focus, .vet-acct-select:focus { background: #eef4ff; }
.vet-acct-select { cursor: pointer; appearance: auto; }

/* 金额输入 - 跨列显示，右对齐 */
.vet-amt-input { display: none; }

/* 合计行 */
.vet-total-row { background: #f7f8fa; font-weight: 600; }
.vet-total-row td { border: 1px solid #e0e4e8; padding: 6px 8px; }
.vet-total-debit, .vet-total-credit { color: var(--text-strong); font-size: 14px; }

/* 行操作按钮（+/-/复制） */
.vet-actions { display: flex; gap: 2px; justify-content: center; align-items: center; height: 100%; }
.vet-actions button { background: none; border: none; cursor: pointer; font-size: 15px; color: #bbb; padding: 2px 4px; border-radius: 3px; line-height: 1; }
.vet-actions button:hover { background: #e8eaed; color: var(--text); }
.vet-actions .vet-del:hover { color: var(--danger); background: #fef0f0; }

/* 底部栏 */
.voucher-footer { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background: #f7f8fa; border-top: 1px solid #e8eaed; }
.vf-left { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--text-muted); }
.vf-maker { color: var(--text-strong); font-weight: 500; }
.vf-balance { font-size: 13px; }
.vf-balance.ok { color: var(--ok); font-weight: 600; }
.vf-balance.warn { color: var(--danger); font-weight: 600; }
.vf-balance-tip { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.vf-msg { color: var(--danger); font-size: 12px; }
.vf-right { display: flex; gap: 8px; }

