/* ============================================
   班级积分班务管理系统 全局样式（响应式）
   适配：大屏 ≥1200px / 桌面 1024-1199px /
         平板 768-1023px / 手机 <768px
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 10px;
  --sidebar-w: 220px;
  --sidebar-w-md: 190px;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover, a:active, a:visited, a:focus { text-decoration: none; }
button { font-family: inherit; }
input, select, textarea, button { font-size: 14px; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: #0f172a; color: #cbd5e1;
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0;
  z-index: 10;
}
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }

.brand { padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.brand-icon { font-size: 26px; flex: none; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; color: #fff; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text small { color: #94a3b8; font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.menu { flex: 1; padding: 12px 8px; overflow-y: auto; }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 2px; border-radius: 8px;
  color: #cbd5e1; font-size: 14px;
}
.menu-item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.menu-item.active { background: var(--primary); color: #fff; }
.menu-icon { width: 22px; text-align: center; flex: none; }
.sidebar-foot { padding: 12px 16px; font-size: 12px; color: #64748b; border-top: 1px solid rgba(255,255,255,.08); }

/* 移动端抽屉遮罩（默认隐藏，手机屏显示） */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 8;
  opacity: 0; pointer-events: none; transition: opacity .28s ease;
}
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 5;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  font-size: 19px; line-height: 1; cursor: pointer; color: var(--text);
}
.menu-toggle:hover { background: var(--bg); }
.topbar-title { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user { display: flex; align-items: center; gap: 10px; flex: none; }
.uname { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { padding: 20px 24px; flex: 1; width: 100%; }
.footer { padding: 14px 24px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); background: var(--card); }
.no-scroll { overflow: hidden; }

/* ---------- 角色徽章 ---------- */
.role-badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.role-admin   { background: #fef3c7; color: #92400e; }
.role-teacher { background: #dbeafe; color: #1e40af; }
.role-cadre   { background: #fce7f3; color: #9d174d; }
.role-student { background: #dcfce7; color: #166534; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 8px 16px; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; cursor: pointer; text-align: center; background: var(--primary); color: #fff;
  transition: background .15s ease;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 13px; border-radius: 6px; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-success { background: var(--ok); }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-warn { background: var(--warn); }
.btn-warn:hover { background: #b45309; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: #eff6ff; }

/* ---------- 卡片 / 统计 ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; min-width: 0; }
.card h3 { font-size: 15px; margin-bottom: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; min-width: 0;
}
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-card .lbl { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat-card.warn .num { color: var(--warn); }
.stat-card.danger .num { color: var(--danger); }
.stat-card.ok .num { color: var(--ok); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { background: #f8fafc; font-weight: 600; white-space: nowrap; }
.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ok      { background: #dcfce7; color: #166534; }
.badge-warn    { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-pending { background: #e0e7ff; color: #3730a3; }
.badge-gray    { background: #f1f5f9; color: #475569; }
.badge-blue    { background: #dbeafe; color: #1e40af; }
.badge-red     { background: #fee2e2; color: #b91c1c; }
.badge-green   { background: #dcfce7; color: #166534; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.form-group { margin-bottom: 14px; min-width: 0; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.form-group .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="email"], input[type="search"], input[type="tel"], input[type="url"],
select, textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea { min-height: 80px; resize: vertical; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }

/* 学生多选网格 */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.check-grid label { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.check-grid label:hover { background: #f1f5f9; }
.check-grid input { width: auto; }

/* ---------- 提示 ---------- */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; overflow-wrap: break-word; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-warn    { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 5px 11px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { color: #cbd5e1; }
.pagination .pg-info { border: none; color: var(--muted); padding-left: 0; }
.pagination .dots { border: none; }

/* ---------- 搜索条 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }
.toolbar .spacer { flex: 1; }

/* ---------- 登录页 ---------- */
.login-body { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { width: 400px; max-width: 100%; background: #fff; border-radius: 16px; padding: 36px 32px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-box h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.login-box .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }

/* ---------- 我的积分卡片 ---------- */
.score-hero {
  background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff;
  border-radius: var(--radius); padding: 22px; display: flex; align-items: center; gap: 22px; margin-bottom: 16px;
}
.score-hero .big { font-size: 44px; font-weight: 800; line-height: 1.1; flex: none; }
.score-hero .meta { font-size: 13px; opacity: .85; overflow-wrap: break-word; }

/* ---------- 进度条 ---------- */
.progress { background: #e2e8f0; border-radius: 20px; height: 10px; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); border-radius: 20px; }

/* ---------- 班费 ---------- */
.fee-total {
  background: linear-gradient(135deg, #065f46, #059669); color: #fff;
  border-radius: var(--radius); padding: 20px; display: flex; gap: 36px; flex-wrap: wrap;
}
.fee-total .item { min-width: 0; }
.fee-total .item .n { font-size: 26px; font-weight: 700; }
.fee-total .item .l { font-size: 12px; opacity: .85; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.tabs a { padding: 8px 18px; border-radius: 8px 8px 0 0; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs a.active { color: var(--primary); border-bottom: 2px solid var(--primary); margin-bottom: -2px; text-decoration: none; }

/* ============================================
   响应式断点
   ============================================ */

/* ---------- 大屏（≥1200px）：内容限宽居中，卡片更舒展 ---------- */
@media (min-width: 1200px) {
  .content { max-width: 1440px; margin: 0 auto; width: 100%; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
}

/* ---------- 平板（768-1023px）：侧边栏略收窄 ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .sidebar { width: var(--sidebar-w-md); }
  .main { margin-left: var(--sidebar-w-md); }
  .brand-text strong { font-size: 14px; }
  .content { padding: 16px 18px; }
}

/* ---------- 手机（<768px）：抽屉菜单 + 单列紧凑布局 ---------- */
@media (max-width: 767px) {
  /* 布局：侧边栏转为抽屉 */
  .sidebar {
    width: 250px;
    transform: translateX(-100%);
    transition: transform .28s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.25);
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }

  /* 顶栏紧凑 */
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar-title { font-size: 15px; }
  .topbar-user { gap: 8px; }
  .uname { max-width: 88px; }

  /* 内容区紧凑 */
  .content { padding: 12px; }
  .footer { padding: 12px 14px; text-align: center; }

  /* 统计卡：两列 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .num { font-size: 22px; }

  /* 卡片 */
  .card { padding: 14px; border-radius: 8px; margin-bottom: 12px; }
  .card h3 { font-size: 14px; }

  /* 表格：更紧凑 + 平滑横滑 */
  .table th, .table td { padding: 8px 10px; font-size: 13px; }

  /* 按钮：触控友好、操作区撑满 */
  .btn { padding: 10px 14px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn {
    flex: 1 1 auto; min-height: 42px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  }

  /* 工具栏纵向堆叠，控件占满（!important 压过页面内联 flex/width 样式） */
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .toolbar input, .toolbar select { flex: none !important; width: 100% !important; min-width: 0 !important; }
  .toolbar .spacer { display: none; }

  /* 表单：防 iOS 聚焦自动放大 */
  input[type="text"], input[type="password"], input[type="number"], input[type="date"],
  input[type="datetime-local"], select, textarea { font-size: 16px; padding: 9px 12px; }

  /* 学生多选网格更密 */
  .check-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  /* 班费缴纳网格：每行 checkbox+姓名，金额输入框换行占满 */
  .check-grid label { flex-wrap: wrap; }
  .check-grid label input[type="number"] { width: 100% !important; margin-left: 24px; margin-top: 2px; }

  /* 积分卡横排变竖排 */
  .score-hero { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; }
  .score-hero .big { font-size: 36px; }

  /* 班费汇总 */
  .fee-total { gap: 16px; padding: 16px; }
  .fee-total .item .n { font-size: 22px; }

  /* 标签页横滑 */
  .tabs { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }

  /* 分页居中 */
  .pagination { justify-content: center; gap: 4px; }

  /* 登录 / 安装卡片 */
  .login-box { padding: 28px 20px; }
}

/* ---------- 超小屏（≤400px）：再收紧 ---------- */
@media (max-width: 400px) {
  .stats-grid { gap: 8px; }
  .stat-card .num { font-size: 20px; }
  .stat-card { padding: 10px 12px; }
  .topbar-user .role-badge { display: none; }
  .menu-item { padding: 9px 10px; }
}

/* ===== 班费图表区 ===== */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-box { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px; }
.chart-box h4 { margin: 0 0 10px; font-size: 14px; color: #374151; }
.chart-wrap { position: relative; height: 240px; }
.chart-sm { height: 210px; }
.chart-toolbar { margin-bottom: 8px; }
.chart-toolbar select { padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; background: #fff; color: #374151; max-width: 100%; }
.chart-legend { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #4b5563; }
.chart-legend .lg-item { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend .lg-item i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
  .chart-wrap { height: 220px; }
}

/* ===== 凭证 Lightbox ===== */
.evi-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .72); z-index: 999; display: none; align-items: center; justify-content: center; padding: 20px; }
.evi-mask.show { display: flex; }
.evi-box { background: #fff; border-radius: 12px; max-width: 92vw; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.evi-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-size: 13px; color: #374151; }
.evi-body { padding: 10px; display: flex; align-items: center; justify-content: center; background: #111827; }
.evi-body img { max-width: 82vw; max-height: 66vh; object-fit: contain; border-radius: 6px; }
.evi-nav { display: flex; justify-content: center; gap: 10px; padding: 10px 14px; }
.evi-link { color: #0f766e; text-decoration: none; font-size: 13px; }
.evi-link:hover { text-decoration: none; color: #0f766e; }

/* ===== 我的同学 ===== */
.classmate-top { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.cm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cm-head h3 { margin: 0; font-size: 15px; color: #374151; }
.birth-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; }
.birth-card { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 88px; padding: 10px 6px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; }
.birth-card .bc-name { font-size: 13px; font-weight: 600; color: #92400e; }
.birth-card .bc-date { font-size: 12px; color: #b45309; }
.classmate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cm-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .2s; }
.cm-card:hover { box-shadow: 0 4px 16px rgba(15,23,42,.08); }
.cm-top { display: flex; align-items: center; gap: 10px; }
.cm-avatar { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 20px; flex: none; }
.cm-name-box { flex: 1; min-width: 0; }
.cm-name { font-size: 15px; font-weight: 700; color: #1f2937; }
.cm-meta { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.like-btn { display: inline-flex; align-items: center; gap: 4px; background: #f3f4f6; border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px; cursor: pointer; font-size: 13px; color: #6b7280; flex: none; transition: all .15s; }
.like-btn:hover { background: #fee2e2; border-color: #fca5a5; }
.like-btn.liked { background: #fee2e2; border-color: #f87171; color: #dc2626; }
.like-btn .like-num { font-weight: 700; }
.cm-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; font-size: 13px; color: #4b5563; border-top: 1px dashed var(--border); padding-top: 10px; }
.cm-info .ci-label { display: inline-block; min-width: 34px; color: var(--muted); margin-right: 6px; }
.cm-info .ci-full { grid-column: 1 / -1; }
/* 手机：同学卡片自动适配列宽（≥200px/列），小手机单列全宽、大手机多列，杜绝过窄双列 */
@media (max-width: 767px) {
  .classmate-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
  .cm-card { padding: 12px; }
  .cm-avatar { width: 40px; height: 40px; font-size: 17px; }
  .cm-info { grid-template-columns: 1fr; }
  .like-btn { padding: 8px 14px; font-size: 14px; } /* 触控友好 */
  .like-quota { font-size: 13px; }
  .cm-head { gap: 8px; }
}
.like-quota { font-size: 13px; color: var(--muted); }
.like-quota b { color: #dc2626; font-weight: 700; }
.like-btn.quota-out { opacity: .55; cursor: not-allowed; }
/* 班干部职务徽章 */
.cm-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.cm-badge { font-size: 11px; font-weight: 600; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.cm-card.is-cadre { border-color: #fbbf24; background: linear-gradient(180deg, #fffbeb 0%, #fff 60%); }
@media (max-width: 767px) {
  .cm-badge { font-size: 10px; padding: 0 6px; }
}

/* ===== 班级日程 ===== */
.sched-head .sched-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sched-pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sched-title { text-align: center; min-width: 150px; }
.sched-title strong { display: block; font-size: 16px; color: #1f2937; }
.sched-title .hint { font-size: 12px; }
.sched-jump { display: flex; align-items: center; gap: 6px; }
.sched-jump input { width: auto; }
.sched-day { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.sched-day.is-today { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.sched-day-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.sched-day-head .sd-date { font-size: 15px; font-weight: 700; color: #1f2937; }
.sched-day-head .sd-dow { font-size: 12px; color: var(--muted); }
.sched-day-head .sd-today { font-size: 11px; font-weight: 700; color: #fff; background: var(--primary); border-radius: 999px; padding: 1px 8px; }
.sched-day-head .sd-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.sd-empty { color: #cbd5e1; font-size: 13px; padding: 4px 0; }
.sched-item { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-top: 1px dashed #eef2f7; }
.sched-item:first-of-type { border-top: none; }
.si-time { flex: none; min-width: 92px; font-size: 13px; color: var(--muted); padding-top: 2px; }
.si-time strong { display: block; font-size: 14px; color: #374151; }
.si-body { flex: 1; min-width: 0; }
.si-title { font-size: 14px; font-weight: 700; color: #1f2937; }
.si-span { font-size: 12px; font-weight: 400; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 0 6px; margin-left: 6px; white-space: nowrap; }
.si-desc { font-size: 13px; color: #6b7280; margin-top: 3px; overflow-wrap: break-word; }
.si-meta { font-size: 11px; color: #cbd5e1; margin-top: 4px; }
.si-del { flex: none; align-self: center; }
.btn-danger-ghost { background: #fff; border: 1px solid #fecaca; color: #dc2626; }
.btn-danger-ghost:hover { background: #fee2e2; }
@media (max-width: 767px) {
  .sched-head .sched-nav { flex-direction: column; align-items: stretch; }
  .sched-pager { justify-content: center; }
  .sched-title { min-width: 0; }
  .sched-jump { justify-content: center; }
  .sched-jump input { flex: 1; }
  .si-time { min-width: 72px; }
  .sched-item { flex-wrap: wrap; }
  .si-del { margin-left: auto; }
}

/* ===== 建言献策 ===== */
.sug-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; background: #fff; }
.sug-card.is-closed { background: #f9fafb; }
.sug-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sug-title { font-size: 15px; font-weight: 700; color: #1f2937; }
.sug-closed { font-size: 11px; font-weight: 600; color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.sug-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.sug-content { font-size: 14px; color: #4b5563; margin: 10px 0; line-height: 1.7; overflow-wrap: break-word; }
.sug-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px dashed #eef2f7; padding-top: 10px; }
.vote-btn { display: inline-flex; align-items: center; gap: 5px; background: #f3f4f6; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: #6b7280; cursor: pointer; transition: all .15s; }
.vote-btn:hover { border-color: #9ca3af; }
.vote-btn.voted { font-weight: 700; }
.vote-btn.up.voted { background: #dcfce7; border-color: #4ade80; color: #15803d; }
.vote-btn.down.voted { background: #fee2e2; border-color: #f87171; color: #b91c1c; }
.vote-btn:disabled { opacity: .5; cursor: not-allowed; }
.vote-btn .vote-num { font-weight: 700; }
.vote-bar { flex: 1; min-width: 60px; max-width: 120px; height: 6px; background: #fee2e2; border-radius: 999px; overflow: hidden; }
.vote-bar i { display: block; height: 100%; background: #4ade80; border-radius: 999px; transition: width .3s; }
.sug-reply-toggle { font-size: 13px; color: var(--primary); cursor: pointer; font-weight: 600; }
.sug-reply-toggle:hover { color: var(--primary-dark); }
.sug-mgr { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.sug-replies { margin-top: 12px; border-top: 1px dashed #eef2f7; padding-top: 10px; }
.reply-item { padding: 8px 0; border-bottom: 1px dashed #f1f5f9; }
.reply-item:last-of-type { border-bottom: none; }
.reply-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.reply-body { font-size: 13px; color: #4b5563; margin-top: 3px; overflow-wrap: break-word; }
.reply-form { display: flex; gap: 8px; margin-top: 10px; }
.reply-form input { flex: 1; }
@media (max-width: 767px) {
  .sug-mgr { margin-left: 0; width: 100%; }
  .reply-form { flex-wrap: wrap; }
  .reply-form input { flex: 1 1 100%; }
  .vote-bar { max-width: 100%; }
}

/* ============================================================
 * 第19/8/18/13/16/2/5/10/12/14/15 项升级样式
 * ============================================================ */

/* ---- 登录验证码 ---- */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-img { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; background: #f1f5f9; height: 40px; }
.captcha-img svg { display: block; height: 36px; width: auto; }

/* ---- 顶栏搜索与消息铃铛 ---- */
.tb-search { display: inline-flex; margin-right: 8px; }
.tb-search input { width: 140px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; transition: width .2s; }
.tb-search input:focus { width: 200px; border-color: var(--primary); outline: none; }
.tb-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; margin-right: 8px; background: #fff; font-size: 16px; }
.tb-icon:hover { border-color: var(--primary); }
.tb-dot { position: absolute; top: -6px; right: -6px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; line-height: 17px; text-align: center; border-radius: 10px; padding: 0 4px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }

/* ---- 侧栏菜单徽标 ---- */
.menu-label { flex: 1; }
.menu-badge { background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; min-width: 19px; height: 19px; line-height: 19px; text-align: center; border-radius: 10px; padding: 0 5px; margin-left: 6px; }

/* ---- 工作台快捷入口 ---- */
.quick-card { margin-bottom: 18px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.quick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); text-decoration: none; transition: all .15s; }
.quick:hover { border-color: var(--primary); background: #f8faff; transform: translateY(-2px); box-shadow: 0 3px 8px rgba(30,64,175,.08); }
.q-ico { font-size: 22px; line-height: 1; }
.q-name { font-size: 12.5px; font-weight: 600; }
.q-badge { position: absolute; top: 8px; right: 8px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; line-height: 17px; text-align: center; border-radius: 10px; padding: 0 4px; }
.ni-item-sm { padding: 7px 0; border-bottom: 1px dashed var(--border); display: flex; justify-content: space-between; gap: 8px; }
.ni-item-sm:last-child { border-bottom: 0; }
.ni-item-sm a { color: var(--text); text-decoration: none; font-weight: 600; }
.ni-item-sm a:hover { color: var(--primary); }

/* ---- 公告 ---- */
.notice-item { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; background: #fff; }
.notice-item.unread { border-color: #bfdbfe; background: #f8faff; }
.notice-item.is-top { border-left: 4px solid #f59e0b; }
.ni-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ni-title { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ni-top { background: #f59e0b; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; }
.ni-dot { color: #dc2626; font-size: 10px; }
.ni-meta { color: var(--muted); font-size: 12px; margin-left: auto; }
.ni-del { margin-left: 4px; }
.ni-body { margin-top: 8px; color: #374151; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.btn-danger-ghost { background: #fff; color: #dc2626; border: 1px solid #fca5a5; }
.btn-danger-ghost:hover { background: #fef2f2; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

/* ---- 消息中心 ---- */
.cm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.msg-item { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: #fff; }
.msg-item.unread { background: #f8faff; border-color: #bfdbfe; }
.msg-icon { font-size: 22px; line-height: 1.3; }
.msg-body { flex: 1; min-width: 0; }
.msg-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-type { background: #f1f5f9; color: #475569; font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 600; }
.msg-content { color: #4b5563; font-size: 13px; margin-top: 4px; }
.msg-meta { color: var(--muted); font-size: 12px; margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }
.msg-meta a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* ---- 作业 ---- */
.hw-item { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; background: #fff; }
.hw-item.overdue { border-left: 4px solid #f87171; }
.hw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hw-title { font-weight: 700; font-size: 15px; }
.hw-content { margin-top: 6px; color: #374151; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.hw-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.hw-submit { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.hw-form { display: flex; gap: 8px; flex-wrap: wrap; }
.hw-form input[type=text] { flex: 1; min-width: 200px; }
.hw-done { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 8px; padding: 8px 12px; font-size: 13px; }

/* ---- 数据备份 ---- */
.export-grid { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- 日志审计 ---- */
.log-sensitive { background: #fef2f2; }
.log-sensitive td:first-child { border-left: 3px solid #dc2626; }

/* ---- 荣誉墙 ---- */
.honor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.honor-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.03); }
.honor-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.honor-icon { font-size: 30px; line-height: 1; }
.honor-name { font-weight: 700; font-size: 15px; }
.honor-desc { color: var(--muted); font-size: 12px; }
.honor-empty { color: var(--muted); font-size: 13px; padding: 10px 0; text-align: center; }
.honor-list { list-style: none; margin: 0; padding: 0; }
.honor-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.honor-list li:last-child { border-bottom: 0; }
.honor-rank { width: 22px; height: 22px; border-radius: 50%; background: #f1f5f9; color: #64748b; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px; }
.honor-rank.top { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.honor-name2 { flex: 1; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.honor-name2:hover { color: var(--primary); }
.honor-val { color: var(--primary); font-weight: 700; font-size: 13px; }

/* ---- 在线评选 ---- */
.ballot-item { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; background: #fff; }
.ballot-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ballot-title { font-weight: 700; font-size: 15px; }
.ballot-meta { color: var(--muted); font-size: 12px; margin-top: 5px; }
.ballot-desc { color: #374151; font-size: 13px; margin-top: 6px; }
.ballot-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin: 12px 0; }
.ballot-cand { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.ballot-cand:hover { border-color: var(--primary); background: #f8faff; }
.ballot-cand input { accent-color: var(--primary); }
.ballot-result { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.result-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.result-name { width: 76px; font-weight: 600; font-size: 13.5px; flex: 0 0 76px; }
.result-bar { flex: 1; background: #f1f5f9; border-radius: 6px; height: 10px; overflow: hidden; }
.result-bar span { display: block; height: 100%; background: linear-gradient(90deg, #60a5fa, #3b82f6); border-radius: 6px; min-width: 2px; }
.result-num { color: var(--muted); font-size: 12.5px; width: 56px; text-align: right; flex: 0 0 56px; }

/* ---- 表扬墙 / 成长档案 ---- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: #e2e8f0; }
.tl-item { position: relative; padding: 0 0 18px 0; }
.tl-item:last-child { padding-bottom: 4px; }
.tl-dot { position: absolute; left: -26px; top: 2px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; box-shadow: 0 0 0 3px #fff; }
.tl-time { color: var(--muted); font-size: 12px; }
.tl-text { font-size: 13.5px; color: #334155; margin-top: 2px; line-height: 1.6; }
.tl-photo { max-width: 220px; max-height: 160px; border-radius: 10px; margin-top: 8px; border: 1px solid var(--border); display: block; }

.profile-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ph-avatar { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, #60a5fa, #3b82f6); color: #fff; font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 64px; }
.ph-info { flex: 1; min-width: 180px; }
.ph-info h3 { margin: 0 0 4px; font-size: 20px; }
.ph-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.ph-stat { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; text-align: center; }
.ph-stat .num { display: block; font-size: 18px; font-weight: 700; color: var(--primary); }
.ph-stat .lbl { font-size: 11px; color: var(--muted); }

/* ---- 全局搜索 ---- */
.sr-sec { margin: 16px 0 8px; font-size: 14px; color: #334155; border-left: 3px solid var(--primary); padding-left: 8px; }
.sr-list { display: flex; flex-direction: column; gap: 6px; }
.sr-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); text-decoration: none; font-size: 13.5px; }
.sr-item:hover { border-color: var(--primary); background: #f8faff; }

/* ---- 同学卡片姓名链接 ---- */
.cm-name-link { color: var(--text); text-decoration: none; }
.cm-name-link:hover { color: var(--primary); }

/* ---- 手机端适配 ---- */
@media (max-width: 720px) {
  .tb-search { display: none; }
  .quick-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
  .honor-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .profile-hero { flex-direction: column; align-items: flex-start; }
  .ph-stats { width: 100%; }
  .ph-stat { flex: 1; }
  .msg-item { flex-wrap: wrap; }
}

/* ============================================================
 * 全站样式统一 + 移动端深度优化
 * ============================================================ */

/* ---- 触控基础：防双击缩放、去点击高亮闪烁 ---- */
html { -webkit-tap-highlight-color: transparent; }
a, button, input, select, textarea, label { touch-action: manipulation; }
img { max-width: 100%; height: auto; }

/* ---- 链接统一（全站任何状态无下划线）---- */
a, a:hover, a:active, a:visited, a:focus {
  text-decoration: none !important;
  outline: none;
}
/* 正文内嵌链接以颜色+字重区分，不用下划线 */
.ni-body a, .tl-text a, .sug-content a, .hw-content a { font-weight: 600; }
.ni-body a:hover, .tl-text a:hover, .sug-content a:hover, .hw-content a:hover { color: var(--primary-dark); }

/* ---- 按钮统一触控尺寸与反馈 ---- */
.btn { position: relative; overflow: hidden; }
.btn:active { transform: scale(.97); }
.btn-sm:active { transform: scale(.95); }

/* ---- 移动端深优化 ---- */
@media (max-width: 767px) {
  /* 内容更紧凑 */
  .content { padding: 10px; }

  /* 顶栏：角色徽章隐藏更省空间、搜索框改图标按钮由工作台承接 */
  .topbar { padding: 8px 10px; }
  .menu-toggle { width: 42px; height: 42px; }          /* 触控 ≥44 接近 */

  /* 侧栏菜单触控高度 */
  .menu-item { padding: 12px 12px; min-height: 46px; font-size: 14.5px; border-radius: 10px; }

  /* 卡片统一收窄 */
  .card { padding: 12px; }
  .card h3 { font-size: 15px; }

  /* 工作台快捷入口：3 列自适应，触控块更大 */
  .quick-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .quick { min-height: 74px; padding: 12px 6px; border-radius: 12px; }

  /* 按钮触控高度统一（行内按钮也撑大） */
  .btn, .btn-sm { min-height: 40px; padding-left: 12px; padding-right: 12px; }
  .btn-sm { min-height: 36px; }

  /* 标签页：触控高度 + 横滑 */
  .tabs a { padding: 10px 14px; font-size: 13.5px; min-height: 42px; display: inline-flex; align-items: center; }

  /* 分页：触控友好 */
  .pagination a, .pagination span {
    min-width: 38px; min-height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 6px;
  }

  /* 表单：label 字号略升、输入框更大触区 */
  .form-group label { font-size: 13.5px; }
  .form-group { margin-bottom: 12px; }

  /* 荣誉墙：小屏单列阅读更舒适 */
  .honor-grid { grid-template-columns: 1fr; gap: 10px; }
  .honor-card { padding: 14px; }

  /* 在线评选：候选两列、结果行紧凑 */
  .ballot-cands { grid-template-columns: repeat(2, 1fr); }
  .ballot-cand { min-height: 42px; padding: 8px 8px; font-size: 13px; }
  .result-name { width: 60px; flex-basis: 60px; }

  /* 公告：头部信息换行不挤压 */
  .ni-head { gap: 6px; }
  .ni-meta { width: 100%; margin-left: 0; font-size: 11.5px; }
  .ni-del { margin-left: auto; }
  .notice-item, .msg-item, .hw-item, .ballot-item { padding: 12px; }

  /* 消息：图标与内容并排、正文可读 */
  .msg-icon { font-size: 20px; }
  .msg-title { font-size: 13.5px; }

  /* 作业：提交按钮撑满行宽 */
  .hw-form input[type=text] { flex: 1 1 100%; min-width: 0; min-height: 40px; }
  .hw-form .btn { flex: 1 1 100%; }

  /* 表扬墙：照片宽度限制防溢出 */
  .tl-photo { max-width: 100%; max-height: 220px; }

  /* 成长档案：统计卡两列 */
  .ph-stats { gap: 8px; }
  .ph-stat { flex: 1 1 calc(50% - 8px); padding: 10px 8px; }
  .ph-stat .num { font-size: 17px; }

  /* 全局搜索：结果项竖排更易读 */
  .sr-item { align-items: flex-start; padding: 10px 12px; }
  .sr-item .hint { width: 100%; }

  /* 统计卡：两列统一高度 */
  .stats-grid { gap: 8px; }
  .stat-card { padding: 12px 12px; }

  /* 表格：字号统一、单元格最小触高 */
  .table th, .table td { padding: 9px 10px; }

  /* 点赞/投票按钮触控高度 */
  .like-btn, .vote-btn { min-height: 40px; }

  /* 顶部图标：手机端缩小 */
  .tb-icon { width: 30px; height: 30px; margin-right: 2px; font-size: 14px; border-radius: 8px; }
  .tb-icon:hover { background: #f1f5f9; }

  /* 表单操作区按钮撑满 */
  .form-actions .btn { min-height: 44px; }
}

/* ---- 超小屏（≤420px）再收紧 ---- */
@media (max-width: 420px) {
  .quick-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .quick { min-height: 68px; padding: 10px 4px; }
  .q-ico { font-size: 20px; }
  .q-name { font-size: 11.5px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-user .my-center .mc-text { display: none; }   /* 小屏只留图标 */
  .uname { max-width: 70px; font-size: 13px; }
  .card { padding: 10px; }
  .content { padding: 8px; }
}

/* ---- 中等屏（768-1024）微调 ---- */
@media (min-width: 768px) and (max-width: 1023px) {
  .quick-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .honor-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .content { padding: 16px 16px; }
}

/* ============================================================
 * 工作台 v2 专属样式
 * ============================================================ */

/* ---- 欢迎横幅 ---- */
.dash-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  color: #fff; border-radius: 14px; padding: 22px 24px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  box-shadow: 0 6px 20px rgba(30,64,175,.18);
}
.dh-greet { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.dh-meta { color: rgba(255,255,255,.85); font-size: 13px; margin-top: 4px; }
.dh-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dh-btn { background: #fff; color: #1d4ed8; font-weight: 600; }
.dh-btn:hover { background: #eff6ff; color: #1e40af; }
.dh-btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.dh-btn-ghost:hover { background: rgba(255,255,255,.26); color: #fff; }

/* ---- 本周生日 ---- */
.dash-birth-card { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb 0%, #fff 70%); }
.birth-card { text-decoration: none; transition: transform .15s; }
.birth-card:hover { transform: translateY(-2px); border-color: #f59e0b; }
.birth-card.is-today { background: #fef3c7; border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.25); }
.birth-card .bc-name { display: block; text-align: center; }

/* ---- 双栏布局 ---- */
.dash-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---- 待办迷你列表 ---- */
.todo-mini { display: flex; flex-direction: column; gap: 6px; }
.tm-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  color: var(--text); text-decoration: none; transition: all .15s;
}
.tm-item:hover { border-color: var(--primary); background: #f8faff; }
.tm-ico { font-size: 16px; flex: none; }
.tm-body { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tm-name { font-weight: 700; font-size: 13.5px; }
.tm-reason { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.tm-score { font-weight: 700; font-size: 13.5px; flex: none; }
.tm-score.up { color: var(--ok); }
.tm-score.down { color: var(--danger); }

/* ---- 排行/之星列表 ---- */
.dash-rank { display: flex; flex-direction: column; gap: 6px; }
.dk-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  color: var(--text); text-decoration: none; transition: all .15s;
}
.dk-item:hover { border-color: var(--primary); background: #f8faff; }
.dk-name { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-val { font-weight: 700; color: var(--primary); font-size: 13px; }
.dk-val.up { color: var(--ok); }

/* ---- 班级动态 ---- */
.dash-feed { display: flex; flex-direction: column; gap: 2px; }
.df-item { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #eef2f7; }
.df-item:last-child { border-bottom: 0; }
.df-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; flex: 0 0 22px; }
.df-body { flex: 1; min-width: 0; }
.df-text { font-size: 13px; color: #334155; line-height: 1.5; overflow-wrap: break-word; }
.df-text a { font-weight: 700; }
.df-time { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ---- 移动端适配 ---- */
@media (max-width: 767px) {
  .dash-hero { padding: 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .dh-greet { font-size: 19px; }
  .dh-actions { width: 100%; }
  .dh-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 42px; }
  .dash-cols { grid-template-columns: 1fr; gap: 12px; }
  .dash-col { gap: 12px; }
  .tm-item, .dk-item { padding: 11px 12px; min-height: 44px; }
  .df-item { padding: 9px 0; }
  .birth-card { width: 80px; padding: 9px 4px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .dash-cols { grid-template-columns: 1fr; gap: 14px; }
  .dash-col { gap: 14px; }
}

/* ============================================================
 * 我的中心 my.php 布局优化（上下布局 + 小屏适配）
 * ============================================================ */

/* 我的信息 / 我的职务：上下堆叠，不再左右并排 */
.my-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.my-stack .card {
  width: 100%;
  box-sizing: border-box;
}

/* 键值信息表（我的信息）：手机端转为 标签上/内容下 块状，阅读更舒适 */
.kv-table { border-collapse: collapse; width: 100%; }
.kv-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.kv-table tr:last-child td { border-bottom: 0; }
.kv-table td:first-child {
  width: 92px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  background: #f8fafc;
}
.kv-table input[type=text],
.kv-table input[type=date],
.kv-table input[type=email],
.kv-table select {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
}

@media (max-width: 767px) {
  .my-stack { gap: 12px; }
  .kv-table td:first-child {
    display: block;
    width: 100%;
    padding: 8px 10px 2px 10px;
    background: none;
    color: var(--muted);
    font-size: 12px;
  }
  .kv-table td:last-child {
    display: block;
    width: 100%;
    padding: 4px 10px 10px 10px;
  }
}

/* ============================================================
 * 工作台 v2.1：班费卡片 + 今日日程卡片
 * ============================================================ */
.badge-purple { background: #ede9fe; color: #6d28d9; }

.fee-mini-stat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.fms-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  min-width: 0;
}
.fms-item.fms-bal { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #a7f3d0; }
.fms-lbl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.fms-num { display: block; font-size: 17px; font-weight: 700; color: var(--text); }
.fms-bal .fms-num { color: #047857; }

@media (max-width: 420px) {
  .fee-mini-stat { grid-template-columns: 1fr; }
}

/* ============================================================
 * 顶栏右上角新布局：名字 + 消息中心文字 + 工作台/我的中心/退出图标
 * ============================================================ */

/* 消息中心文字链接 */
.tb-msg {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 12px; border-radius: 17px;
  background: rgba(255,255,255,.16); color: #fff;
  font-size: 13px; font-weight: 600; text-decoration: none;
  white-space: nowrap; transition: background .15s;
}
.tb-msg:hover { background: rgba(255,255,255,.3); color: #fff; text-decoration: none; }
.tb-cnt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700;
  line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.tm-short { display: none; }

/* 顶栏三图标（工作台/我的中心/退出）默认尺寸 */
.topbar-user .tb-icon { margin-right: 2px; }

/* 角色徽章在名字旁弱化 */
.topbar-user .role-badge { padding: 2px 8px; font-size: 11px; margin-left: -6px; }

/* ---- 手机端 ---- */
@media (max-width: 767px) {
  .topbar-user { gap: 6px; }
  .topbar-user .role-badge { display: none; }        /* 小屏隐藏角色徽章 */
  .topbar-user .uname { max-width: 64px; font-size: 12.5px; }
  .tb-msg { height: 30px; padding: 0 9px; font-size: 12px; border-radius: 15px; }
  .tb-cnt { min-width: 15px; height: 15px; font-size: 10px; padding: 0 4px; }
  .tm-full { display: none; }                        /* 消息中心 → 消息 */
  .tm-short { display: inline; }
  .topbar-user .tb-icon { width: 30px; height: 30px; font-size: 14px; }
}
