/* ==========================================================
   沥校通 · B端管理后台设计系统
   经典卡片式 B 端视觉语言：深灰蓝侧边栏 + 白色顶栏 + 圆角白卡片
   低饱和商务蓝主色 / 扁平化 / 中高信息密度 / 亮暗双主题
   ========================================================== */

/* 统一 hidden 语义：元素自身设了 display（如 .paper-preview{display:block}）会覆盖
   浏览器默认的 [hidden]{display:none}，这里强制兜底，避免"加 hidden 却还显示" */
[hidden] { display: none !important; }

:root {
  /* 主色（低饱和商务蓝） */
  --primary: #3a6ea5;
  --primary-hover: #33618f;
  --primary-active: #2b5178;
  --primary-light: #eaf1f8;
  --primary-fade: rgba(58, 110, 165, 0.08);
  --primary-shadow: rgba(58, 110, 165, 0.25);

  /* 侧边栏（深灰蓝） */
  --sidebar-bg: #1c2836;
  --sidebar-bg-deep: #17222e;
  --sidebar-text: #aeb9c8;
  --sidebar-text-strong: #e8edf4;
  --sidebar-group: #67788d;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: #2e4a68;
  --sidebar-accent: #5b9bd5;
  --sidebar-border: rgba(255, 255, 255, 0.07);
  --sidebar-width: 220px;
  --sidebar-width-collapsed: 64px;

  /* 顶栏 */
  --topbar-bg: #ffffff;
  --topbar-height: 56px;

  /* 背景与卡片 */
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f5f8fc;
  --bg-active: #eaf1f8;
  --bg-subtle: #f8fafc;
  --bg-inset: #f4f7fa;

  /* 文本 */
  --text: #2b3644;
  --text-2: #5c6b7e;
  --text-3: #93a1b1;
  --text-4: #bcc7d2;
  --text-inverse: #ffffff;

  /* 边框 */
  --border: #eef1f5;
  --border-strong: #e2e8f0;
  --divider: #f3f5f8;

  /* 状态色 */
  --blue: #3a6ea5; --blue-bg: #e9f1f9; --blue-border: #cfdeee;
  --green: #1e9e62; --green-bg: #e6f6ec; --green-border: #c2ead3;
  --orange: #e8890c; --orange-bg: #fdf1e0; --orange-border: #f6ddb8;
  --red: #d94848; --red-bg: #fcecec; --red-border: #f4cdcd;
  --purple: #7a5af8; --purple-bg: #efebfe; --purple-border: #d8cefc;
  --cyan: #0e9bb5; --cyan-bg: #e4f6fa; --cyan-border: #bde8f1;
  --gray: #7a8794; --gray-bg: #f2f4f7; --gray-border: #e4e8ee;

  /* 阴影与圆角 */
  --shadow-card: 0 1px 2px rgba(30, 42, 56, 0.04), 0 4px 16px rgba(30, 42, 56, 0.05);
  --shadow-card-hover: 0 2px 4px rgba(30, 42, 56, 0.06), 0 8px 24px rgba(30, 42, 56, 0.09);
  --shadow-pop: 0 12px 40px rgba(30, 42, 56, 0.16);
  --shadow-topbar: 0 1px 0 var(--border);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;

  /* 动效 */
  --transition: 0.18s ease;
}

/* ==================== 暗色主题 ==================== */
[data-theme="dark"] {
  --bg-body: #141a22;
  --bg-card: #1b232e;
  --bg-hover: #232d3a;
  --bg-active: #26374b;
  --bg-subtle: #1a222c;
  --bg-inset: #202a36;

  --text: #d7dee8;
  --text-2: #9aa8b8;
  --text-3: #6d7d90;
  --text-4: #556373;

  --border: #28323f;
  --border-strong: #323e4d;
  --divider: #232c38;

  --topbar-bg: #1b232e;
  --sidebar-bg: #131a23;
  --sidebar-bg-deep: #0f151c;
  --sidebar-active: #24405e;

  --primary-light: #22374e;
  --primary-fade: rgba(91, 155, 213, 0.12);

  --blue-bg: #1f3348; --blue-border: #2e4a68;
  --green-bg: #16352a; --green-border: #235c43;
  --orange-bg: #3d2f18; --orange-border: #5c4625;
  --red-bg: #3d2222; --red-border: #5e3333;
  --purple-bg: #2a2450; --purple-border: #40376e;
  --cyan-bg: #16333b; --cyan-border: #23505c;
  --gray-bg: #262f3a; --gray-border: #37424f;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.22);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ==================== 基础 ==================== */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

p { margin: 0 0 10px; }

::selection { background: var(--primary); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }
::-webkit-scrollbar-track { background: transparent; }

.ui-icon { flex: none; vertical-align: -0.15em; }

/* ==================== 布局骨架 ==================== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--transition), transform var(--transition);
}

.main-wrap {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}

.layout--collapsed .sidebar { width: var(--sidebar-width-collapsed); }
.layout--collapsed .main-wrap { margin-left: var(--sidebar-width-collapsed); }

.page-body { flex: 1; padding: 16px 20px 24px; }

.page-footer {
  padding: 14px 20px;
  color: var(--text-3);
  font-size: 12px;
  border-top: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==================== 侧边栏 ==================== */
.sidebar-brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--sidebar-border);
  overflow: hidden;
  flex: none;
}

.brand-logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4a7fb5, #2e4a68);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
  flex: none;
  box-shadow: 0 2px 8px rgba(46, 74, 104, 0.4);
}

.brand-name {
  font-size: 15px; font-weight: 600; color: var(--sidebar-text-strong);
  white-space: nowrap; letter-spacing: 0.5px;
}

.brand-sub { font-size: 10px; color: var(--sidebar-group); white-space: nowrap; margin-top: -2px; }

.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 10px 20px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  margin-bottom: 2px;
  transition: background var(--transition), color var(--transition);
}

.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); }

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-strong);
  font-weight: 500;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -10px; top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--sidebar-accent);
}

.nav-item .ui-icon { flex: none; }

.nav-item-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }

.nav-group-title {
  font-size: 11px;
  color: var(--sidebar-group);
  padding: 14px 10px 6px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.nav-sub { display: none; padding-left: 20px; }
.nav-group.open > .nav-sub { display: block; }

.nav-item .nav-caret {
  margin-left: auto;
  transition: transform var(--transition);
  color: var(--sidebar-group);
}
.nav-group.open > .nav-item .nav-caret { transform: rotate(180deg); }

.layout--collapsed .nav-item-text,
.layout--collapsed .nav-caret,
.layout--collapsed .nav-group-title,
.layout--collapsed .brand-name,
.layout--collapsed .brand-sub { display: none; }

.layout--collapsed .nav-item { justify-content: center; padding: 0; }
.layout--collapsed .nav-group > .nav-item { pointer-events: none; }
.layout--collapsed .nav-sub { display: none !important; }
.layout--collapsed .sidebar-brand { justify-content: center; padding: 0; }

/* 折叠态悬浮提示 */
.layout--collapsed .nav-item { position: relative; }
.layout--collapsed .nav-item:hover::after {
  content: attr(data-title);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%; transform: translateY(-50%);
  background: var(--sidebar-bg-deep);
  color: var(--sidebar-text-strong);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  white-space: nowrap;
  z-index: 200;
  box-shadow: var(--shadow-pop);
}

.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding: 10px;
  flex: none;
}

.sidebar-collapse-btn {
  width: 100%;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  transition: background var(--transition);
}
.sidebar-collapse-btn:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); }
.layout--collapsed .sidebar-collapse-text { display: none; }

/* ==================== 顶栏 ==================== */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  z-index: 90;
}

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); min-width: 0; }
.breadcrumb .crumb-current { color: var(--text); font-weight: 500; }
.breadcrumb .crumb-sep { color: var(--text-4); }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--primary); }

.topbar-search {
  margin-left: auto;
  position: relative;
  width: 200px;
}
.topbar-search .ui-icon {
  position: absolute;
  left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.topbar-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--border-strong);
  border-radius: 17px;
  background: var(--bg-inset);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.topbar-search input:focus { border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 3px var(--primary-fade); }
.topbar-search input::placeholder { color: var(--text-3); }

.topbar-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.topbar-btn {
  width: 34px; height: 34px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background var(--transition), color var(--transition);
}
.topbar-btn:hover { background: var(--bg-hover); color: var(--text); }

.topbar-btn .dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--topbar-bg);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background var(--transition);
}
.topbar-user:hover { background: var(--bg-hover); }
.topbar-user-name { font-size: 13px; color: var(--text); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==================== 下拉菜单 ==================== */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 6px;
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-header {
  padding: 8px 10px 6px;
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dropdown-header a { font-size: 12px; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  transition: background var(--transition);
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text); }
.dropdown-item .ui-icon { color: var(--text-3); }
.dropdown-item--danger { color: var(--red); }
.dropdown-item--danger .ui-icon { color: var(--red); }
.dropdown-divider { height: 1px; background: var(--divider); margin: 5px 0; }

.notify-list { width: 300px; padding: 0; }
.notify-list .dropdown-header { padding: 12px 14px 8px; margin: 0; }
.notify-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--divider);
  transition: background var(--transition);
}
.notify-item:hover { background: var(--bg-hover); }
.notify-item .notify-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  flex: none;
}
.notify-item .notify-title { font-size: 13px; color: var(--text); line-height: 1.4; }
.notify-item .notify-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.notify-footer { border-top: 1px solid var(--divider); padding: 8px; text-align: center; font-size: 12px; }

/* ==================== 卡片 ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.card + .card { margin-top: 16px; }
.card:hover { box-shadow: var(--shadow-card-hover); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
  min-height: 50px;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card-title .ui-icon { color: var(--primary); }
.card-actions { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px; }
.card-body--np { padding: 0; }

.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 1200px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1400px) { .card-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ==================== 统计卡片 ==================== */
.stat-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1400px) { .stat-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), background var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }

.stat-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  color: #fff;
}
.bg-blue { background: linear-gradient(135deg, #4a7fb5, #3a6ea5); }
.bg-green { background: linear-gradient(135deg, #35b57c, #1e9e62); }
.bg-orange { background: linear-gradient(135deg, #f0a03c, #e8890c); }
.bg-red { background: linear-gradient(135deg, #e56b6b, #d94848); }
.bg-purple { background: linear-gradient(135deg, #9179f9, #7a5af8); }
.bg-cyan { background: linear-gradient(135deg, #3bb0c7, #0e9bb5); }

.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.25; letter-spacing: 0.2px; }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.stat-trend {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 10px;
}
.stat-trend.up { color: var(--green); background: var(--green-bg); }
.stat-trend.down { color: var(--red); background: var(--red-bg); }
.stat-trend .ui-icon { transform: rotate(-45deg); }
.stat-trend.down .ui-icon { transform: rotate(45deg); }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all var(--transition);
}
.btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.btn--primary, .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn--primary:hover, .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; box-shadow: 0 4px 12px var(--primary-shadow); }

.btn--success { background: var(--green); border-color: var(--green); color: #fff; }
.btn--success:hover { background: #178552; border-color: #178552; color: #fff; }

.btn--warning { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn--warning:hover { background: #d17c0b; border-color: #d17c0b; color: #fff; }

.btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn--danger:hover { background: #c53d3d; border-color: #c53d3d; color: #fff; }

.btn--text, .btn-text { border-color: transparent; background: transparent; color: var(--primary); padding: 0 8px; }
.btn--text:hover, .btn-text:hover { background: var(--primary-light); border-color: transparent; color: var(--primary); }

.btn--sm, .btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn--lg { height: 38px; padding: 0 20px; font-size: 14px; }
.btn--block { width: 100%; }

.btn--icon { padding: 0; width: 32px; }

/* ==================== 标签 ==================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag--blue { color: var(--blue); background: var(--blue-bg); border-color: var(--blue-border); }
.tag--green { color: var(--green); background: var(--green-bg); border-color: var(--green-border); }
.tag--orange { color: var(--orange); background: var(--orange-bg); border-color: var(--orange-border); }
.tag--red { color: var(--red); background: var(--red-bg); border-color: var(--red-border); }
.tag--purple { color: var(--purple); background: var(--purple-bg); border-color: var(--purple-border); }
.tag--cyan { color: var(--cyan); background: var(--cyan-bg); border-color: var(--cyan-border); }
.tag--gray { color: var(--gray); background: var(--gray-bg); border-color: var(--gray-border); }

.tag--dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ==================== 表格 ==================== */
.table-wrap { overflow-x: auto; }

.ui-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.ui-table thead th {
  background: var(--bg-subtle);
  color: var(--text-2);
  font-weight: 500;
  text-align: left;
  padding: 10px 14px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.ui-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--divider);
  color: var(--text);
  vertical-align: middle;
}
.ui-table tbody tr { transition: background var(--transition); }
.ui-table tbody tr:hover { background: var(--bg-hover); }
.ui-table tbody tr:last-child td { border-bottom: none; }
.ui-table .ta-center { text-align: center; }
.ui-table .ta-right { text-align: right; }
/* 列配置里的 align 生成的是 ta-r / ta-c，之前没有对应样式，所以数字列一直没真正右对齐 */
.ui-table .ta-r { text-align: right; }
.ui-table .ta-c { text-align: center; }
.ui-table .td-center { text-align: center; }

/* 表格内多行单元格（收货信息等） */
.tbl-cell-main { font-weight: 600; color: var(--text); line-height: 1.4; }
.tbl-cell-sub { margin-top: 2px; font-size: 12px; color: var(--text-3); line-height: 1.45; word-break: break-all; }
.tbl-cell-sub-inline { font-weight: 400; color: var(--text-3); margin-left: 2px; }

/* 审核弹窗信息摘要 */
.audit-summary {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 7px;
}
.audit-summary__row { display: flex; gap: 10px; font-size: 13px; line-height: 1.6; }
.audit-summary__row > span { flex: none; width: 72px; color: var(--text-3); }
.audit-summary__row > b { color: var(--text); font-weight: 600; word-break: break-all; }

/* 短信套餐卡片 */
.sms-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.sms-plan {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.sms-plan:hover { border-color: var(--blue-border); box-shadow: 0 8px 20px rgba(58, 110, 165, .09); transform: translateY(-2px); }
.sms-plan__name { font-size: 13px; font-weight: 600; color: var(--text-2); }
.sms-plan__count { font-size: 26px; font-weight: 700; line-height: 1.15; color: var(--text); }
.sms-plan__count span { font-size: 13px; font-weight: 500; color: var(--text-3); }
.sms-plan__price { font-size: 15px; font-weight: 700; color: var(--blue); }
.sms-plan__intro { font-size: 12px; line-height: 1.5; color: var(--text-3); min-height: 36px; }
.sms-plan__btn { margin-top: 4px; align-self: flex-start; }

/* 单元格内两行展示（主值 + 副值），中文长串不折行 */
.td-stack { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.td-stack b { font-weight: 500; color: var(--text); }
.td-stack span { font-size: 12px; color: var(--text-3); }
.td-nowrap { white-space: nowrap; }

.td-img {
  width: 44px; height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-inset);
  vertical-align: middle;
}
.td-imgs { display: flex; gap: 4px; }

/* 可复制编号（学校ID等） */
.td-copy {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 9px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  font-variant-numeric: tabular-nums;
  cursor: pointer; user-select: none;
  transition: background .18s, border-color .18s, color .18s;
}
.td-copy .ui-icon { opacity: .45; transition: opacity .18s; }
.td-copy:hover { background: var(--primary-light); border-color: rgba(51,112,255,.22); color: var(--primary); }
.td-copy:hover .ui-icon { opacity: 1; }
.td-copy.is-copied { background: var(--green-bg); border-color: rgba(0,168,112,.25); color: var(--green); }
.td-copy--chip { background: var(--bg-inset); border-color: var(--border); }

.school-id-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.school-id-empty {
  display: inline-flex; align-items: center; height: 24px;
  padding: 0 10px; border-radius: 999px;
  background: var(--bg-inset); border: 1px dashed var(--border);
  font-size: 12px; color: var(--text-3);
}
.school-id-tip { font-size: 12px; color: var(--text-3); line-height: 1.6; }

.td-user { display: flex; align-items: center; gap: 8px; }
.td-link { word-break: break-all; }
.td-json {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--text-2);
  font-size: 12px;
  cursor: help;
}

.tbl-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
}
.tbl-btn:hover { background: var(--primary-light); }
.tbl-btn--danger, .tbl-btn.danger { color: var(--red); }
.tbl-btn--danger:hover, .tbl-btn.danger:hover { background: var(--red-bg); }
.tbl-btn--warn { color: var(--orange); }
.tbl-btn--warn:hover { background: var(--orange-bg); }
.tbl-btn--ok { color: var(--green, #1e9e62); }
.tbl-btn--ok:hover { background: rgba(30, 158, 98, .1); }

.tbl-switch {
  display: inline-flex;
  cursor: pointer;
  vertical-align: middle;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.table-toolbar .toolbar-left { display: flex; gap: 8px; flex-wrap: wrap; }
.table-toolbar .toolbar-right { color: var(--text-3); font-size: 12px; }

.table-empty { padding: 0 !important; }

.ui-empty { padding: 42px 0; text-align: center; color: var(--text-3); }
.ui-empty .ui-icon { color: var(--text-4); margin-bottom: 8px; }
.ui-empty p { margin: 0; font-size: 13px; }

/* ==================== 筛选栏 ==================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-item > label { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.filter-btns { margin-left: auto; }
.daterange-sep { color: var(--text-3); }

/* ==================== 表单 ==================== */
.ui-form { display: flex; flex-wrap: wrap; gap: 0 20px; }
.ui-form .form-item { margin-bottom: 16px; }
.ui-form .span-24 { width: 100%; }
.ui-form .span-12 { width: calc(50% - 10px); }
.ui-form .span-8 { width: calc(33.333% - 14px); }

.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 6px;
  line-height: 1.4;
}
.form-label.required::before {
  content: "*";
  color: var(--red);
  margin-right: 4px;
}

.form-tip { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }
.form-static { font-size: 13px; color: var(--text); padding: 6px 0; }

.ui-input, .ui-select, .ui-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  padding: 7px 11px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.ui-input:hover, .ui-select:hover, .ui-textarea:hover { border-color: var(--text-4); }
.ui-input:focus, .ui-select:focus, .ui-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-fade); }
.ui-input::placeholder, .ui-textarea::placeholder { color: var(--text-4); }
.ui-input[disabled], .ui-select[disabled] { background: var(--bg-inset); color: var(--text-3); cursor: not-allowed; }

.ui-textarea { resize: vertical; min-height: 76px; line-height: 1.6; }

.ui-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2393a1b1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.ui-input--sm, .ui-select--sm { height: 30px; padding: 4px 10px; font-size: 12px; }
.ui-select--sm { padding-right: 28px; background-position: right 8px center; }

/* 开关 */
.ui-switch { display: inline-flex; cursor: pointer; vertical-align: middle; }
.ui-switch input { display: none; }
.switch-track {
  width: 38px; height: 20px;
  border-radius: 10px;
  background: var(--border-strong);
  position: relative;
  transition: background var(--transition);
  flex: none;
}
.switch-dot {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition);
}
.ui-switch input:checked + .switch-track { background: var(--primary); }
.ui-switch input:checked + .switch-track .switch-dot { transform: translateX(18px); }
.ui-switch input:disabled + .switch-track { opacity: 0.5; cursor: not-allowed; }

.tbl-switch .switch-track { width: 34px; height: 18px; }
.tbl-switch .switch-dot { width: 14px; height: 14px; }
.tbl-switch.on .switch-track { background: var(--primary); }
.tbl-switch.on .switch-dot { transform: translateX(16px); }

/* 单选 / 多选 */
.ui-radio, .ui-checkbox { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; margin-right: 16px; font-size: 13px; color: var(--text); }
.ui-radio input, .ui-checkbox input { display: none; }
.ui-radio > span, .ui-checkbox > span { position: relative; padding-left: 22px; line-height: 16px; }
.ui-radio > span::before, .ui-checkbox > span::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 15px; height: 15px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  transition: all var(--transition);
}
.ui-radio > span::before { border-radius: 50%; }
.ui-checkbox > span::before { border-radius: 4px; }
.ui-radio input:checked + span::before { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px var(--bg-card); }
.ui-checkbox input:checked + span::before { border-color: var(--primary); background: var(--primary); }
.ui-checkbox input:checked + span::after {
  content: "";
  position: absolute;
  left: 4px; top: 2px;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ui-check-group, .ui-radio-group { padding: 5px 0; }

/* 上传 */
.ui-upload { display: flex; align-items: flex-start; gap: 12px; }
.upload-preview {
  width: 96px; height: 96px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-inset);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-ph { text-align: center; color: var(--text-3); font-size: 11px; }
.upload-ph .ui-icon { display: block; margin: 0 auto 4px; color: var(--text-4); }
.upload-btns { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }

.ui-color { width: 44px; height: 30px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 2px; background: var(--bg-card); cursor: pointer; }

/* ==================== 题目选项编辑器 ==================== */
.option-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.option-letter {
  width: 22px; height: 22px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex: none;
}
.option-row .ui-input { flex: 1; }

/* 表格选中行 */
.ui-table tbody tr.row-selected { background: var(--primary-light); }

/* ==================== 分页 ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--divider);
  flex-wrap: wrap;
}
.page-info { font-size: 12px; color: var(--text-3); }
.page-list { display: flex; gap: 5px; }
.page-item {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 12px;
  transition: all var(--transition);
}
.page-item:hover { border-color: var(--primary); color: var(--primary); }
.page-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-item.disabled { color: var(--text-4); cursor: not-allowed; pointer-events: none; background: var(--bg-inset); }
.page-ellipsis { color: var(--text-3); padding: 0 2px; line-height: 28px; }

/* ==================== 弹窗 ==================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
}
.modal.open { display: flex; }

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(23, 34, 46, 0.45);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.16s ease;
}

.modal-dialog {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  width: calc(100% - 40px);
  margin-top: 7vh;
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.2s ease;
}
.modal-dialog--sm { max-width: 440px; }
.modal-dialog--md { max-width: 640px; }
.modal-dialog--lg { max-width: 860px; }
.modal-dialog--xl { max-width: 1080px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--divider);
  flex: none;
}
.modal-title { font-size: 15px; font-weight: 600; color: var(--text); }
.modal-close {
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text); }

.modal-container { overflow-y: auto; padding: 20px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 13px 20px;
  border-top: 1px solid var(--divider);
  flex: none;
}

/* 弹窗内表单底部操作条（粘在滚动区底部，长表单也始终可见） */
.modal-footer-inline {
  position: sticky;
  bottom: -20px;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 22px -20px -20px;
  padding: 13px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--divider);
}
.modal-footer-inline .btn { min-width: 82px; justify-content: center; }
.modal-footer-inline--static { justify-content: flex-end; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(-14px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ==================== Toast ==================== */
.toast-wrap {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  font-size: 13px;
  color: var(--text);
  animation: toastIn 0.22s ease;
  max-width: 80vw;
}
.toast--success .ui-icon { color: var(--green); }
.toast--error .ui-icon { color: var(--red); }
.toast--warning .ui-icon { color: var(--orange); }
.toast--info .ui-icon { color: var(--blue); }
.toast.hide { opacity: 0; transform: translateY(-8px); transition: all 0.25s ease; }
.toast--busy { pointer-events: none; }
.toast-spinner {
  width: 13px; height: 13px; flex: none;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: toastSpin 0.7s linear infinite;
}
@keyframes toastSpin { to { transform: rotate(360deg); } }

@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ==================== 标签页 ==================== */
.ui-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
}
.ui-tab {
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.ui-tab:hover { color: var(--primary); }
.ui-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

/* ==================== 提示条 ==================== */
.ui-alert {
  display: flex;
  gap: 9px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid;
  align-items: flex-start;
  line-height: 1.6;
}
.ui-alert .ui-icon { margin-top: 2px; flex: none; }
.ui-alert--info { background: var(--blue-bg); border-color: var(--blue-border); color: var(--blue); }
.ui-alert--success { background: var(--green-bg); border-color: var(--green-border); color: var(--green); }
.ui-alert--warning { background: var(--orange-bg); border-color: var(--orange-border); color: var(--orange); }
.ui-alert--error { background: var(--red-bg); border-color: var(--red-border); color: var(--red); }
.ui-alert a { color: inherit; text-decoration: underline; }
/* 提示条里放操作按钮时，别让它继承告警文字色和下划线（否则主按钮会变成同色背景+同色字） */
.ui-alert .btn { color: var(--text-2); text-decoration: none; flex: none; }
.ui-alert .btn:hover { color: var(--primary); text-decoration: none; }
.ui-alert .btn--primary, .ui-alert .btn--primary:hover { color: #fff; }
.ui-alert .btn--success, .ui-alert .btn--success:hover { color: #fff; }
.ui-alert .btn--warning, .ui-alert .btn--warning:hover { color: #fff; }
.ui-alert .btn--danger, .ui-alert .btn--danger:hover { color: #fff; }

/* ==================== 头像 / 进度条 ==================== */
.ui-avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; }

.ui-progress {
  height: 8px;
  border-radius: 4px;
  background: var(--bg-inset);
  overflow: hidden;
}
.ui-progress-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--primary);
  transition: width 0.4s ease;
}

/* ==================== 图表 ==================== */
.chart-box { width: 100%; }
.chart-box svg { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 4px 0; }
.chart-legend .legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.chart-legend .legend-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.chart-tooltip {
  position: fixed;
  z-index: 1500;
  background: var(--sidebar-bg-deep);
  color: #fff;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  pointer-events: none;
  box-shadow: var(--shadow-pop);
  white-space: nowrap;
  display: none;
}

/* ==================== 仪表盘 ==================== */
.dash-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-row--even { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .dash-row, .dash-row--even { grid-template-columns: 1fr; } }

.quick-entries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 700px) { .quick-entries { grid-template-columns: repeat(2, 1fr); } }
.quick-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 12px;
  transition: all var(--transition);
}
.quick-entry:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); transform: translateY(-2px); }
.quick-entry .qe-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
}

.feed-list { display: flex; flex-direction: column; }
.feed-item {
  display: flex;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--divider);
  align-items: flex-start;
}
.feed-item:last-child { border-bottom: none; }
.feed-item .feed-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.feed-item .feed-title { font-size: 13px; color: var(--text); line-height: 1.45; }
.feed-item .feed-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ==================== 登录页 ==================== */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg-body);
}
.login-banner {
  flex: 1.1;
  background: linear-gradient(150deg, #24425f 0%, #1c3348 55%, #16283a 100%);
  color: #fff;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-banner::before, .login-banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.login-banner::before { width: 480px; height: 480px; right: -140px; top: -140px; }
.login-banner::after { width: 320px; height: 320px; right: -60px; bottom: -100px; background: rgba(91, 155, 213, 0.08); }

.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-brand .brand-logo { width: 40px; height: 40px; font-size: 19px; border-radius: 10px; }
.login-brand-name { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.login-brand-sub { font-size: 12px; opacity: 0.65; margin-top: 1px; }

.login-slogan { margin-top: 12vh; position: relative; z-index: 1; }
.login-slogan h1 { font-size: 32px; font-weight: 700; margin: 0 0 14px; line-height: 1.35; letter-spacing: 0.5px; }
.login-slogan p { font-size: 14px; opacity: 0.72; max-width: 420px; margin: 0; line-height: 1.8; }

.login-features { margin-top: auto; display: flex; gap: 28px; position: relative; z-index: 1; flex-wrap: wrap; }
.login-feature { display: flex; align-items: center; gap: 8px; font-size: 13px; opacity: 0.85; }
.login-feature .ui-icon { color: #7fb3e0; }

.login-panel {
  width: 480px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-box { width: 100%; max-width: 360px; }
.login-title { font-size: 22px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.login-desc { font-size: 13px; color: var(--text-3); margin: 0 0 28px; }

.login-form .form-item { margin-bottom: 18px; }
.login-form .form-label { font-size: 13px; }
.login-captcha-row { display: flex; gap: 10px; }
.login-captcha-row .ui-input { flex: 1; }
.login-captcha-img {
  width: 110px; height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-inset);
  object-fit: cover;
}
.login-extra { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 12px; }
.login-links { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--divider); text-align: center; font-size: 12px; color: var(--text-3); }
.login-links a { margin: 0 8px; }

@media (max-width: 960px) {
  .login-banner { display: none; }
  .login-panel { width: 100%; }
}

/* ==================== 安装向导 ==================== */
.install-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #eef3f8 0%, #f6f9fc 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
}
.install-box {
  width: 100%;
  max-width: 680px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.install-header {
  padding: 26px 32px;
  background: linear-gradient(135deg, #2c4d6e, #1c3348);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
}
.install-header h1 { font-size: 19px; margin: 0; font-weight: 600; }
.install-header p { margin: 2px 0 0; font-size: 12px; opacity: 0.7; }
.install-steps { display: flex; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.install-step {
  flex: 1;
  text-align: center;
  padding: 13px 6px;
  font-size: 12px;
  color: var(--text-3);
  position: relative;
}
.install-step .step-no {
  display: inline-flex;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--border-strong);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-right: 6px;
  vertical-align: -6px;
}
.install-step.active { color: var(--primary); font-weight: 500; }
.install-step.active .step-no { background: var(--primary); }
.install-step.done .step-no { background: var(--green); }
.install-step.done { color: var(--green); }
.install-body { padding: 28px 32px; }
.install-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 32px;
  border-top: 1px solid var(--divider);
  background: var(--bg-subtle);
}
.env-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--divider);
  font-size: 13px;
}
.env-check-row:last-child { border-bottom: none; }
.env-check-row .env-name { color: var(--text-2); }
.env-check-row .env-val { color: var(--text-3); font-size: 12px; margin-left: 8px; }

/* ==================== 页面标题区 ==================== */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.page-title { font-size: 20px; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.page-desc { font-size: 13px; color: var(--text-3); margin: 0; }

/* ==================== 班级分布条 ==================== */
.class-dist { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.class-dist-row { display: flex; align-items: center; gap: 12px; }
.class-dist-name { width: 96px; font-size: 13px; color: var(--text-2); flex-shrink: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.class-dist-bar { flex: 1; height: 10px; background: var(--bg-inset); border-radius: 5px; overflow: hidden; }
.class-dist-fill { height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--primary), var(--blue));
  transition: width 0.4s ease; }
.class-dist-count { width: 56px; text-align: right; font-size: 12px; color: var(--text-3); flex-shrink: 0; }

/* ==================== 学校资料 ==================== */
.school-profile { display: flex; gap: 20px; align-items: flex-start; }
.school-profile-logo { flex-shrink: 0; }
.school-profile-logo img {
  width: 88px; height: 88px; border-radius: var(--radius);
  object-fit: cover; border: 1px solid var(--divider); background: var(--bg-subtle);
}
.school-logo-fallback {
  width: 88px; height: 88px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary);
  border: 1px dashed var(--primary-border, var(--border-strong));
}
.school-profile-info { flex: 1; min-width: 0; }
.school-profile-name { font-size: 17px; font-weight: 600; color: var(--text); margin: 0 0 10px; }

/* ==================== 表格单元格主副标题 ==================== */
.cell-title { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text); }
.cell-title .icon { color: var(--text-3); }
.cell-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ==================== 操作按钮 - 警示色 ==================== */
.tbl-btn--warning { color: var(--orange); }
.tbl-btn--warning:hover { background: var(--orange-bg); }

/* ==================== 升级日志时间线 ==================== */
.version-timeline { padding: 20px 24px 8px; }
.version-item { position: relative; padding: 0 0 22px 28px; }
.version-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 0;
  width: 2px;
  background: var(--divider);
}
.version-item:last-child { padding-bottom: 4px; }
.version-item:last-child::before { display: none; }
.version-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--primary);
  z-index: 1;
}
.version-item--current .version-dot { border-color: var(--purple, #7c5cbf); box-shadow: 0 0 0 4px rgba(124, 92, 191, 0.15); }
.version-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.version-no { font-size: 15px; font-weight: 600; color: var(--text); font-family: "SFMono-Regular", Consolas, monospace; }
.version-title { font-size: 13px; color: var(--text); }
.version-time { font-size: 12px; color: var(--text-3); margin-left: auto; }
.version-ops { display: inline-flex; gap: 2px; opacity: 0;
  transition: opacity var(--transition); }
.version-item:hover .version-ops { opacity: 1; }
.version-content {
  margin-top: 8px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm, 6px);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 900px) {
  .version-time { margin-left: 0; width: 100%; }
}

/* ==================== 通用工具类 ==================== */
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.text-primary { color: var(--primary); }
.text-success { color: var(--green); }
.text-warning { color: var(--orange); }
.text-danger { color: var(--red); }
.money { font-variant-numeric: tabular-nums; font-weight: 500; }
.fs-12 { font-size: 12px; }
.fs-14 { font-size: 14px; }
.fw-600 { font-weight: 600; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; }
.fr { float: right; }
.cf::after { content: ""; display: table; clear: both; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.pre-wrap { white-space: pre-wrap; word-break: break-all; }

/* ==================== 响应式 ==================== */
.sidebar-mask { display: none; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .layout--mobile-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-pop); }
  .layout--mobile-open .sidebar-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(23, 34, 46, 0.4);
    z-index: 99;
  }
  .main-wrap { margin-left: 0 !important; }
  .topbar-search { display: none; }
  .page-body { padding: 12px 12px 20px; }
  .dash-row { grid-template-columns: 1fr; }
}

/* 打印 */
@media print {
  .sidebar, .topbar, .page-footer { display: none; }
  .main-wrap { margin-left: 0; }
}

/* ==================== 地区三级目录 ==================== */
.page-header__ops { display: flex; align-items: center; gap: 8px; flex: none; }

/* 顶部统计条 */
.region-stat {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.region-stat__item {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--divider);
}
.region-stat__num { font-size: 18px; font-weight: 600; color: var(--primary); line-height: 1; }
.region-stat__label { font-size: 12px; color: var(--text-3); }
.region-stat__search {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 0 10px; height: 34px; min-width: 240px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-3);
}
.region-stat__search .ui-input { border: none; background: transparent; height: 30px; padding: 0; }
.region-stat__search .ui-input:focus { box-shadow: none; }

.region-tree { padding: 6px 0; }
.region-city { border-bottom: 1px solid var(--divider); }
.region-city:last-child { border-bottom: none; }
.region-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; border-radius: 8px;
  transition: background .15s;
}
.region-row:hover { background: var(--bg-subtle); }
.region-row--l2 { padding-left: 34px; }
.region-row--l2:hover { background: var(--bg-subtle); }

.region-toggle {
  flex: none; width: 22px; height: 22px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px; background: transparent;
  color: var(--text-3); cursor: pointer;
  transition: transform .18s ease, background .15s, color .15s;
}
.region-toggle:hover { background: var(--primary-light); color: var(--primary); }
.region-toggle svg { transition: transform .18s ease; }
.region-city.is-collapsed .region-toggle svg { transform: rotate(-90deg); }
.region-city.is-collapsed .region-body { display: none; }

.region-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 22px; padding: 0 6px;
  border-radius: 4px; font-size: 11px; font-weight: 600;
  background: rgba(58,110,165,.12); color: var(--primary);
  flex: none;
}
.region-badge--green { background: rgba(34,153,102,.12); color: var(--green); }
.region-name { font-size: 14px; font-weight: 500; color: var(--text); }
.region-count { font-size: 12px; color: var(--text-3); }
.region-dot { font-style: normal; margin: 0 4px; color: var(--text-4, var(--divider)); }

/* 操作按钮常显（淡），悬停加深，便于客户发现 */
.region-ops { margin-left: auto; display: flex; gap: 4px; opacity: .55; transition: opacity .15s; }
.region-row:hover .region-ops { opacity: 1; }

.region-body { padding-bottom: 4px; }
.region-blank {
  padding: 6px 20px 14px 76px;
  font-size: 12px; color: var(--text-3);
}
.region-towns { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 20px 12px 96px; }
.region-town {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px 6px 3px 10px; border-radius: 20px;
  background: var(--bg-subtle); border: 1px solid var(--divider);
  font-size: 12px; color: var(--text-2);
  transition: border-color .15s, color .15s, background .15s;
}
.region-town:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.region-town__name {
  border: none; background: none; cursor: pointer; padding: 0;
  font-family: inherit; font-size: 12px; color: inherit; line-height: 1.4;
}
.region-town-del {
  border: none; background: none; cursor: pointer;
  color: var(--text-3); font-size: 13px; line-height: 1; padding: 0 2px;
  border-radius: 50%;
}
.region-town-del:hover { color: var(--red); }
.region-noresult { padding: 34px 20px; text-align: center; font-size: 13px; color: var(--text-3); }

/* 表单内三级联动 */
.region-cascade { display: flex; gap: 8px; flex-wrap: wrap; }
.region-cascade .ui-select { flex: 1; min-width: 120px; }
.region-cascade .ui-select:disabled { background: var(--bg-subtle); cursor: not-allowed; }
.region-add-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 8px; font-size: 12px; color: var(--primary);
  text-decoration: none;
}
.region-add-link:hover { text-decoration: underline; }

/* ==================== 成绩单（总后台考试管理） ==================== */
.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--bg-subtle, #f2f5fa);
  color: var(--text, #1f2b3a);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rank-no--1 { background: linear-gradient(135deg, #ffd977, #f0b429); color: #6b4400; }
.rank-no--2 { background: linear-gradient(135deg, #e2e8f0, #c3ccd8); color: #48566a; }
.rank-no--3 { background: linear-gradient(135deg, #ffd7b0, #eaa274); color: #6d3a13; }

.exam-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.exam-stat {
  flex: 1 1 110px; min-width: 104px; background: var(--bg-subtle); border-radius: 10px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px;
}
.exam-stat__num { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.exam-stat__label { font-size: 12px; color: var(--text-3); }
.exam-stat--core { background: rgba(47, 111, 228, .06); }
.exam-stat--core .exam-stat__num { color: var(--brand-blue, #2f6fe4); }

.ui-table--compact thead th,
.ui-table--compact tbody td { padding-left: 9px; padding-right: 9px; }

/* 链接型文字（表格内跳转） */
.link { color: var(--brand-blue, #2f6fe4); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ==================== 升级记录条目 ==================== */
.version-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.version-item-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.65; color: var(--text-2); }
.version-item-row .tag { flex: 0 0 auto; margin-top: 2px; }

/* ==================== 打卡勋章设置 ==================== */
.badge-rule-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.badge-rule-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border: 1px solid var(--border, #e6edf7);
  border-radius: 10px; background: #fbfcfe;
}
.badge-rule-icon { width: 42px; height: 42px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.badge-rule-icon img { width: 42px; height: 42px; object-fit: contain; }
.badge-rule-icon span { font-size: 20px; color: var(--text-3, #98a8c0); }
.badge-rule-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.badge-rule-meta b { font-size: 13.5px; color: var(--text, #1f2329); }
.badge-rule-meta span { font-size: 12px; color: var(--text-3, #98a8c0); }
.badge-rule-input { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.badge-rule-input .ui-input { width: 86px; text-align: center; }
.badge-rule-unit { font-size: 12.5px; color: var(--text-3, #98a8c0); }

/* 家长详情里的勋章墙 */
.pn-badge-wall { display: flex; flex-wrap: wrap; gap: 12px; }
.pn-badge { width: 64px; text-align: center; }
.pn-badge__icon { width: 44px; height: 44px; margin: 0 auto 4px; }
.pn-badge__icon img { width: 100%; height: 100%; object-fit: contain; }
.pn-badge__name { font-size: 11.5px; color: var(--text-2, #5c6b7e); line-height: 1.3; }

/* ==================== 诊断分析规则（1.13.0） ==================== */
.diag-editor {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.9;
  min-height: 460px;
  padding: 14px 16px;
  background: var(--bg-inset);
  border-color: var(--border-strong);
  color: var(--text);
}
.diag-editor:focus { background: var(--bg-card); }

.diag-thresholds {
  margin: 4px 0 16px;
  padding: 14px 16px 4px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}
.diag-thresholds__title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 12px;
}
.diag-thresholds .ui-form { margin-bottom: 0; }
.diag-token-name {
  margin-top: 4px; font-size: 11px; color: var(--text-4);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.diag-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}

.diag-flow {
  display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px;
}
.diag-flow__step {
  flex: 1 1 180px; min-width: 170px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--bg-inset); border: 1px solid var(--border);
}
.diag-flow__step em {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11px; font-weight: 600;
  color: #fff; background: var(--primary);
}
.diag-flow__step b { font-size: 13px; color: var(--text); }
.diag-flow__step span { font-size: 12px; color: var(--text-3); line-height: 1.6; }
.diag-flow__arrow {
  display: flex; align-items: center; color: var(--text-4);
  flex: 0 0 auto;
}
@media (max-width: 1100px) { .diag-flow__arrow { display: none; } }

.diag-preview { padding: 4px 2px 0; }
.diag-preview__meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: var(--text-3);
}
.diag-preview__tip {
  margin: 10px 0 8px; font-size: 12px; color: var(--text-3); line-height: 1.6;
}
.diag-prompt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.75;
  background: var(--bg-inset); color: var(--text);
  border-color: var(--border-strong);
  min-height: 420px;
}
.diag-tokens {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.diag-token {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; color: var(--text-2);
  background: var(--bg-inset); border: 1px solid var(--border);
}
.diag-token b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--blue); font-weight: 600;
}
.diag-token em { font-style: normal; color: var(--text-4); }

/* ==================== 诊断分析 · 试卷图片试跑（1.15.0） ==================== */
.ui-form .span-6 { width: calc(25% - 11px); }
.ui-form .span-4 { width: calc(16.666% - 12px); }

.diag-test { margin-top: 2px; }
.diag-test__grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.diag-test__left { position: sticky; top: 12px; }

.diag-drop {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 240px;
  padding: 0;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
}
.diag-drop:hover, .diag-drop.is-over { border-color: var(--primary); background: var(--primary-light); }
.diag-drop.has-file { border-style: solid; border-color: var(--border); background: var(--bg-card); }
.diag-drop.has-file > .diag-drop__empty { display: none; }
.diag-drop img { display: block; width: 100%; max-height: 330px; object-fit: contain; }
.diag-drop__empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 24px 16px; text-align: center; color: var(--text-3);
}
.diag-drop__empty b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.diag-drop__empty span { font-size: 12px; line-height: 1.6; }
.diag-drop__empty .ui-icon { color: var(--primary); }
.diag-drop__corner {
  position: absolute; top: 8px; right: 8px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px; border-radius: 20px;
  background: rgba(20, 26, 34, 0.62); color: #fff; font-size: 11.5px;
}
.diag-drop__corner:hover { background: var(--red); }

/* 选中文件后收起成一条「继续添加」窄条 */
.diag-drop.is-compact { min-height: 74px; border-style: dashed; background: var(--bg-subtle); }
.diag-drop.is-compact:hover { background: var(--primary-light); border-color: var(--primary); }
.diag-drop__more {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--primary);
}
.diag-drop__more .ui-icon { color: var(--primary); }

.diag-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.diag-files__head { width: 100%; font-size: 12px; color: var(--text-3); }
.diag-file {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 7px 30px 7px 7px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card);
}
.diag-file__thumb {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 6px; overflow: hidden;
  background: var(--bg-subtle);
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--red);
}
.diag-file__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.diag-file__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.diag-file__meta b {
  font-size: 12px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.diag-file__meta span { font-size: 11px; color: var(--text-3); }
.diag-file__del {
  position: absolute; top: 6px; right: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0;
  border: none; border-radius: 50%;
  background: transparent; color: var(--text-3);
  font-size: 15px; line-height: 1; cursor: pointer;
}
.diag-file__del:hover { background: var(--red-bg); color: var(--red); }

.diag-test__tip { margin-top: 8px; font-size: 11.5px; line-height: 1.7; color: var(--text-3); }
.diag-test__fields { gap: 0 14px; }
.diag-test__actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 2px; padding-top: 14px;
  border-top: 1px solid var(--divider);
}
.diag-test__model { display: flex; align-items: center; gap: 8px; }
.diag-test__model-label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; color: var(--text-2); white-space: nowrap;
}
.diag-test__model .ui-select { width: 330px; max-width: 46vw; }

.diag-test__result {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}
.diag-report__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.diag-report__bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px dashed var(--divider);
}
.diag-report__body {
  padding: 18px 20px;
  max-height: 620px; overflow: auto;
  font-size: 13.5px; line-height: 1.95; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
/* 渲染后的 Markdown：标题 / 列表 / 引用 / 分隔线 */
.diag-report__body--md { white-space: normal; }
.diag-report__body--md h3 { margin: 4px 0 10px; font-size: 16px; line-height: 1.6; }
.diag-report__body--md h4 {
  margin: 18px 0 8px; padding-bottom: 6px; font-size: 14.5px; line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.diag-report__body--md h5 { margin: 14px 0 6px; font-size: 13.8px; color: var(--text); }
.diag-report__body--md h6 { margin: 12px 0 4px; font-size: 13.5px; color: var(--text-2); }
.diag-report__body--md p { margin: 0 0 9px; }
.diag-report__body--md ul, .diag-report__body--md ol { margin: 0 0 10px; padding-left: 22px; }
.diag-report__body--md li { margin: 3px 0; }
.diag-report__body--md hr { margin: 14px 0; border: 0; border-top: 1px dashed var(--border); }
.diag-report__body--md blockquote {
  margin: 0 0 10px; padding: 8px 12px;
  border-left: 3px solid var(--border);
  background: var(--bg-2); color: var(--text-2);
}
.diag-report__body--md code {
  padding: 1px 5px; border-radius: 4px;
  background: var(--bg-2); font-size: 12.5px;
}
.diag-report__body--md b { font-weight: 600; }
.diag-report__body--md > *:first-child { margin-top: 0; }
.diag-report__body--md > *:last-child { margin-bottom: 0; }
.diag-report__loading {
  display: flex; flex-direction: column; gap: 8px;
  padding: 34px 20px; text-align: center;
  font-size: 13.5px; color: var(--text-2);
}
.diag-report__loading em { font-style: normal; font-size: 12px; color: var(--text-3); }
.diag-report__error {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  border-left: 3px solid var(--red);
  background: var(--red-bg); color: var(--red); font-size: 13px; line-height: 1.7;
}
.diag-report__warn {
  padding: 10px 16px;
  background: var(--orange-bg); color: var(--orange); font-size: 12.5px; line-height: 1.7;
  border-bottom: 1px solid var(--orange-border);
}
.card.is-focus { box-shadow: 0 0 0 2px var(--primary-shadow), var(--shadow-card-hover); }

@media (max-width: 1100px) {
  .diag-test__grid { grid-template-columns: 1fr; }
  .diag-test__left { position: static; }
  .ui-form .span-6 { width: calc(50% - 11px); }
}

/* ==================== 模型配置 · 四层接入（1.16.0） ==================== */
.text-green { color: var(--green); }
.model-stats { grid-template-columns: repeat(4, 1fr); }
.model-layer { margin-bottom: 16px; overflow: hidden; }
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  padding: 16px;
}
.model-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: var(--transition);
}
.model-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.model-card.is-default { border-color: var(--green-border); background: linear-gradient(180deg, var(--green-bg), var(--bg-card) 46%); }
.model-card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.model-card__name { font-size: 15px; font-weight: 600; color: var(--text); }
.model-card__default {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; color: var(--green);
}
.model-role {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500;
  border: 1px solid transparent;
}
.model-role--purple { color: var(--purple); background: var(--purple-bg); border-color: var(--purple-border); }
.model-role--blue { color: var(--blue); background: var(--blue-bg); border-color: var(--blue-border); }
.model-role--green { color: var(--green); background: var(--green-bg); border-color: var(--green-border); }
.model-role--orange { color: var(--orange); background: var(--orange-bg); border-color: var(--orange-border); }
.model-role--gray { color: var(--gray); background: var(--gray-bg); border-color: var(--gray-border); }
.model-card__desc {
  font-size: 12.5px; line-height: 1.6; color: var(--text-3);
  min-height: 34px;
}
.model-kv {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 0;
  border-top: 1px dashed var(--divider);
  border-bottom: 1px dashed var(--divider);
}
.model-kv__row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; min-width: 0; }
.model-kv__row > span { flex: none; width: 62px; color: var(--text-3); }
.model-kv__row > b {
  font-weight: 500; color: var(--text);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.model-kv__code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px; color: var(--text-2);
  background: var(--bg-inset); border-radius: 4px; padding: 1px 6px;
}
.model-kv__url { font-weight: 400 !important; color: var(--text-2) !important; }
.model-kv__time { margin-left: 6px; font-size: 11px; color: var(--text-3); }
.model-card__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.model-card__actions a.btn { text-decoration: none; }
/* 卡片内按钮收紧一点，保证「测试 / 编辑 / 设默认 / 官网 / 删除」在一行放得下 */
.model-card__actions { gap: 4px; }
.model-card__actions .btn { padding: 0 8px; white-space: nowrap; }
.model-card__del {
  margin-left: auto;
  padding: 0 8px !important;
  background: transparent;
  border-color: transparent;
  color: var(--text-3);
}
.model-card__del:hover { color: var(--red); border-color: var(--red-border); background: var(--red-bg); }
.model-grid--ocr { grid-template-columns: minmax(340px, 560px); }
.model-empty {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 14px;
  padding: 18px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  color: var(--text-3);
}
.model-empty b { display: block; font-size: 13.5px; color: var(--text); margin-bottom: 2px; }
.model-empty span { font-size: 12.5px; line-height: 1.6; }
.model-empty .btn { margin-left: auto; flex: none; }
.model-layer__foot {
  display: flex; gap: 7px; align-items: flex-start;
  padding: 10px 16px;
  border-top: 1px solid var(--divider);
  background: var(--bg-subtle);
  color: var(--text-3); font-size: 12px; line-height: 1.7;
}
.model-chain { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.model-chain__node { padding: 2px 8px; border-radius: 20px; background: var(--bg-inset); color: var(--text-2); }
.model-chain__arrow { display: inline-flex; color: var(--text-3); }
.model-help__body { padding: 14px 18px 16px; font-size: 13px; line-height: 1.9; color: var(--text-2); }
.model-help__body ol { margin: 0; padding-left: 20px; }
.model-help__body code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px; background: var(--bg-inset); border-radius: 4px; padding: 1px 6px;
}
.model-help__note {
  margin-top: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-3); font-size: 12.5px; line-height: 1.8;
}
@media (max-width: 1200px) {
  .model-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 成绩分析测试（诊断分析页） ===== */
.diag-report__chip {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px; color: var(--text-2);
  line-height: 1.5;
}
.diag-summary {
  margin: 14px 16px 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--primary-50, rgba(45, 118, 245, .08));
  border: 1px solid var(--primary-100, rgba(45, 118, 245, .18));
}
.diag-summary__tag {
  font-size: 12px; font-weight: 600; color: var(--primary);
  margin-bottom: 6px; letter-spacing: .3px;
}
.diag-summary p {
  margin: 0; font-size: 13.5px; line-height: 1.95; color: var(--text);
}

/* ---------- 广告位管理 ---------- */
.ad-pos-pv {
  display: inline-flex; align-items: center; justify-content: center;
  width: 82px; height: 42px; border-radius: 7px;
  background: #f5f9ff; border: 1px dashed #cfdcee;
  vertical-align: middle;
}
.ad-pos-pv b {
  display: block; border-radius: 3px;
  background: linear-gradient(135deg, #9cc0f8, #5b8def);
  opacity: .8;
}
.ad-pos-code {
  display: block; margin-top: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px; color: #9aabbf; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px;
}
.ad-pos-num { color: var(--primary); font-weight: 600; }

/* ==================== 打卡勋章阶段（海报模板弹窗内配置） ==================== */
.bstage {
  margin: 2px 0 4px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border, #e3ebf7);
  border-radius: var(--radius, 12px);
  background: var(--bg-subtle, #f7fafe);
}
.bstage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bstage-head__text { display: flex; flex-direction: column; gap: 4px; }
.bstage-head__text b { font-size: 13.5px; color: var(--text, #1f2329); }
.bstage-head__text span { font-size: 12px; color: var(--text-3, #8b9cb3); line-height: 1.6; }
.bstage-rows { display: flex; flex-direction: column; gap: 8px; }

.bstage-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e7eef9);
  border-radius: 10px;
}
.bstage-idx {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; color: #fff;
  background: linear-gradient(160deg, #5b9bdc, #3a6ea5);
}
.bstage-need { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.bstage-need em { font-style: normal; font-size: 12px; color: var(--text-3, #8b9cb3); }
.bstage-need .ui-input { width: 76px; text-align: center; }

.bstage-pick { position: relative; flex: 1; min-width: 0; }
.bstage-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 5px 10px; border: 1px solid var(--border, #e7eef9); border-radius: 9px;
  background: var(--bg-inset, #f8fbff); cursor: pointer; text-align: left;
  transition: border-color .16s;
}
.bstage-btn:hover { border-color: var(--primary, #3a6ea5); }
.bstage-btn img { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; }
.bstage-btn span { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text, #1f2329); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bstage-caret { color: var(--text-3, #a4b3c6); display: flex; }
.bstage-caret svg { width: 13px; height: 13px; }

.bstage-pop {
  display: none; position: absolute; z-index: 40; left: 0; top: calc(100% + 6px);
  width: 352px; max-width: 78vw; max-height: 264px; overflow: auto;
  padding: 10px; border: 1px solid var(--border, #e3ebf7); border-radius: 12px;
  background: var(--bg-card, #fff);
  box-shadow: 0 14px 34px rgba(31, 74, 133, .16);
}
.bstage-pop.open { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bstage-opt {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; border: 1px solid transparent; border-radius: 10px;
  background: var(--bg-subtle, #f6faff); cursor: pointer; transition: all .15s;
}
.bstage-opt img { width: 46px; height: 46px; object-fit: contain; }
.bstage-opt span { font-size: 11.5px; color: var(--text-2, #5b6b80); white-space: nowrap; }
.bstage-opt:hover { border-color: var(--primary, #3a6ea5); background: var(--primary-light, #eef5ff); }
.bstage-opt.is-on { border-color: var(--primary, #3a6ea5); background: var(--primary-light, #eef5ff); box-shadow: 0 3px 10px rgba(58, 110, 165, .16); }
.bstage-opt.is-on span { color: var(--primary, #3a6ea5); font-weight: 600; }

.bstage-del {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; border: none;
  background: transparent; color: var(--text-3, #b3c1d4); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bstage-del:hover { color: var(--red, #d94848); background: var(--red-bg, #fdeeee); }

.bstage-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.bstage-add {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; font-size: 12.5px; color: var(--primary, #3a6ea5);
  border: 1px dashed var(--primary, #3a6ea5); border-radius: 9px;
  background: transparent; cursor: pointer;
}
.bstage-add:hover { background: var(--primary-light, #eef5ff); }
.bstage-tip { font-size: 12px; color: var(--text-3, #8b9cb3); }

/* 列表里的阶段小图标 */
.bstage-mini { display: flex; align-items: flex-end; gap: 8px; }
.bstage-mini__item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bstage-mini__item img { width: 30px; height: 30px; object-fit: contain; }
.bstage-mini__item i { font-style: normal; font-size: 10.5px; color: var(--text-3, #8b9cb3); }

/* 勋章图标库（勋章设置弹窗） */
.bicon-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.bicon-item {
  width: 56px; height: 56px; padding: 4px; border-radius: 10px;
  border: 1px solid var(--border, #e7eef9); background: var(--bg-card, #fff);
  cursor: pointer; transition: all .15s;
}
.bicon-item img { width: 100%; height: 100%; object-fit: contain; }
.bicon-item:hover { border-color: var(--primary, #3a6ea5); }
.bicon-item.is-on { border-color: var(--primary, #3a6ea5); box-shadow: 0 4px 12px rgba(58, 110, 165, .18); }
.bicon-tip { margin-top: 8px; font-size: 12px; color: var(--text-3, #8b9cb3); }

/* 勋章引用 / 海报阶段只读列表 */
.bicon-usage-list { display: flex; flex-direction: column; margin-top: 10px; }
.bicon-usage { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--divider, #eef2f8); }
.bicon-usage:last-child { border-bottom: none; }
.bicon-usage img { width: 34px; height: 34px; object-fit: contain; }
.bicon-usage b { font-size: 13px; color: var(--text, #1f2329); }
.bicon-usage span { font-size: 12px; color: var(--text-3, #8b9cb3); }

/* ==================== VIP 申请审核（v1.28.0） ==================== */
/* 侧边栏待办角标 */
.nav-badge {
  flex: none;
  min-width: 18px; height: 18px;
  margin-left: 6px; padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px; font-style: normal; font-weight: 600;
  line-height: 18px; text-align: center;
  box-shadow: 0 1px 4px rgba(214, 69, 69, .35);
}
.layout--collapsed .nav-badge { display: none; }

/* 顶栏消息点：只有普通消息时置灰 */
.topbar-btn .dot--muted { background: #b8c2d1; }

/* 列表里的凭证缩略图 */
.vap-thumb {
  width: 56px; height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f3f6fb;
  cursor: zoom-in;
  transition: transform .15s ease;
}
.vap-thumb:hover { transform: scale(1.06); }

/* 审核弹窗里的凭证大图 */
.vap-proof {
  display: block;
  max-width: 100%;
  max-height: 420px;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f7f9fc;
  cursor: zoom-in;
}
.vap-reject-txt {
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
  line-height: 1.7;
}

/* ==================== 每日签到（v1.29.0） ==================== */
.sign-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 1180px) { .sign-layout { grid-template-columns: minmax(0, 1fr); } }

.sign-main .card + .card { margin-top: 16px; }
.sign-side .card + .card { margin-top: 16px; }

/* 运行状态徽标 */
.sign-state {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px;
  border-radius: 12px;
  font-size: 12px; font-weight: 600;
}
.sign-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sign-state.is-on { color: var(--green); background: var(--green-bg); border: 1px solid var(--green-border); }
.sign-state.is-off { color: var(--gray); background: var(--gray-bg); border: 1px solid var(--gray-border); }

/* 大号开关行 */
.sign-toggle {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.sign-toggle__text { flex: 1; min-width: 0; }
.sign-toggle__title { font-size: 14px; font-weight: 600; color: var(--text); }
.sign-toggle__desc { margin-top: 5px; font-size: 12px; color: var(--text-3); line-height: 1.65; }
.ui-switch--lg .switch-track { width: 50px; height: 26px; border-radius: 13px; }
.ui-switch--lg .switch-dot { width: 22px; height: 22px; }
.ui-switch--lg input:checked + .switch-track .switch-dot { transform: translateX(24px); }

.sign-field { margin-top: 16px; }
.sign-field .form-label { display: block; margin-bottom: 7px; font-size: 13px; color: var(--text-2); }
.sign-field textarea.ui-textarea { width: 100%; }

.sign-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 900px) { .sign-grid2 { grid-template-columns: 1fr; } }

.sign-input-unit { display: flex; align-items: center; gap: 8px; }
.sign-input-unit .ui-input { flex: 1; min-width: 0; }
.sign-input-unit em { font-style: normal; font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* 阶梯奖励 */
.sign-sub { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--divider); }
.sign-sub__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sign-sub__title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.sign-sub__desc { margin-top: 4px; font-size: 12px; color: var(--text-3); line-height: 1.65; }
.sign-sub__desc b { color: var(--text-2); }

.sign-rules { display: flex; flex-direction: column; gap: 8px; }
.sign-rules__empty {
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
  background: var(--bg-subtle);
}
.sign-rule {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  transition: border-color var(--transition), background var(--transition);
}
.sign-rule:hover { border-color: var(--primary-shadow); background: var(--bg-hover); }
.sign-rule__idx {
  flex: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.sign-rule__cell { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.sign-rule__cell em { font-style: normal; white-space: nowrap; }
.sign-rule__cell .ui-input--sm { width: 64px; text-align: center; }
.sign-rule__sum { margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.sign-rule__del {
  flex: none;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  border-radius: 6px; color: var(--text-4); cursor: pointer;
}
.sign-rule__del:hover { background: var(--red-bg); color: var(--red); }

.sign-hint {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.7;
}
.sign-hint b { color: var(--primary); }

.sign-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.sign-actions__tip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }

/* 规则预览表 */
.sign-preview { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sign-preview th {
  padding: 9px 12px;
  text-align: left;
  font-weight: 500;
  color: var(--text-3);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--divider);
  white-space: nowrap;
}
.sign-preview td { padding: 9px 12px; color: var(--text-2); border-bottom: 1px solid var(--divider); }
.sign-preview tr:last-child td { border-bottom: none; }
.sign-preview tr.is-hit td { background: var(--green-bg); color: var(--text); }
.sign-preview tr.is-hit td:first-child { font-weight: 600; color: var(--green); }
.sign-preview .is-bonus { color: var(--orange); font-weight: 600; }
.sign-preview .is-total { color: var(--text); font-weight: 700; }
.sign-preview .is-total em { font-style: normal; font-size: 10.5px; color: var(--text-3); font-weight: 400; }
.sign-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); vertical-align: 1px; }

/* 7 日趋势 */
.sign-trend {
  display: flex; align-items: flex-end; gap: 8px;
  height: 132px;
  padding-top: 16px;
}
.sign-trend__col {
  flex: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px;
}
.sign-trend__num { font-size: 11px; color: var(--text-3); line-height: 1; }
.sign-trend__bar {
  width: 100%; max-width: 26px;
  min-height: 2px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #6fa6dd, #3a6ea5);
  transition: height var(--transition);
}
.sign-trend__col:hover .sign-trend__bar { background: linear-gradient(180deg, #8fbde9, #3a6ea5); }
.sign-trend__label { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }

/* 活跃榜 */
.sign-top__row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--divider);
}
.sign-top__row:last-child { border-bottom: none; }
.sign-top__rank {
  flex: none;
  width: 20px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  color: var(--text-3); background: var(--bg-inset);
}
.sign-top__rank.is-top { color: #fff; background: linear-gradient(135deg, #f3b34a, #e8890c); }
.sign-top__info { flex: 1; min-width: 0; }
.sign-top__name { font-size: 12.5px; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sign-top__meta { margin-top: 2px; font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sign-top__num { flex: none; text-align: right; }
.sign-top__num b { font-size: 14px; color: var(--primary); }
.sign-top__num em { font-style: normal; font-size: 11px; color: var(--text-3); margin-left: 2px; }

/* 签到记录页汇总条 */
.sign-sum {
  display: flex; flex-wrap: wrap; gap: 28px;
  margin-bottom: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-light), var(--bg-card));
  border: 1px solid var(--blue-border);
}
.sign-sum__item { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--text-3); }
.sign-sum__item b { font-size: 19px; font-weight: 700; color: var(--text); }
.sign-sum__item b.is-pts { color: var(--primary); }
.sign-sum__item b.is-bonus { color: var(--orange); }
.sign-sum__item em { font-style: normal; font-size: 11.5px; }
.sign-pts { color: var(--orange); font-weight: 600; font-size: 13px; }

/* 签到记录：家长单元格（昵称 + 手机号两行） */
.sign-user { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.sign-user b { font-weight: 500; color: var(--text); font-size: 12.5px; }
.sign-user span { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- 富文本编辑器（活动介绍等正文） ---------- */
.rte { border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: var(--card, #fff); }
.rte__toolbar {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 8px;
  border-bottom: 1px solid var(--border); background: var(--bg-soft, #fafcff);
}
.rte__btn {
  min-width: 30px; height: 28px; padding: 0 8px;
  border: 0; background: transparent; border-radius: 5px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.rte__btn:hover { background: #eaf1fb; color: #2f6fe4; }
.rte__btn.is-active { background: #e2edfe; color: #2f6fe4; }
.rte__sep { width: 1px; background: var(--border); margin: 4px 6px; }
.rte__body {
  min-height: 180px; max-height: 420px; overflow-y: auto;
  padding: 14px 16px; font-size: 14px; line-height: 1.8; color: var(--text);
  outline: none;
}
.rte__body:empty::before { content: attr(data-placeholder); color: var(--text-4); }
.rte__body img { max-width: 100%; border-radius: 6px; }
.rte__body h3 { font-size: 16px; margin: 12px 0 8px; }
.rte__body ul, .rte__body ol { padding-left: 22px; margin: 8px 0; }
.rte__body blockquote { border-left: 3px solid #cfe0f7; margin: 8px 0; padding: 4px 12px; color: var(--text-2); background: #f8fbff; }
.rte__body table { border-collapse: collapse; }
.rte__body td, .rte__body th { border: 1px solid var(--border-strong); padding: 6px 10px; }
[data-theme="dark"] .rte { background: #17202b; }
[data-theme="dark"] .rte__toolbar { background: #1b2632; border-color: #243040; }
[data-theme="dark"] .rte__body { color: #dfe7f1; }
[data-theme="dark"] .rte__body:empty::before { color: #5c6a7a; }

/* ---------- 商品详情内容（后台查看弹窗预览） ---------- */
.goods-detail-preview {
  max-height: 300px; overflow: auto; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-soft, #fafcff);
  font-size: 13px; line-height: 1.8; color: var(--text-2);
}
.goods-detail-preview > *:first-child { margin-top: 0; }
.goods-detail-preview h3 { margin: 12px 0 6px; font-size: 14px; color: var(--text); }
.goods-detail-preview ul { padding-left: 20px; margin: 6px 0; }
.goods-detail-preview img { max-width: 100%; border-radius: 6px; }

/* 四列统计卡（活动报名审核总览等） */
.stat-cards--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .stat-cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .stat-cards--4 { grid-template-columns: 1fr; } }

/* ==========================================================
   系统管理 · 系统设置（系统名 / 介绍 / 联系方式 / 备案）
   ========================================================== */
.sysset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 16px;
  align-items: start;
}
.sysset-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sysset-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 8px; }

.sysset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}
.sysset-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sysset-field--full { grid-column: 1 / -1; }
.sysset-field .form-tip { margin-top: 0; }
.sysset-field .ui-upload { margin-top: 0; }
.sysset-switch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 38px; }
.sysset-switch .text-2 { font-size: 12px; line-height: 1.5; }
.sysset-switch code {
  padding: 1px 6px; border-radius: 4px; font-size: 11.5px;
  background: #f1f5fb; color: #47688f;
}

.sysset-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-card, 0 1px 3px rgba(20, 40, 70, .06));
}
.sysset-actions__tip {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 右侧预览 ---------- */
.sysset-preview {
  padding: 16px 15px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(120% 70% at 88% 0%, var(--primary-fade) 0%, transparent 62%),
    var(--bg-subtle);
}
.sysset-preview__brand { display: flex; align-items: center; gap: 10px; }
.sysset-preview__logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5b9bd5, #3a6ea5);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(58, 110, 165, .26);
}
.sysset-preview__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sysset-preview__ph { line-height: 1; }
.sysset-preview__txt { min-width: 0; }
.sysset-preview__txt b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sysset-preview__txt i {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 9px;
  letter-spacing: .9px;
  color: var(--text-4);
}
.sysset-preview__intro {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sysset-preview__lines {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed var(--divider);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sysset-preview__lines > div { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sysset-preview__lines span {
  flex: 0 0 76px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-4);
}
.sysset-preview__lines b {
  min-width: 0;
  font-weight: 600;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sysset-preview__foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--text-4);
}

@media (max-width: 1180px) {
  .sysset { grid-template-columns: minmax(0, 1fr); }
  .sysset-side { position: static; }
}
@media (max-width: 720px) {
  .sysset-grid { grid-template-columns: 1fr; }
  .sysset-actions { flex-wrap: wrap; }
}

/* 侧栏品牌 LOGO 支持图片（系统设置里的系统 Logo） */
.brand-logo { overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

/* 页脚 ICP 备案号 */
.page-footer .footer-icp { color: inherit; text-decoration: none; }
.page-footer .footer-icp:hover { color: var(--primary); text-decoration: underline; }

/* ==========================================================
   学年管理 / 学年升级向导（1.58.0）
   ========================================================== */

/* ---------- 顶部提示 ---------- */
.yr-init-tip {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; margin-bottom: 16px;
  background: var(--orange-bg); border: 1px solid var(--orange-border); border-radius: 10px;
}
.yr-init-icon { color: var(--orange); flex: none; display: flex; }
.yr-init-body { flex: 1; min-width: 0; }
.yr-init-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.yr-init-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }

/* ---------- 学校概要条 ---------- */
.yr-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 10px;
}
.yr-hero-l { min-width: 0; }
.yr-hero-name {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 16px; font-weight: 600; color: var(--text);
}
.yr-hero-meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 8px; font-size: 12.5px; color: var(--text-2);
}
.yr-hero-meta b { color: var(--text); font-weight: 600; }
.yr-hero-r { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; }

.yr-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 5px;
  font-size: 11.5px; font-weight: 500;
  background: var(--primary-light); color: var(--primary);
}
.yr-chip--ok { background: var(--green-bg); color: var(--green); }
.yr-chip--muted { background: var(--bg-inset); color: var(--text-3); }

/* ---------- 最近升级条 ---------- */
.yr-last {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 16px;
  background: var(--bg-subtle); border-radius: 8px;
  font-size: 12.5px; color: var(--text-2);
}
.yr-last b { color: var(--text); }
.yr-last-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.yr-last-link {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  color: var(--primary); text-decoration: none; font-size: 12.5px;
}
.yr-last-link:hover { text-decoration: underline; }

.yr-row-cur { background: var(--primary-fade); }
.yr-row-grad { background: var(--orange-bg); }
.yr-row-overdue { background: var(--red-bg, #fdecec); }

/* ---------- 新建学年 ---------- */
.yr-newyear { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.yr-newyear-field { flex: 1; min-width: 220px; max-width: 420px; }

/* ---------- 步骤条 ---------- */
.yr-init-head { margin-bottom: 16px; }
.yr-steps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yr-step {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px 6px 8px; border-radius: 20px;
  font-size: 12.5px; color: var(--text-3);
  background: var(--bg-inset);
}
.yr-step-n {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600;
  background: var(--bg-card); color: var(--text-3);
}
.yr-step.is-done { background: var(--green-bg); color: var(--green); }
.yr-step.is-done .yr-step-n { background: var(--green); color: #fff; }
.yr-step.is-on { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.yr-step.is-on .yr-step-n { background: var(--primary); color: #fff; }
.yr-step.is-warn { background: var(--orange-bg); color: var(--orange); }
.yr-step.is-warn .yr-step-n { background: var(--orange); color: #fff; }
.yr-step-line { flex: 1; min-width: 16px; height: 1px; background: var(--border-strong); }

/* ---------- 学段选择 ---------- */
.yr-stage-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
}
.yr-stage {
  position: relative; display: block; cursor: pointer;
  padding: 14px 16px; border: 1.5px solid var(--border-strong);
  border-radius: 10px; background: var(--bg-card);
  transition: border-color .15s, background .15s;
}
.yr-stage:hover { border-color: var(--primary); }
.yr-stage.is-on { border-color: var(--primary); background: var(--primary-fade); }
.yr-stage input { position: absolute; opacity: 0; pointer-events: none; }
.yr-stage-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.yr-stage-desc { font-size: 12px; color: var(--text-3); }
.yr-stage-grades { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.yr-g {
  padding: 1px 6px; border-radius: 4px; font-size: 11px;
  background: var(--bg-inset); color: var(--text-2);
}
.yr-g.is-final { background: var(--orange-bg); color: var(--orange); font-weight: 500; }

.yr-submit {
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  margin-top: 18px;
}

/* ---------- 空状态 ---------- */
.yr-empty-target {
  margin-top: 16px; padding: 44px 20px; text-align: center;
  background: var(--bg-card); border: 1px dashed var(--border-strong); border-radius: 10px;
}
.yr-empty-icon { color: var(--text-4); display: flex; justify-content: center; margin-bottom: 12px; }
.yr-empty-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.yr-empty-desc { font-size: 13px; color: var(--text-2); max-width: 520px; margin: 0 auto 18px; line-height: 1.7; }
.yr-empty-target .yr-newyear { justify-content: center; }

.yr-target-form { display: inline-block; }
.yr-target-form .ui-select { min-width: 260px; }

/* ---------- 体检清单 ---------- */
.yr-check { list-style: none; margin: 0; padding: 0; }
.yr-check-item {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-bottom: 1px solid var(--divider);
  font-size: 13px;
}
.yr-check-item:last-child { border-bottom: none; }
.yr-check-ico { display: flex; flex: none; }
.yr-check-label { color: var(--text); font-weight: 500; flex: none; min-width: 150px; }
.yr-check-num {
  padding: 0 7px; height: 18px; line-height: 18px; border-radius: 9px;
  font-size: 11.5px; font-weight: 600; background: var(--bg-inset); color: var(--text-2);
}
.yr-check-detail { color: var(--text-3); font-size: 12.5px; flex: 1; min-width: 0; }
.yr-check-jump { color: var(--primary); text-decoration: none; font-size: 12.5px; flex: none; }
.yr-check-jump:hover { text-decoration: underline; }
.yr-check--ok .yr-check-ico { color: var(--green); }
.yr-check--warn .yr-check-ico { color: var(--orange); }
.yr-check--warn .yr-check-num { background: var(--orange-bg); color: var(--orange); }
.yr-check--error { background: var(--red-bg, #fdf0f0); }
.yr-check--error .yr-check-ico { color: var(--red, #d64545); }
.yr-check--error .yr-check-num { background: var(--red-bg, #fbe3e3); color: var(--red, #d64545); }
.yr-check--info .yr-check-ico { color: var(--blue); }

/* ---------- 映射表 ---------- */
.yr-code {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px; background: var(--bg-inset); color: var(--text-2);
}
.yr-code--new { background: var(--green-bg); color: var(--green); font-weight: 600; }
.yr-arrow { color: var(--text-4); display: inline-flex; }
.yr-prebuilt {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 20px; border-top: 1px solid var(--divider);
  background: var(--bg-subtle); font-size: 12.5px; color: var(--text-2);
  border-radius: 0 0 10px 10px;
}
.yr-prebuilt-label { display: inline-flex; align-items: center; gap: 5px; }
.yr-prebuilt-chip {
  padding: 1px 7px; border-radius: 4px; background: var(--bg-card);
  border: 1px solid var(--border-strong); color: var(--text-2); font-size: 11.5px;
}

/* ---------- 执行结果 ---------- */
.yr-done {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 10px;
  background: var(--green-bg); border: 1px solid var(--green-border);
}
.yr-done-ico { color: var(--green); display: flex; flex: none; }
.yr-done-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.yr-done-desc { font-size: 12.5px; color: var(--text-2); }
.yr-done-desc b { color: var(--text); }
.yr-act-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

.yr-runform .yr-confirm {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 13px 16px; border-radius: 8px;
  background: var(--bg-subtle); font-size: 13px; color: var(--text-2);
  line-height: 1.65; cursor: pointer;
}
.yr-runform .yr-confirm input { margin-top: 2px; flex: none; }
.yr-runform .yr-confirm b { color: var(--text); }

/* ---------- 看板 ---------- */
.yr-board-top {
  display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap;
}
.yr-board-stat {
  min-width: 132px; padding: 16px 20px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
}
.yr-board-stat--warn { border-color: var(--orange-border); background: var(--orange-bg); }
.yr-board-stat--danger { border-color: var(--red-border, #f3cccc); background: var(--red-bg, #fdecec); }
.yr-board-num { font-size: 26px; font-weight: 700; line-height: 1; color: var(--text); }
.yr-board-stat--warn .yr-board-num { color: var(--orange); }
.yr-board-stat--danger .yr-board-num { color: var(--red, #d64545); }
.yr-board-label { margin-top: 7px; font-size: 12.5px; color: var(--text-2); }
.yr-board-tip {
  flex: 1; min-width: 240px; display: flex; flex-direction: column; justify-content: center;
  padding: 16px 20px; border-radius: 10px;
  background: var(--bg-subtle); font-size: 13px; color: var(--text-2); gap: 5px;
}
.yr-board-tip b { color: var(--text); }

@media (max-width: 900px) {
  .yr-hero { flex-direction: column; align-items: stretch; }
  .yr-hero-r { justify-content: flex-start; }
  .yr-step-line { display: none; }
  .yr-stage-grid { grid-template-columns: 1fr; }
}

/* ---------- 仪表盘学年提醒横幅 ---------- */
.yr-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; margin-bottom: 16px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--bg-subtle);
}
.yr-banner--info { background: var(--primary-fade); border-color: var(--blue-border); }
.yr-banner--danger { background: var(--red-bg, #fdecec); border-color: var(--red-border, #f3cccc); }
.yr-banner-ico { flex: none; display: flex; color: var(--primary); }
.yr-banner--danger .yr-banner-ico { color: var(--red, #d64545); }
.yr-banner-body { flex: 1; min-width: 0; }
.yr-banner-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.yr-banner-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
