/* =============================================================================
   培训机构消课系统 · 管理后台样式
   浅色 B 端主题：主色 #4F7CFF / 成功 #10B981 / 警告 #F59E0B / 危险 #EF4444
   ============================================================================= */

/* ----------------------------- 变量 ----------------------------- */
:root {
  --primary: #4F7CFF;
  --primary-dark: #3D66E0;
  --primary-light: #EEF3FF;
  --success: #10B981;
  --success-light: #E7F8F1;
  --warning: #F59E0B;
  --warning-light: #FEF4E6;
  --danger: #EF4444;
  --danger-light: #FDECEC;
  --info: #06B6D4;

  --bg: #F5F7FB;
  --card: #FFFFFF;
  --sidebar: #1E293B;
  --sidebar-hover: #273549;
  --sidebar-active: #4F7CFF;

  --text: #1F2937;
  --text-2: #64748B;
  --text-3: #94A3B8;
  --border: #E8EDF5;
  --border-2: #EEF1F6;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.16);

  --sidebar-w: 240px;
  --sidebar-w-collapsed: 64px;
  --topbar-h: 58px;
}

/* ----------------------------- 基础 ----------------------------- */
* { 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: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
::-webkit-scrollbar-track { background: transparent; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
.mono { font-variant-numeric: tabular-nums; }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.fw-600 { font-weight: 600; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.flex { display: flex; } .flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

/* =============================================================================
   登录页
   ============================================================================= */
.login-view {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1E293B 0%, #24344d 55%, #2b3f5e 100%);
  overflow: auto; padding: 24px;
}
.login-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(79,124,255,0.30), transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(16,185,129,0.18), transparent 45%);
  pointer-events: none;
}
.login-card {
  position: relative; z-index: 1;
  width: 400px; max-width: 100%;
  background: #fff; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  padding: 38px 34px 28px;
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-logo {
  width: 54px; height: 54px; margin: 0 auto 14px;
  border-radius: 15px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), #6D93FF);
  color: #fff; box-shadow: 0 8px 20px rgba(79,124,255,0.4);
}
.login-title { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.login-sub { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.login-field { margin-bottom: 16px; }
.login-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.login-input-wrap { position: relative; }
.login-input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); display: flex; }
.login-input-wrap .input { padding-left: 38px; height: 44px; }
.login-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-3); cursor: pointer; padding: 6px; display: flex; border-radius: 6px;
}
.login-eye:hover { color: var(--text-2); background: #F1F4F9; }
.login-error {
  background: var(--danger-light); color: var(--danger);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px;
}
.login-submit { height: 44px; font-size: 15px; letter-spacing: 4px; margin-top: 4px; }
.login-hint {
  margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border);
  font-size: 12px; color: var(--text-3); line-height: 1.9;
}
.login-hint-title { font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.login-hint-row b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.login-foot { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.45); font-size: 12px; z-index: 1; }

/* =============================================================================
   无权限页
   ============================================================================= */
.deny-view { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 24px; }
.deny-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px 40px; text-align: center; max-width: 440px; }
.deny-icon { color: var(--warning); margin-bottom: 12px; }
.deny-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.deny-text { color: var(--text-2); font-size: 13px; margin-bottom: 22px; line-height: 1.8; }

/* =============================================================================
   主布局
   ============================================================================= */
.main-view { display: flex; height: 100vh; overflow: hidden; }

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-w); flex: 0 0 auto;
  background: var(--sidebar); color: #CBD5E1;
  display: flex; flex-direction: column;
  transition: width .2s ease; overflow: hidden;
}
.sidebar-brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: 10px;
  padding: 0 18px; flex: 0 0 auto; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-logo {
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), #6D93FF); color: #fff;
}
.brand-text { overflow: hidden; white-space: nowrap; }
.brand-name { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.2; }
.brand-sub { font-size: 11px; color: #7C8AA5; }
.sidebar-menu { flex: 1; overflow-y: auto; padding: 12px 10px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
.menu-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 3px; border-radius: 9px;
  color: #B9C4D6; cursor: pointer; font-size: 14px; white-space: nowrap;
  transition: background .15s, color .15s; position: relative;
}
.menu-item:hover { background: var(--sidebar-hover); color: #fff; }
.menu-item.active { background: var(--sidebar-active); color: #fff; box-shadow: 0 6px 16px rgba(79,124,255,0.38); }
.menu-icon { width: 18px; height: 18px; flex: 0 0 auto; display: flex; }
.menu-icon svg { width: 18px; height: 18px; }
.menu-text { overflow: hidden; }
.menu-badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 11px;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.sidebar-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.06); flex: 0 0 auto; }
.sidebar-org { font-size: 12px; color: #7C8AA5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 收起态（宽屏 icon-only） */
body.nav-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.nav-collapsed .sidebar-brand { padding: 0 15px; }
body.nav-collapsed .brand-text,
body.nav-collapsed .menu-text,
body.nav-collapsed .menu-badge,
body.nav-collapsed .sidebar-org { display: none; }
body.nav-collapsed .menu-item { justify-content: center; padding: 11px 0; }
body.nav-collapsed .sidebar-foot { display: none; }

/* 主内容 */
.main-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: 0 0 auto;
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: none; background: transparent;
  color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: #F1F4F9; color: var(--text); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.breadcrumb .bc-root { color: var(--text-3); }
.breadcrumb .bc-sep { color: #CBD5E1; }
.breadcrumb .bc-cur { font-weight: 600; color: var(--text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.role-chip {
  font-size: 12px; color: var(--primary); background: var(--primary-light);
  padding: 3px 10px; border-radius: 20px; font-weight: 600; white-space: nowrap;
}
.user-chip { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #4F7CFF, #6D93FF);
  color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.user-name { font-size: 14px; font-weight: 500; }
.page-container { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }
.page-container > * { max-width: 1500px; }

/* 移动端遮罩 */
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.45); z-index: 55; }

/* =============================================================================
   卡片 / 区块
   ============================================================================= */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 16px;
}
.card.no-pad { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.card.no-pad .card-head { padding: 16px 20px 0; margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-title .ct-bar { width: 4px; height: 15px; border-radius: 3px; background: var(--primary); }
.card-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden;
}
.stat-card::after { content: ''; position: absolute; right: -22px; top: -22px; width: 84px; height: 84px; border-radius: 50%; opacity: .10; background: var(--sc, var(--primary)); }
.stat-top { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; }
.stat-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--sc, var(--primary)); flex: 0 0 auto; }
.stat-value { font-size: 27px; font-weight: 700; letter-spacing: .5px; line-height: 1.2; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.stat-foot { font-size: 12px; color: var(--text-3); }
.stat-sc-primary { --sc: var(--primary); --sc2: #7C9BFF; }
.stat-sc-success { --sc: var(--success); --sc2: #34D399; }
.stat-sc-warning { --sc: var(--warning); --sc2: #FBBF24; }
.stat-sc-danger { --sc: var(--danger); --sc2: #F87171; }
.stat-sc-info { --sc: var(--info); --sc2: #22D3EE; }

/* =============================================================================
   按钮
   ============================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 34px; padding: 0 15px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: #fff; color: var(--text);
  cursor: pointer; font-size: 13px; white-space: nowrap; transition: all .15s; line-height: 1;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-default { background: #fff; border-color: var(--border); color: var(--text); }
.btn-default:hover:not(:disabled) { border-color: #C9D4E6; background: #FAFBFE; color: var(--primary); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { filter: brightness(.95); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.95); }
.btn-warning { background: var(--warning); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: #F1F4F9; color: var(--text); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-text { background: none; border: none; color: var(--primary); cursor: pointer; padding: 2px 4px; font-size: 13px; }
.btn-text:hover { text-decoration: underline; }
.btn-text.danger { color: var(--danger); }
.btn-text.muted { color: var(--text-3); cursor: not-allowed; }
.act-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* =============================================================================
   表单控件
   ============================================================================= */
.input, textarea.input, select.input {
  width: 100%; height: 36px; padding: 0 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 8px 11px; line-height: 1.55; resize: vertical; }
.input:focus, select.input:focus, textarea.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,124,255,0.14); }
.input:disabled, select.input:disabled { background: #F5F7FB; color: var(--text-3); cursor: not-allowed; }
select.input { 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='%2394A3B8' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.input.invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; }

/* 筛选栏 */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
}
.filter-bar .fi { display: flex; flex-direction: column; gap: 5px; }
.filter-bar .fi > label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.filter-bar .input, .filter-bar select.input { height: 34px; }
.filter-bar .fi.w-160 { width: 160px; }
.filter-bar .fi.w-130 { width: 130px; }
.filter-bar .fi.w-200 { width: 200px; }
.filter-bar .fi.w-240 { width: 240px; }
.filter-bar .fi.grow { flex: 1; min-width: 180px; }
.filter-actions { display: flex; gap: 8px; align-items: flex-end; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; height: 34px; }
.check-inline input { width: 15px; height: 15px; accent-color: var(--primary); }

/* =============================================================================
   标签 / 徽章 / 进度
   ============================================================================= */
.tag { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 12px; line-height: 1; white-space: nowrap; background: #F1F4F9; color: var(--text-2); }
.tag-primary { background: var(--primary-light); color: var(--primary); }
.tag-success { background: var(--success-light); color: #0E9A6B; }
.tag-warning { background: var(--warning-light); color: #B9770E; }
.tag-danger { background: var(--danger-light); color: var(--danger); }
.tag-info { background: #E4F7FB; color: #0891B2; }
.dot-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.dot-label .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.bar-mini { height: 6px; border-radius: 4px; background: #EEF1F6; overflow: hidden; min-width: 60px; }
.bar-mini > i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.bar-mini > i.ok { background: var(--success); }
.bar-mini > i.warn { background: var(--warning); }
.bar-mini > i.danger { background: var(--danger); }

/* =============================================================================
   表格
   ============================================================================= */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead th {
  background: #F7F9FC; color: var(--text-2); font-weight: 600; text-align: left;
  padding: 11px 12px; white-space: nowrap; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1;
}
.data-table tbody td { padding: 11px 12px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #F8FAFE; }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table .td-empty, .data-table .td-loading { padding: 8px; }
.data-table th.ta-right, .data-table td.ta-right { text-align: right; }
.data-table th.ta-center, .data-table td.ta-center { text-align: center; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--text-3); }
.mobile-mask { font-variant-numeric: tabular-nums; letter-spacing: .5px; }

/* 分页 */
.ui-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 4px; flex-wrap: wrap; }
.ui-pager-info { font-size: 13px; color: var(--text-3); }
.ui-pager-btns { display: flex; align-items: center; gap: 5px; }
.pg-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); cursor: pointer; font-size: 13px;
}
.pg-btn:hover:not(:disabled):not(.active) { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-btn:disabled { opacity: .45; cursor: not-allowed; }
.pg-ellipsis { color: var(--text-3); padding: 0 3px; }

/* 空状态 / 行内 loading */
.ui-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; color: var(--text-3); }
.ui-empty-icon { color: #CBD5E1; }
.ui-empty-text { font-size: 13px; }
.ui-inline-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 34px 16px; color: var(--text-3); font-size: 13px; }

/* spinner */
.ui-spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(79,124,255,0.25); border-top-color: var(--primary);
  display: inline-block; animation: spin .7s linear infinite;
}
.ui-spinner.big { width: 26px; height: 26px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================================
   Tab
   ============================================================================= */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px; border: none; background: none; cursor: pointer; font-size: 14px;
  color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.sub-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.sub-tab {
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border); background: #fff;
  color: var(--text-2); cursor: pointer; font-size: 13px;
}
.sub-tab:hover { border-color: var(--primary); color: var(--primary); }
.sub-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* =============================================================================
   Modal / Drawer
   ============================================================================= */
.ui-modal-backdrop, .ui-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,0.42);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  opacity: 0; transition: opacity .2s; backdrop-filter: blur(1.5px); padding: 24px;
}
.ui-modal-backdrop.in, .ui-drawer-backdrop.in { opacity: 1; }
.ui-modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  max-width: 100%; max-height: 92vh; display: flex; flex-direction: column;
  transform: translateY(12px) scale(.98); transition: transform .2s;
}
.ui-modal-backdrop.in .ui-modal { transform: none; }
.ui-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.ui-modal-title { font-size: 16px; font-weight: 700; }
.ui-modal-close {
  border: none; background: none; font-size: 24px; line-height: 1; color: var(--text-3);
  cursor: pointer; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.ui-modal-close:hover { background: #F1F4F9; color: var(--text); }
.ui-modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.ui-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex: 0 0 auto; }

/* 抽屉 */
.ui-drawer-backdrop { justify-content: flex-end; padding: 0; align-items: stretch; }
.ui-drawer {
  background: #fff; height: 100%; max-width: 94vw; display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(15,23,42,0.18); transform: translateX(24px); transition: transform .24s;
}
.ui-drawer-backdrop.in .ui-drawer { transform: none; }
.ui-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.ui-drawer-title { font-size: 16px; font-weight: 700; }
.ui-drawer-body { padding: 20px; overflow-y: auto; flex: 1; }
.ui-drawer-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex: 0 0 auto; }

/* 确认框 */
.ui-confirm-body { display: flex; gap: 12px; align-items: flex-start; }
.ui-confirm-icon { color: var(--primary); flex: 0 0 auto; margin-top: 1px; }
.ui-confirm-icon.danger { color: var(--warning); }
.ui-confirm-text { font-size: 14px; line-height: 1.7; color: var(--text); }
.ui-prompt-body { display: flex; flex-direction: column; gap: 10px; }
.ui-prompt-msg { font-size: 14px; color: var(--text); }

/* =============================================================================
   表单（弹窗内）
   ============================================================================= */
.ui-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 16px; }
.ui-form-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ui-form-item.col-2 { grid-column: span 2; }
.ui-form-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.ui-form-label.required::after { content: ' *'; color: var(--danger); }
.ui-form-hint { font-size: 12px; color: var(--text-3); }
.ui-form-error { margin-top: 12px; background: var(--danger-light); color: var(--danger); padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.ui-readonly { padding: 8px 11px; background: #F5F7FB; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text-2); min-height: 36px; }

/* switch */
.ui-switch-wrap { display: flex; align-items: center; height: 36px; }
.ui-switch { width: 44px; height: 24px; border-radius: 24px; background: #CBD5E1; position: relative; cursor: pointer; transition: background .18s; }
.ui-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform .18s; }
.ui-switch-wrap input:checked + .ui-switch { background: var(--primary); }
.ui-switch-wrap input:checked + .ui-switch::after { transform: translateX(20px); }

/* multi select */
.ui-multi { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 168px; overflow-y: auto; }
.ui-multi-item { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.ui-multi-item input { accent-color: var(--primary); width: 15px; height: 15px; }

/* color picker */
.ui-color-wrap { display: flex; align-items: center; gap: 10px; height: 36px; }
.ui-color { width: 40px; height: 30px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; }
.ui-color-text { font-family: monospace; font-size: 13px; color: var(--text-2); }

/* 描述列表 */
.ui-desc { display: grid; gap: 14px 20px; }
.ui-desc-item { min-width: 0; }
.ui-desc-item.col-2 { grid-column: span 2; }
.ui-desc-label { font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.ui-desc-value { font-size: 14px; color: var(--text); word-break: break-word; }

/* =============================================================================
   Toast
   ============================================================================= */
.toast-container { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 9px;
  background: #fff; border-radius: 10px; padding: 10px 16px; box-shadow: 0 8px 26px rgba(15,23,42,0.16);
  font-size: 13.5px; color: var(--text); max-width: 460px;
  opacity: 0; transform: translateY(-12px); transition: opacity .22s, transform .22s; cursor: pointer;
  border: 1px solid var(--border);
}
.toast.in { opacity: 1; transform: none; }
.toast-icon { display: flex; flex: 0 0 auto; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--primary); }

/* 全局 loading */
.global-loading { position: fixed; inset: 0; background: rgba(255,255,255,0.55); display: flex; align-items: center; justify-content: center; z-index: 300; opacity: 0; transition: opacity .18s; }
.global-loading.in { opacity: 1; }
.global-loading-box { background: #fff; border-radius: 12px; padding: 20px 26px; box-shadow: 0 12px 32px rgba(15,23,42,0.18); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.global-loading-text { font-size: 13px; color: var(--text-2); }

/* =============================================================================
   图表
   ============================================================================= */
.chart-box { width: 100%; overflow-x: auto; }
.chart-svg { display: block; }
.chart-axis { font-size: 11px; fill: #94A3B8; }
.chart-val { font-size: 11px; fill: #64748B; font-weight: 600; }
.chart-hlabel { font-size: 12.5px; fill: #475569; }
.chart-hval { font-size: 12.5px; fill: #334155; font-weight: 600; }
.chart-empty { display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 13px; }

/* =============================================================================
   周课表
   ============================================================================= */
.week-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 10px; }
.week-col { background: #F8FAFE; border: 1px solid var(--border); border-radius: 10px; min-height: 200px; display: flex; flex-direction: column; overflow: hidden; }
.week-col.today { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79,124,255,0.14); }
.week-col-head { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--border); background: #fff; }
.week-col.today .week-col-head { background: var(--primary-light); }
.week-col-wd { font-size: 12.5px; color: var(--text-2); }
.week-col-day { font-size: 16px; font-weight: 700; }
.week-col-body { padding: 8px; display: flex; flex-direction: column; gap: 7px; flex: 1; overflow-y: auto; }
.week-lesson {
  background: #fff; border-radius: 8px; padding: 7px 8px; border-left: 3px solid var(--primary);
  box-shadow: 0 1px 4px rgba(15,23,42,0.06); cursor: pointer; font-size: 12px;
}
.week-lesson:hover { box-shadow: 0 4px 12px rgba(79,124,255,0.18); transform: translateY(-1px); }
.week-lesson .wl-time { font-weight: 600; color: var(--text); }
.week-lesson .wl-class { color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-lesson .wl-teacher { color: var(--text-3); font-size: 11px; margin-top: 1px; }
.week-lesson.finished { border-left-color: var(--success); }
.week-lesson.cancelled { border-left-color: #CBD5E1; opacity: .6; }
.week-lesson.confirming { border-left-color: var(--warning); }
.week-empty { color: #C3CDDB; font-size: 12px; text-align: center; padding: 12px 0; }

/* =============================================================================
   其他小组件
   ============================================================================= */
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border-2); }
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: #F8FAFE; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; font-size: 13.5px; }
.list-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.list-side { flex: 0 0 auto; }

.kv-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kv-row:last-child { border-bottom: none; }
.kv-k { color: var(--text-3); width: 108px; flex: 0 0 auto; }
.kv-v { color: var(--text); flex: 1; }

.summary-strip { display: flex; gap: 26px; flex-wrap: wrap; padding: 4px 0 14px; }
.summary-item { display: flex; flex-direction: column; }
.summary-item .si-v { font-size: 20px; font-weight: 700; }
.summary-item .si-l { font-size: 12px; color: var(--text-3); }

.section-title { font-size: 14px; font-weight: 700; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title .ct-bar { width: 4px; height: 14px; border-radius: 3px; background: var(--primary); }
.hr { height: 1px; background: var(--border); margin: 16px 0; border: none; }
.muted-box { background: #F8FAFE; border: 1px dashed var(--border); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--text-2); }
.warn-box { background: var(--warning-light); border: 1px solid #FBE2B5; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #8A5A0B; }
.danger-box { background: var(--danger-light); border: 1px solid #F8CACA; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #A32B2B; }

.preview-dates { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow-y: auto; padding: 4px; }
.preview-date { background: var(--primary-light); color: var(--primary); border-radius: 6px; padding: 3px 9px; font-size: 12px; font-variant-numeric: tabular-nums; }
.err-list { max-height: 220px; overflow-y: auto; background: #F8FAFE; border-radius: 8px; padding: 10px 14px; font-size: 12.5px; color: var(--text-2); line-height: 1.9; }

/* 响应式 */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    transform: translateX(-100%); transition: transform .22s; width: var(--sidebar-w) !important;
    box-shadow: 8px 0 28px rgba(15,23,42,0.28);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-overlay { display: block; }
  body.nav-collapsed .brand-text, body.nav-collapsed .menu-text,
  body.nav-collapsed .menu-badge, body.nav-collapsed .sidebar-org { display: block; }
  body.nav-collapsed .menu-item { justify-content: flex-start; padding: 10px 12px; }
  .week-grid { grid-template-columns: repeat(7, minmax(150px,1fr)); }
  .page-container { padding: 16px 14px 40px; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
  .ui-form-grid { grid-template-columns: 1fr; }
  .ui-form-item.col-2 { grid-column: span 1; }
  .ui-desc { grid-template-columns: 1fr !important; }
  .ui-desc-item.col-2 { grid-column: span 1; }
  .user-name, .role-chip { display: none; }
  .filter-bar .fi { width: 100% !important; }
}

/* =============================================================================
   多校区 · 权限 · 问题反馈（第 4 轮需求新增）
   ============================================================================= */

/* ---------- 顶栏校区切换 ---------- */
.campus-switch { display: inline-flex; align-items: center; }
.campus-select { height: 32px; min-width: 140px; padding: 0 26px 0 10px; font-size: 13px; }
.campus-static {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 999px; background: var(--primary-light); color: var(--primary);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.campus-static-icon { display: inline-flex; }
.campus-static-icon svg { width: 15px; height: 15px; }
.role-chip.role-boss { background: #FDECEC; color: var(--danger); }
.role-chip.role-super { background: var(--primary-light); color: var(--primary); }

/* ---------- 侧边栏分组 ---------- */
.menu-group {
  padding: 14px 18px 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: rgba(255, 255, 255, .34); text-transform: uppercase;
}
.menu-empty { padding: 18px; font-size: 12.5px; line-height: 1.7; color: rgba(255, 255, 255, .5); }

/* ---------- 通用小件 ---------- */
.tip-box {
  padding: 12px 15px; border-radius: var(--radius-sm); background: var(--primary-light);
  border: 1px solid #D8E4FF; color: #34518F; font-size: 12.8px; line-height: 1.75;
}
.tip-box b { color: var(--primary-dark); }
.mb-12 { margin-bottom: 12px; }
.money-share { color: var(--warning); font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-pill {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px;
  background: #F1F5F9; color: var(--text-2); font-size: 11.5px; line-height: 1.7; white-space: nowrap;
}
.mini-pill b { color: var(--text); font-weight: 700; }
.mini-pill-warn { background: var(--warning-light); color: #A1620A; }
.cell-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tabs .tab-link { color: var(--primary); font-weight: 600; }
.tabs .tab-link:hover { background: var(--primary-light); }

/* ---------- 统计卡（反馈 / 概览行） ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-row .stat-card { gap: 2px; }
.stat-label { font-size: 12.5px; color: var(--text-2); }
.stat-sub { font-size: 12px; color: var(--text-3); }
.stat-types { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---------- 校区卡片 ---------- */
.campus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.campus-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  background: #fff; display: flex; flex-direction: column; gap: 12px; transition: all .15s;
}
.campus-card:hover { border-color: #C9D9FF; box-shadow: var(--shadow); }
.campus-card.is-current { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 124, 255, .12); }
.campus-card.is-all { background: linear-gradient(135deg, #F8FAFF, #FFFFFF); border-style: dashed; }
.campus-card-head { display: flex; align-items: center; gap: 10px; }
.campus-card-icon { font-size: 22px; line-height: 1; }
.campus-card-title-wrap { flex: 1 1 auto; min-width: 0; }
.campus-card-title { font-size: 15px; font-weight: 700; }
.campus-card-sub { font-size: 11.5px; color: var(--text-3); }
.campus-badge-current {
  padding: 1px 8px; border-radius: 999px; background: var(--primary-light); color: var(--primary);
  font-size: 11.5px; font-weight: 700;
}
.campus-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; text-align: center; }
.campus-stat { background: #F8FAFC; border-radius: var(--radius-sm); padding: 8px 2px; }
.campus-stat-value { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.campus-stat-label { font-size: 11px; color: var(--text-3); }
.campus-meta { font-size: 12.3px; color: var(--text-2); line-height: 1.8; }
.campus-remark { font-size: 12.3px; color: var(--text-3); font-style: italic; }
.campus-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.campus-current-note { margin-top: 16px; font-size: 12.5px; color: var(--text-2); }

/* ---------- 权限勾选弹窗 ---------- */
.perm-toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.perm-counter { font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; }
.perm-counter b { color: var(--primary); }
.perm-box { max-height: 52vh; overflow: auto; padding-right: 4px; }
.perm-group { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.perm-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 13px; background: #F8FAFC; border-bottom: 1px solid var(--border-2);
}
.perm-group-title { font-size: 13.2px; font-weight: 700; }
.perm-group-all-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 12.2px; color: var(--text-2); cursor: pointer; }
.perm-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.perm-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 9px 13px; cursor: pointer;
  border-bottom: 1px solid var(--border-2); font-size: 12.6px;
}
.perm-item:nth-child(odd) { border-right: 1px solid var(--border-2); }
.perm-item:hover { background: #FAFBFE; }
.perm-item input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--primary); }
.perm-item-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.perm-item-label { font-weight: 600; }
.perm-item-desc { font-size: 11.4px; color: var(--text-3); line-height: 1.5; }
.perm-item-locked { opacity: .48; cursor: not-allowed; background: #FAFAFA; }

/* ---------- 问题反馈详情 ---------- */
.fb-detail { display: flex; flex-direction: column; gap: 14px; }
.fb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-time { margin-left: auto; font-size: 12px; color: var(--text-3); }
.fb-title { margin: 0; font-size: 16.5px; font-weight: 700; line-height: 1.5; }
.fb-block { border-top: 1px dashed var(--border); padding-top: 12px; }
.fb-block-title { font-size: 12.6px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.fb-content { font-size: 13.4px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.fb-timeline { display: flex; flex-direction: column; gap: 10px; }
.fb-reply { border-radius: var(--radius-sm); padding: 10px 12px; background: #F8FAFC; }
.fb-reply.is-staff { background: var(--primary-light); }
.fb-reply-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.fb-reply-name { font-size: 12.6px; font-weight: 700; }
.fb-reply-time { margin-left: auto; font-size: 11.6px; color: var(--text-3); }
.fb-reply-body { font-size: 13px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.fb-reply-box textarea { width: 100%; resize: vertical; }
.fb-reply-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.fb-reply-tools-l { display: flex; gap: 8px; }
.fb-actions { display: flex; justify-content: flex-end; }

/* ---------- 媒体九宫格 ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 8px; }
.media-grid-sm { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.media-cell {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: #F1F5F9; cursor: pointer;
}
.media-cell img, .media-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-video-cell { cursor: default; }
.media-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  border: 0; background: rgba(15, 23, 42, .62); color: #fff; font-size: 14px; line-height: 18px;
  cursor: pointer; padding: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .stat-row { grid-template-columns: 1fr; }
  .campus-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perm-items { grid-template-columns: 1fr; }
  .perm-item:nth-child(odd) { border-right: 0; }
  .campus-switch { display: none; }
  .campus-select { min-width: 0; }
}

/* =============================================================================
   管理首页 / 仪表盘（UI 美化）
   ============================================================================= */
.dash { display: flex; flex-direction: column; gap: 16px; }
.dash .card { margin-bottom: 0; }

/* ---------- 欢迎横幅 ---------- */
.dash-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 24px;
  padding: 24px 26px; border-radius: 18px;
  background: linear-gradient(120deg, #4F7CFF 0%, #5B6BFF 48%, #7C6BFF 100%);
  color: #fff; box-shadow: 0 16px 36px -14px rgba(79, 124, 255, .62);
}
.dash-hero-deco { position: absolute; border-radius: 50%; pointer-events: none; z-index: -1; }
.dash-hero-deco-1 { width: 260px; height: 260px; right: -70px; top: -120px; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 68%); }
.dash-hero-deco-2 { width: 200px; height: 200px; left: 34%; bottom: -140px; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); }
.dash-hero-main { flex: 1; min-width: 0; position: relative; }
.dash-hero-hi { font-size: 21px; font-weight: 600; letter-spacing: .3px; line-height: 1.4; }
.dash-hero-hi b { font-weight: 800; }
.dash-hero-sub { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; }
.dash-hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px; line-height: 1.4;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
  color: rgba(255, 255, 255, .96); backdrop-filter: blur(4px);
}
.dash-hero-chip svg { opacity: .9; flex: 0 0 auto; }
.dash-hero-chip-soft { background: rgba(255, 255, 255, .10); color: rgba(255, 255, 255, .88); }
.dash-hero-side { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.dash-hero-side-label { font-size: 12px; color: rgba(255, 255, 255, .82); letter-spacing: .4px; }

/* 进度环 */
.dash-ring { position: relative; width: 118px; height: 118px; }
.dash-ring svg { display: block; transform: rotate(0deg); }
.dash-ring-bg { fill: none; stroke: rgba(255, 255, 255, .24); stroke-width: 9; }
.dash-ring-fg { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.22,.61,.36,1); filter: drop-shadow(0 2px 5px rgba(0,0,0,.15)); }
.dash-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dash-ring-center .drc-v { font-size: 26px; font-weight: 800; line-height: 1; letter-spacing: .5px; }
.dash-ring-center .drc-v small { font-size: 13px; font-weight: 600; margin-left: 1px; }
.dash-ring-center .drc-l { font-size: 11px; color: rgba(255, 255, 255, .85); margin-top: 5px; }

/* ---------- 统计卡质感增强 ---------- */
.stat-label { white-space: nowrap; }
.stat-ico { background-image: linear-gradient(135deg, var(--sc, var(--primary)), var(--sc2, var(--sc, var(--primary)))); box-shadow: 0 6px 14px -6px var(--sc, var(--primary)); }
.dash .stat-card {
  gap: 8px; padding: 18px 18px 16px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 26px -16px rgba(15, 23, 42, .22);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.dash .stat-card:hover { transform: translateY(-4px); border-color: #D8E4FF; box-shadow: 0 18px 34px -16px rgba(79, 124, 255, .42); }
.dash .stat-card::after { width: 100px; height: 100px; right: -30px; top: -30px; opacity: .09; }
.dash .stat-top { gap: 11px; }
.dash .stat-ico { width: 38px; height: 38px; border-radius: 11px; }
.dash .stat-value { font-size: 30px; margin-top: 2px; }
.dash .stat-foot { color: var(--text-3); }
.dash .stat-foot b { color: var(--text-2); font-weight: 700; }

/* ---------- 今日课次概况磁贴 ---------- */
.dash-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dash-tile {
  position: relative; overflow: hidden;
  padding: 16px 16px 15px; border-radius: 13px;
  background: #F7F9FC; border: 1px solid var(--border);
}
.dash-tile .dt-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; color: #fff; margin-bottom: 10px;
  background-image: linear-gradient(135deg, var(--t, var(--primary)), var(--t2, var(--t, var(--primary))));
  box-shadow: 0 6px 14px -7px var(--t, var(--primary));
}
.dash-tile .dt-v { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.dash-tile .dt-l { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.dash-tile::after { content: ''; position: absolute; right: -26px; bottom: -34px; width: 92px; height: 92px; border-radius: 50%; background: var(--t, var(--primary)); opacity: .07; }
.dash-tile.t-primary { background: linear-gradient(150deg, #EEF3FF 0%, #F8FAFF 78%); border-color: #DCE7FF; --t: var(--primary); --t2: #7C9BFF; }
.dash-tile.t-success { background: linear-gradient(150deg, #E9F9F2 0%, #F8FDFB 78%); border-color: #D2F0E3; --t: var(--success); --t2: #34D399; }
.dash-tile.t-warning { background: linear-gradient(150deg, #FEF5E7 0%, #FFFCF6 78%); border-color: #FBE7C4; --t: var(--warning); --t2: #FBBF24; }

/* ---------- 卡片标题装饰 / 计数徽标 ---------- */
.ct-bar-warn { background: var(--warning); }
.ct-bar-danger { background: var(--danger); }
.count-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 7px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: #EEF1F6; color: var(--text-2);
}
.count-pill.is-warn { background: var(--warning-light); color: #B9770E; }
.count-pill.is-danger { background: var(--danger-light); color: var(--danger); }

/* ---------- 双列 ---------- */
.dash-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }

/* ---------- 列表 ---------- */
.dash-list { display: flex; flex-direction: column; }
.dash-list .list-row { padding: 12px 6px; border-radius: 10px; transition: background .15s; }
.dash-list .list-row:hover { background: #F8FAFE; }

.dash-time-badge {
  flex: 0 0 auto; width: 56px; padding: 7px 0; border-radius: 11px; text-align: center;
  background: var(--primary-light); color: var(--primary);
}
.dash-time-badge .dtb-t { font-size: 13.5px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.dash-time-badge .dtb-s { font-size: 10.5px; font-weight: 500; color: #7C93C8; margin-top: 1px; font-variant-numeric: tabular-nums; }

.dash-avatar {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: 0 6px 14px -7px rgba(15, 23, 42, .5);
}
.dash-bar { margin-top: 7px; max-width: 260px; }
.dash-side { display: flex; align-items: center; gap: 8px; }

/* ---------- 空状态 ---------- */
.dash-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 30px 16px 26px; text-align: center; }
.dash-empty-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; margin-bottom: 4px;
  background: var(--success-light); color: var(--success);
}
.dash-empty-t { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.dash-empty-s { font-size: 12px; color: var(--text-3); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .dash-cols { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .dash-hero { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px 20px; }
  .dash-hero-side { align-self: center; }
  .dash-tiles { grid-template-columns: 1fr; }
}

/* ---------- 登录页形象预览（第 15 轮 · #/login-branding） ---------- */
.brand-preview-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.brand-preview-col { flex: 1 1 320px; min-width: 240px; }
.brand-preview-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }

.brand-preview-hero {
  position: relative; width: 100%; height: 190px; border-radius: var(--radius);
  background-color: #EEF3FF; background-size: cover; background-position: center;
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.brand-preview-hero.is-default {
  background-image: linear-gradient(135deg, #4F7CFF 0%, #6E9BFF 55%, #8FB2FF 100%);
  border-color: transparent;
}

.brand-preview-logo {
  width: 128px; height: 128px; border-radius: 28px;
  background-color: #EEF3FF; background-size: cover; background-position: center;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.brand-preview-logo.is-default {
  background-image: linear-gradient(135deg, #4F7CFF 0%, #6E9BFF 100%);
  border-color: transparent;
}

.brand-default-text { font-size: 14px; font-weight: 700; color: #FFFFFF; letter-spacing: 1px; }
.brand-preview-logo.is-default .brand-default-text { font-size: 52px; letter-spacing: 0; }

/* ---------- 富文本编辑器（第 16 轮 · 公众号文章风格） ---------- */
.rte {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  overflow: hidden;
}
.rte-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: #F8FAFD;
  border-bottom: 1px solid var(--border);
}
.rte-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.rte-btn:hover { background: #FFFFFF; border-color: var(--border); color: var(--primary); }
.rte-btn:active { transform: translateY(1px); }
.rte-sep { display: inline-block; width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.rte-body {
  min-height: 240px;
  max-height: 440px;
  overflow-y: auto;
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text);
  outline: none;
  word-break: break-word;
}
.rte-body:empty::before { content: attr(data-placeholder); color: var(--text-3); }
.rte-body p { margin: 0 0 12px; }
.rte-body h2 { font-size: 19px; margin: 18px 0 10px; }
.rte-body h3 { font-size: 16px; margin: 14px 0 8px; }
.rte-body blockquote {
  margin: 12px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--primary);
  background: var(--primary-light);
  color: var(--text-2);
  border-radius: 0 6px 6px 0;
}
.rte-body ul, .rte-body ol { margin: 0 0 12px; padding-left: 22px; }
.rte-body img { max-width: 100%; border-radius: 8px; margin: 6px 0; display: block; }
.rte-body hr { border: none; border-top: 1px dashed var(--border); margin: 16px 0; }
.rte-body a { color: var(--primary); }
.rte-tip {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-3);
  background: #FBFCFE;
  border-top: 1px solid var(--border-2);
}
.rte-tip.is-busy { color: var(--primary); }
.rte-palette {
  position: absolute;
  z-index: 5;
  top: 42px;
  right: 12px;
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.rte-color-dot {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
}
.rte-src { display: none !important; }
.rte-preview { margin-top: 10px; padding: 14px 16px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: #FBFCFE; }
.rte-preview-title { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.rte-preview-body { font-size: 14px; line-height: 1.8; color: var(--text); }
.rte-preview-body img { max-width: 100%; border-radius: 8px; display: block; margin: 6px 0; }
.rte-preview-body h2 { font-size: 18px; margin: 14px 0 8px; }
.rte-preview-body h3 { font-size: 15.5px; margin: 12px 0 6px; }
.rte-preview-body blockquote { margin: 10px 0; padding: 6px 12px; border-left: 3px solid var(--primary); background: var(--primary-light); color: var(--text-2); }
.rte-preview-body ul, .rte-preview-body ol { padding-left: 20px; }

/* ---------- 迎检设置（第 16 轮 · #/inspect，仅超级管理员可见） ---------- */
.inspect-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.inspect-switch-main { flex: 1; min-width: 0; }
.inspect-switch-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.inspect-switch-desc { margin-top: 4px; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.inspect-switch-ctl { display: flex; align-items: center; gap: 10px; }
.inspect-menu-body { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 6px; }
.inspect-group-title { width: 100%; margin: 10px 0 2px; font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .5px; }
.inspect-group-title.inset { padding: 0 20px; margin: 14px 0 4px; }
.inspect-menu-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: #FFFFFF; cursor: pointer; font-size: 13px;
}
.inspect-menu-item:hover { border-color: var(--primary); }
.inspect-menu-name { color: var(--text); }
.inspect-menu-key { font-size: 11.5px; color: var(--text-3); font-family: ui-monospace, Menlo, Consolas, monospace; }
.inspect-metric-table { padding: 0 20px 4px; }
.inspect-metric-head, .inspect-metric-row {
  display: grid; grid-template-columns: 1fr 118px 118px 60px 70px;
  align-items: center; gap: 12px;
}
.inspect-metric-head { padding: 8px 0; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--border-2); }
.inspect-metric-row { padding: 7px 0; border-bottom: 1px dashed var(--border-2); }
.imc-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.imc-num { min-width: 0; }
.inspect-metric-label { font-size: 13.5px; color: var(--text); }
.inspect-num { height: 32px; padding: 0 10px; text-align: center; }
.imc-unit, .imc-src { font-size: 12.5px; color: var(--text-2); }
.inspect-save-bar { display: flex; align-items: center; gap: 16px; }
