/* ==========================================================================
   向尚教育·学员管理系统 · 设计系统
   ========================================================================== */

:root {
  --brand-50: #eef4ff;
  --brand-100: #dce7ff;
  --brand-200: #bed0ff;
  --brand-500: #3b6ef5;
  --brand-600: #2a58e0;
  --brand-700: #1f47bd;
  --brand-900: #16307d;

  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;

  --line: #e5eaf3;
  --line-strong: #d3dced;
  --bg: #f4f7fc;
  --card: #ffffff;

  --ok: #16a34a;
  --ok-bg: #e8f8ee;
  --warn: #d97706;
  --warn-bg: #fdf3e3;
  --danger: #dc2626;
  --danger-bg: #fdecec;
  --info: #0891b2;
  --info-bg: #e4f6fa;
  --gold: #b45309;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(30, 58, 138, .05), 0 2px 8px rgba(30, 58, 138, .04);
  --shadow: 0 4px 20px rgba(30, 58, 138, .08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .16);
  --grad-brand: linear-gradient(135deg, #3b6ef5, #2a58e0 55%, #1f47bd);
  --grad-card-blue: linear-gradient(135deg, #eef5ff, #e3eeff);
  --grad-card-green: linear-gradient(135deg, #ebf9f0, #ddf5e8);
  --grad-card-orange: linear-gradient(135deg, #fff4e8, #ffecd6);
  --grad-card-pink: linear-gradient(135deg, #fdeef4, #fbdfeb);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #eaf1fb 0%, #f4f7fc 420px);
  background-attachment: fixed;
  color: var(--ink-900);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 10px; }
::selection { background: var(--brand-100); }

.muted { color: var(--ink-500); }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.center { text-align: center; }
.right { text-align: right; }
.mt0 { margin-top: 0 !important; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.items-center { align-items: center; }
.gap8 { gap: 8px; }
.gap12 { gap: 12px; }
.gap16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink-700);
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, #3b6ef5, #2a58e0 60%, #1f47bd);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(42, 88, 224, .32), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #2a58e0, #1f47bd);
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(42, 88, 224, .4);
}
.btn-danger { color: var(--danger); border-color: #f5c2c2; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--brand-50); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: var(--r-sm); }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: var(--r); }
.btn-block { width: 100%; }
.btn-link { border: none; background: none; color: var(--brand-600); padding: 2px 4px; cursor: pointer; font-size: 12px; font-family: inherit; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-600);
}
.field .hint { margin-top: 4px; font-size: 11.5px; color: var(--ink-400); }
.req::after { content: " *"; color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink-900);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(59, 110, 245, .13);
}
.input::placeholder { color: var(--ink-300); }
.input:disabled, .select:disabled { background: #f4f6fa; color: var(--ink-400); cursor: not-allowed; }
.input.error, .select.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .1); }
.textarea { min-height: 130px; resize: vertical; font-family: var(--mono); font-size: 12.5px; }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8.6 1.6 4.2l1-1L6 6.6l3.4-3.4 1 1z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.err-msg { margin-top: 4px; font-size: 11.5px; color: var(--danger); }

.checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-700); cursor: pointer; user-select: none; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--brand-600); cursor: pointer; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 14.5px; }
.card-head .sub { font-size: 12px; color: var(--ink-500); font-weight: 400; margin-top: 2px; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

/* ---------- 表格 ---------- */
.table-wrap { overflow: auto; border-radius: 0 0 var(--r) var(--r); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th, table.table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.table thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f7f9fd;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-600);
  white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
}
table.table tbody tr:hover { background: #fafcff; }
table.table tbody tr:last-child td { border-bottom: none; }
table.table td.num, table.table th.num { text-align: right; font-family: var(--mono); font-size: 12.5px; }
table.table td.ctr, table.table th.ctr { text-align: center; }
table.table.compact th, table.table.compact td { padding: 6px 9px; font-size: 12.5px; }
.tfoot-note { padding: 10px 18px; font-size: 12px; color: var(--ink-500); border-top: 1px solid var(--line); background: #fafcff; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.7;
  background: var(--brand-50); color: var(--brand-700); white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.gray { background: #eef1f6; color: var(--ink-500); }
.badge.gold { background: #fdf3e3; color: var(--gold); }

/* 排名徽章 */
.rk { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; padding: 1px 6px; border-radius: 6px; font-family: var(--mono); font-size: 12px; font-weight: 700; background: #eef1f6; color: var(--ink-600); }
.rk.r1 { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #7c2d12; }
.rk.r2 { background: linear-gradient(135deg, #e2e8f0, #b8c3d4); color: #334155; }
.rk.r3 { background: linear-gradient(135deg, #fed7aa, #d97706); color: #7c2d12; }
.rk.top { background: var(--brand-100); color: var(--brand-700); }
.rk.na { background: transparent; color: var(--ink-300); }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  padding: 9px 16px; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 550; color: var(--ink-500);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--brand-600); }
.tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(2px);
  animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.985) } to { opacity: 1; transform: none } }
.modal {
  width: 100%; max-width: 520px; max-height: 88vh;
  background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  animation: popIn .2s cubic-bezier(.2, .9, .3, 1);
}
.modal.wide { max-width: 840px; }
.modal.xwide { max-width: 1100px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15.5px; }
.modal-body { padding: 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fafcff; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.x-btn { border: none; background: none; font-size: 20px; line-height: 1; color: var(--ink-400); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.x-btn:hover { background: #eef1f6; color: var(--ink-700); }

/* ---------- 轻提示 ---------- */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(15, 23, 42, .92); color: #fff;
  font-size: 13px; box-shadow: var(--shadow-lg);
  animation: popIn .18s ease; max-width: 88vw;
}
.toast.ok { background: #0f7a3d; }
.toast.err { background: #b91c1c; }
.toast.warn { background: #b45309; }

/* ---------- 空状态 / 加载 ---------- */
.empty { padding: 48px 20px; text-align: center; color: var(--ink-400); }
.empty .ico { font-size: 34px; opacity: .5; margin-bottom: 8px; }
.empty .t { font-size: 14px; color: var(--ink-500); font-weight: 550; }
.empty .s { font-size: 12.5px; margin-top: 4px; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: var(--brand-200); border-top-color: var(--brand-600); }
@keyframes spin { to { transform: rotate(360deg) } }
.loading-row { padding: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink-500); font-size: 13px; }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f6f8fb 50%, #eef1f6 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes sk { from { background-position: 200% 0 } to { background-position: -200% 0 } }

/* ---------- 统计卡（参考工作台风格：马卡龙渐变底 + 大数字 + 角标圆） ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat::after { content: ""; position: absolute; right: -18px; top: -18px; width: 66px; height: 66px; border-radius: 50%; background: var(--brand-50); opacity: .8; }
/* 四色轮换：蓝 / 绿 / 橙 / 粉（与管理端看板、学员端指标卡共用） */
.stat:nth-child(4n + 1) { background: var(--grad-card-blue); border-color: #d5e4fb; }
.stat:nth-child(4n + 1)::after { background: rgba(59, 110, 245, .14); }
.stat:nth-child(4n + 2) { background: var(--grad-card-green); border-color: #cdeeda; }
.stat:nth-child(4n + 2)::after { background: rgba(22, 163, 74, .12); }
.stat:nth-child(4n + 3) { background: var(--grad-card-orange); border-color: #ffe3c2; }
.stat:nth-child(4n + 3)::after { background: rgba(217, 119, 6, .12); }
.stat:nth-child(4n + 4) { background: var(--grad-card-pink); border-color: #f9d3e2; }
.stat:nth-child(4n + 4)::after { background: rgba(219, 39, 119, .1); }
.stat .k { position: relative; font-size: 12px; color: var(--ink-500); font-weight: 550; }
.stat .v { position: relative; margin-top: 6px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--ink-400); margin-left: 3px; }
.stat .d { position: relative; font-size: 11.5px; color: var(--ink-400); margin-top: 2px; }
.stat.accent::after { background: #fdf3e3; }
.stat.accent .v { color: var(--brand-700); }

/* 紧凑变体：同屏 7 张指标卡一行排开（考勤概览用）。
   桌面固定 7 列；<1280px 退化为自适应换行，窄屏回到 minmax 节奏 */
.stat-grid.compact { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.stat-grid.compact .stat { padding: 12px 12px; }
.stat-grid.compact .stat::after { right: -22px; top: -22px; width: 52px; height: 52px; }
.stat-grid.compact .stat .v { margin-top: 4px; font-size: 20px; }
.stat-grid.compact .stat .d { font-size: 10.5px; }
@media (max-width: 1279px) {
  .stat-grid.compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* ---------- 考勤「当日名单」（指定班级 + 单日查询） ---------- */
.at-day-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .at-day-grid { grid-template-columns: 1fr; } }
.at-day-sess { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: #fff; }
.at-day-head { font-weight: 700; font-size: 14px; margin-bottom: 8px; color: var(--ink-700); }
.at-day-row { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; }
.at-day-k { flex: 0 0 auto; font-size: 12px; font-weight: 600; line-height: 24px; min-width: 44px; }
.at-day-empty { font-size: 12px; color: var(--ink-400); line-height: 24px; }
.at-day-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.at-day-chip {
  display: inline-block; font-size: 12px; line-height: 22px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line);
}
/* 学员端指标卡同款轮换 */
.latest-grid .score-tile:nth-child(4n + 1) { background: linear-gradient(135deg, #f2f7ff, var(--brand-50)); border-color: #d5e4fb; }
.latest-grid .score-tile:nth-child(4n + 1) .v { color: var(--brand-700); }
.latest-grid .score-tile:nth-child(4n + 2) { background: var(--grad-card-green); border-color: #cdeeda; }
.latest-grid .score-tile:nth-child(4n + 2) .v { color: #15803d; }
.latest-grid .score-tile:nth-child(4n + 3) { background: var(--grad-card-orange); border-color: #ffe3c2; }
.latest-grid .score-tile:nth-child(4n + 3) .v { color: #b45309; }
.latest-grid .score-tile:nth-child(4n + 4) { background: var(--grad-card-pink); border-color: #f9d3e2; }
.latest-grid .score-tile:nth-child(4n + 4) .v { color: #be185d; }
.latest-grid .score-tile { transition: transform .18s ease, box-shadow .18s ease; }
.latest-grid .score-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ==========================================================================
   管理端布局
   ========================================================================== */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 216px; flex: 0 0 216px;
  background: linear-gradient(180deg, #101f52 0%, #16307d 34%, #1f47bd 78%, #2a58e0 100%);
  color: #e6edff; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 30;
}
.sidebar::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 200px; height: 200px;
  border-radius: 50%; background: radial-gradient(circle, rgba(120, 160, 255, .28), transparent 68%);
  pointer-events: none;
}
.sidebar .brand { padding: 18px 18px 14px; display: flex; align-items: center; gap: 10px; position: relative; }
.sidebar .brand .logo {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .1));
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
}
.sidebar .brand .t1 { font-size: 14.5px; font-weight: 700; color: #fff; letter-spacing: .01em; }
.sidebar .brand .t2 { font-size: 11px; color: rgba(230, 237, 255, .62); }
.nav { padding: 6px 10px; overflow-y: auto; flex: 1; }
.nav-group { padding: 14px 8px 5px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: rgba(230, 237, 255, .45); font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 11px; margin-bottom: 2px; border: none; border-radius: 8px;
  background: transparent; color: rgba(230, 237, 255, .84);
  font-family: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .14));
  color: #fff; font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 4px 12px rgba(0, 0, 0, .18);
}
.nav-item .ico { width: 17px; text-align: center; font-size: 14px; }
.sidebar .foot { padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .13); font-size: 11.5px; color: rgba(230, 237, 255, .6); }
.sidebar .who { color: #fff; font-weight: 600; font-size: 12.5px; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 13px 24px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid rgba(213, 228, 251, .8); position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 17px; }
.topbar .crumb { font-size: 12px; color: var(--ink-500); margin-top: 1px; }
.main { padding: 20px 24px 48px; flex: 1; min-width: 0; }
.toolbar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .field { margin-bottom: 0; }
.toolbar .field > label { font-size: 11.5px; }
.toolbar .input, .toolbar .select { min-width: 130px; }
.toolbar .spacer { flex: 1 1 auto; }

.menu-toggle { display: none; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .main { padding: 14px; }
  .topbar { padding: 11px 14px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 25; }
}

/* ==========================================================================
   学员端
   ========================================================================== */
/* ---------- 学员端顶栏 / 首屏暖色调（橙红） ---------- */
.portal { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, #fff1e6 0%, #fff7f0 240px, var(--bg) 560px); }
.portal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; max-width: 1080px; margin: 0 auto; width: 100%; }
.portal-head .brand { display: flex; align-items: center; gap: 10px; }
.portal-head .logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #ffa15c, #ff7f4a 52%, #f0603a);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px;
  box-shadow: 0 6px 16px rgba(240, 110, 60, .3), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.portal-head .t1 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.portal-head .t2 { font-size: 11.5px; color: #b1624a; }
.portal-body { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 8px 22px 56px; }

.hero { text-align: center; padding: 26px 10px 30px; }
.hero h1 {
  font-size: 30px; letter-spacing: -.02em;
  background: linear-gradient(120deg, #d8542a, #ef7a3a 55%, #ffa94d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { margin-top: 10px; color: var(--ink-500); font-size: 14.5px; }
.hero .pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.hero .pills span {
  padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .85); border: 1px solid #ffd9c4;
  font-size: 12px; color: var(--ink-600);
  box-shadow: 0 2px 8px rgba(30, 58, 138, .07);
  backdrop-filter: blur(6px);
}

/* ---------- 学员端暖色点缀（仅 .portal 内生效，不影响管理端） ---------- */
.portal .tab:hover { color: #e04a22; }
.portal .tab.active { color: #c9301f; border-bottom-color: #ef5a2f; }
.portal .card { border-color: #f2e3da; }
.portal .mod .v { color: #d0462a; }
.portal .mod { background: linear-gradient(160deg, #fffdfb, #fff5ef); border-color: #f6e2d5; }
.portal .mod:hover { box-shadow: 0 6px 16px rgba(208, 70, 42, .12); }
.portal .latest-grid .score-tile:nth-child(4n + 1) { background: linear-gradient(135deg, #fff6f1, #ffeee4); border-color: #ffddc9; }
.portal .latest-grid .score-tile:nth-child(4n + 1) .v { color: #c9301f; }
.portal .latest-grid .score-tile:nth-child(4n + 2) { background: linear-gradient(135deg, #fff8ec, #ffefd6); border-color: #ffe0b8; }
.portal .latest-grid .score-tile:nth-child(4n + 2) .v { color: #b45309; }
.portal .latest-grid .score-tile:nth-child(4n + 3) { background: linear-gradient(135deg, #fdf1f1, #fbe3e0); border-color: #f8d2cc; }
.portal .latest-grid .score-tile:nth-child(4n + 3) .v { color: #be3a2b; }
.portal .latest-grid .score-tile:nth-child(4n + 4) { background: linear-gradient(135deg, #fff4f6, #ffe8ec); border-color: #ffd6de; }
.portal .latest-grid .score-tile:nth-child(4n + 4) .v { color: #c2415a; }
.portal .btn-primary {
  background: linear-gradient(135deg, #ff8a3d, #ef5a2f 55%, #d0342a);
  box-shadow: 0 4px 14px rgba(224, 74, 40, .34), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.portal .btn-primary:hover {
  background: linear-gradient(135deg, #ef5a2f, #c9301f);
  box-shadow: 0 6px 18px rgba(224, 74, 40, .42);
}

.query-card { max-width: 760px; margin: 0 auto; }
.query-card .card-body { padding: 22px; }
.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 12px; color: var(--ink-400); flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 6px; }
.step .n { width: 19px; height: 19px; border-radius: 50%; background: #eef1f6; color: var(--ink-500); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.step.active .n { background: var(--brand-600); color: #fff; }
.step.done .n { background: var(--ok); color: #fff; }
.step-sep { color: var(--ink-300); }

.result { max-width: 1080px; margin: 22px auto 0; animation: popIn .25s ease; }
.id-card {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 20px 24px; border-radius: var(--r-lg); color: #fff;
  background: linear-gradient(120deg, #101f52 0%, #16307d 30%, #2a58e0 72%, #3b6ef5 100%);
  box-shadow: 0 14px 34px rgba(22, 48, 125, .34), inset 0 1px 0 rgba(255, 255, 255, .14);
  position: relative; overflow: hidden;
}
.id-card::before, .id-card::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.id-card::before { width: 190px; height: 190px; right: -60px; top: -80px; background: radial-gradient(circle, rgba(140, 175, 255, .35), transparent 70%); }
.id-card::after { width: 130px; height: 130px; right: 120px; bottom: -80px; background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%); }
/* 学员端专属：身份卡改为橙红暖色（调浅版，避免顶栏过深） */
.portal .id-card {
  background: linear-gradient(120deg, #ee6a4c 0%, #f5804f 30%, #ffa05c 68%, #ffc07a 100%);
  box-shadow: 0 14px 34px rgba(240, 120, 70, .28), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.portal .id-card::before { background: radial-gradient(circle, rgba(255, 232, 190, .55), transparent 70%); }
.portal .id-card::after { background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); }
.id-card .avatar {
  width: 58px; height: 58px; flex: 0 0 58px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, .12));
  border: 1px solid rgba(255, 255, 255, .4); display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}
.id-card .nm { font-size: 21px; font-weight: 700; }
.id-card .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.id-card .meta span { padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .14); font-size: 12px; }
.id-card .spacer { flex: 1 1 auto; }
.id-card > * { position: relative; z-index: 1; }

.latest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.score-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.score-tile .k { font-size: 12px; color: var(--ink-500); font-weight: 550; }
.score-tile .v { font-size: 27px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.score-tile .v small { font-size: 12px; font-weight: 500; color: var(--ink-400); margin-left: 2px; }
.score-tile .r { margin-top: 6px; font-size: 11.5px; color: var(--ink-500); }
.tile-brand { background: linear-gradient(135deg, #fff, var(--brand-50)); border-color: var(--brand-100); }
.tile-brand .v { color: var(--brand-700); }

.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.mod {
  background: linear-gradient(160deg, #fbfdff, #f2f7ff);
  border: 1px solid #dfe9fa; border-radius: 10px; padding: 10px 12px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.mod:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(30, 58, 138, .1); }
.mod .k { font-size: 11.5px; color: var(--ink-500); }
.mod .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; color: var(--brand-700); }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 12px; }
.bar-row .nm { width: 68px; flex: 0 0 68px; color: var(--ink-600); }
.bar-row .track { flex: 1; height: 12px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.bar-row .fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); }
.bar-row .vl { width: 52px; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink-600); }

.portal-foot { padding: 22px; text-align: center; font-size: 12px; color: var(--ink-400); }

/* 打印成绩单 */
@media print {
  .no-print { display: none !important; }
  .portal { background: #fff; }
  .id-card { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card { box-shadow: none; break-inside: avoid; }
  body { font-size: 12px; }
  /* 明细表列多，打印时展开并压缩，避免被裁掉 */
  .table-wrap { overflow: visible !important; }
  table.table { font-size: 10px; }
  table.table.compact th, table.table.compact td { padding: 3px 4px; font-size: 10px; }
}

/* ==========================================================================
   登录页
   ========================================================================== */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(140deg, #dbe7fb 0%, #eef4ff 45%, #e4edfd 100%); position: relative; overflow: hidden; }
.auth-wrap::before, .auth-wrap::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.auth-wrap::before { width: 420px; height: 420px; left: -140px; top: -140px; background: radial-gradient(circle, rgba(59, 110, 245, .16), transparent 70%); }
.auth-wrap::after { width: 520px; height: 520px; right: -180px; bottom: -200px; background: radial-gradient(circle, rgba(42, 88, 224, .14), transparent 70%); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: 0 24px 64px rgba(22, 48, 125, .18); overflow: hidden; position: relative; z-index: 1; }
.auth-card .hd { padding: 26px 28px 20px; text-align: center; background: linear-gradient(150deg, #101f52, #16307d 42%, #2a58e0); color: #fff; position: relative; overflow: hidden; }
.auth-card .hd::after { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(140, 175, 255, .35), transparent 70%); pointer-events: none; }
.auth-card .hd .logo { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 12px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); display: flex; align-items: center; justify-content: center; font-size: 23px; }
.auth-card .hd h2 { font-size: 17px; }
.auth-card .hd p { margin: 5px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .8); }
.auth-card .bd { padding: 22px 28px 28px; }
.otp-row { display: flex; gap: 8px; }
.otp-row .input { flex: 1; }
.otp-row .btn { flex: 0 0 auto; min-width: 104px; }
.auth-alt { text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--ink-500); }
.notice { padding: 10px 12px; border-radius: var(--r-sm); font-size: 12.5px; line-height: 1.6; }
.notice.info { background: var(--info-bg); color: #155e75; }
.notice.warn { background: var(--warn-bg); color: #92400e; }
.notice.err { background: var(--danger-bg); color: #991b1b; }
.notice.ok { background: var(--ok-bg); color: #166534; }

/* ---------- 递进筛选行 ---------- */
.cascade { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager .pg-info { font-size: 12px; color: var(--ink-500); }
.pager .pg-btns { display: flex; gap: 6px; align-items: center; }

/* ---------- 拖拽导入区 ---------- */
.drop {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 22px;
  text-align: center; color: var(--ink-500); background: #fafcff; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.drop .t { font-size: 13.5px; font-weight: 600; color: var(--ink-700); }
.drop .s { font-size: 12px; margin-top: 3px; }

/* ---------- 分数段定位图 ---------- */
.bands { display: flex; flex-direction: column; gap: 6px; }
.band-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.band-row .lb { flex: 0 0 74px; color: var(--ink-500); text-align: right; font-size: 11.5px; }
.band-row .tr { position: relative; flex: 1; height: 20px; background: #f1f5fb; border-radius: 5px; overflow: hidden; }
.band-row .tr i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #a9c1f7, #6f95ea); border-radius: 5px; }
.band-row.me .tr i { background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); }
.band-row.me .tr { background: var(--brand-50); box-shadow: inset 0 0 0 1.5px var(--brand-200); }
.band-row .tr em { position: absolute; right: 8px; top: 0; line-height: 20px; font-style: normal; font-weight: 700; font-size: 11px; color: var(--brand-700); }
.band-row .vl { flex: 0 0 52px; color: var(--ink-500); font-size: 11.5px; }
.band-summary { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--brand-50); color: var(--brand-900); font-size: 12.5px; }
.band-summary b { font-family: var(--mono); }

/* ---------- 分数段定位 · 学员端暖橙（仅 .portal 内生效） ---------- */
.portal .band-row .tr { background: #fdf1e9; }
.portal .band-row .tr i { background: linear-gradient(90deg, #ffc08a, #f5904f); }
.portal .band-row.me .tr { background: linear-gradient(135deg, #fff5ec, #ffe9d6); box-shadow: inset 0 0 0 1.5px #ffcf9e; }
.portal .band-row.me .tr i { background: linear-gradient(90deg, #ff8a3d, #e0501f); }
.portal .band-row .tr em { color: #c2410c; }
.portal .band-summary { background: linear-gradient(135deg, #fff4ea, #ffe8d4); color: #9a3412; border: 1px solid #ffd9b8; }

/* ---------- 班级管理 · 分数段占比 ---------- */
.cm-stack { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: #f1f5fb; }
.cm-stack i { display: block; height: 100%; transition: width .2s ease; }
.cm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 11.5px; color: var(--ink-500); }
.cm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cm-legend em { display: inline-block; width: 10px; height: 10px; border-radius: 3px; font-style: normal; }
.cm-band-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.cm-band-row .lb { flex: 0 0 88px; text-align: right; color: var(--ink-500); font-size: 11.5px; }
.cm-band-row .tr { position: relative; flex: 1; height: 18px; background: #f1f5fb; border-radius: 5px; overflow: hidden; }
.cm-band-row .tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.cm-band-row .vl { flex: 0 0 62px; color: var(--ink-500); font-size: 11.5px; font-family: var(--mono); }
.cm-band-row .pc { flex: 0 0 50px; text-align: right; font-size: 11.5px; font-weight: 700; color: var(--ink-700); font-family: var(--mono); }
.cm-empty { padding: 20px 0; text-align: center; color: var(--ink-400); font-size: 12.5px; }
.cm-pick { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.cm-pick .table { font-size: 12.5px; }
.cm-pick .table td, .cm-pick .table th { padding: 7px 10px; }
@media (max-width: 720px) {
  .cm-band-row .lb { flex: 0 0 68px; font-size: 11px; }
  .cm-band-row .vl { flex: 0 0 54px; }
  .cm-band-row .pc { flex: 0 0 44px; }
}

/* ---------- 列表批量操作（学员名册勾选 / 批量删除） ---------- */
/* 悬浮操作条：固定在视口底部居中，避免被长表格顶出屏幕；仅有勾选时出现 */
.bulk-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: min(620px, calc(100vw - 32px));
  padding: 10px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-strong);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .16);
}
.bulk-bar .bulk-n { font-size: 12.5px; color: var(--brand-700); padding-left: 4px; }
.bulk-bar .bulk-n b { font-size: 14px; }
.bulk-bar .spacer { flex: 1 1 auto; }
.bulk-bar .btn { border-radius: 999px; }
.bulk-preview {
  margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fbfcff; font-size: 12.5px; line-height: 1.7; max-height: 130px; overflow: auto;
  color: var(--ink-700); word-break: break-all;
}
/* 勾选行高亮 + 表头/单元格居中工具类 + 复选框统一样式 */
.table tbody tr.picked { background: var(--brand-50); }
.table thead th.ctr, .table tbody td.ctr { text-align: center; }
.table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
@media (max-width: 720px) {
  .bulk-bar {
    flex-wrap: nowrap; gap: 8px; padding: 8px 12px;
    left: 12px; right: 12px; transform: none; max-width: none; border-radius: 14px;
  }
  .bulk-bar .bulk-n { flex: 0 0 auto; padding-left: 2px; }
  .bulk-bar .spacer { flex: 1 1 auto; }
  .bulk-bar .btn { flex: 0 0 auto; white-space: nowrap; }
}

/* ---------- 进退步标识 ---------- */
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; font-family: var(--mono); }
.delta.up { color: #166534; background: var(--ok-bg); }
.delta.down { color: #991b1b; background: var(--danger-bg); }
.delta.flat { color: var(--ink-500); background: #f1f5f9; }
.badge.gold { background: #fef3c7; color: var(--gold); }

/* ---------- 平台水印（防截图外传） ---------- */
.wm-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; display: flex; flex-wrap: wrap; align-content: flex-start; opacity: .075; }
.wm-layer span { width: 26%; padding: 34px 6px; text-align: center; font-size: 12.5px; color: #0f172a; transform: rotate(-22deg); white-space: nowrap; user-select: none; font-weight: 600; }

/* ---------- 图形验证码 ---------- */
.captcha-row { display: flex; gap: 8px; align-items: stretch; }
.captcha-row .input { flex: 1; }
.captcha-img { flex: 0 0 118px; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #f8fafc; cursor: pointer; display: block; }
.captcha-img svg { display: block; width: 100%; height: 100%; }

/* ---------- 进步追踪 ---------- */
.prog-list { display: flex; flex-direction: column; gap: 8px; }
.prog-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fbfcff; }
.prog-item .rd { flex: 0 0 132px; font-weight: 600; font-size: 13px; }
.prog-item .rd .dt { display: block; font-size: 11px; color: var(--ink-400); font-weight: 400; }
.prog-item .cells { display: flex; gap: 18px; flex-wrap: wrap; flex: 1; }
.prog-item .cell { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-600); }
.prog-item .cell b { font-family: var(--mono); color: var(--ink-900); font-size: 13px; }
.prog-item .crown { font-size: 14px; }
.pb-record { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; background: #fef3c7; color: var(--gold); font-size: 11px; font-weight: 700; }

/* ---------- 小模块雷达副卡 ---------- */
.subrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.subrid .it { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fbfcff; }
.subrid .it .k { font-size: 12px; color: var(--ink-500); }
.subrid .it .v { font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--ink-900); margin-top: 2px; }
.subrid .it .b { margin-top: 6px; height: 6px; border-radius: 4px; background: #eef2f9; overflow: hidden; }
.subrid .it .b i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); }
/* ---------- 判断推理细项诊断 · 学员端暖橙（仅 .portal 内生效） ---------- */
.portal .subrid .it { background: linear-gradient(160deg, #fffdfb, #fff4ec); border-color: #f8e0cd; }
.portal .subrid .it .v { color: #b3401c; }
.portal .subrid .it .b { background: #fdeee2; }
.portal .subrid .it .b i { background: linear-gradient(90deg, #ffa04f, #e0501f); }

@media print {
  .wm-layer { display: none; }
}

/* ---------- 多选（数据范围） ---------- */
.chk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; max-height: 168px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fbfcff; }
.chk-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 6px; border-radius: 5px; cursor: pointer; color: var(--ink-700); }
.chk-item:hover { background: var(--brand-50); }
.chk-item.on { color: var(--brand-700); font-weight: 600; }
.chk-item input { margin: 0; }
.role-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- 成绩录入：细项列 ---------- */
.table th.subcol, .table td.subcol { background: #fbf8ff; }
.table thead th.subcol { background: #f5efff; color: #6d28d9; }
/* 向尚教育学员中心明细表：判断推理分组表头 + 两行表头对齐 */
.table thead th.grp { background: #f5efff; color: #6d28d9; text-align: center; font-weight: 700; font-size: 12px; }
.table thead th[rowspan] { vertical-align: middle; }
.table td.subcol { color: #5b21b6; }
.id-card .meta b { font-weight: 700; }

/* ---------- 各科目得分：班级平均刻度 ---------- */
.bar-row .track { position: relative; }
.bar-row .avgmark { position: absolute; top: -3px; bottom: -3px; width: 3px; background: #0f172a; border-radius: 2px; z-index: 2; box-shadow: 0 0 0 1.5px #fff; }
.bar-row .cmp { flex: 0 0 66px; width: 66px; text-align: right; font-family: var(--mono); font-size: 11.5px; color: #b45309; }
.bar-row .vl { width: 84px; }
.bar-row .nm { width: 84px; flex: 0 0 84px; }
.bar-row.is-sub .nm { padding-left: 10px; font-size: 11.5px; color: var(--ink-400); }
.cmp-dot { display: inline-block; width: 3px; height: 10px; background: #0f172a; vertical-align: -1px; margin: 0 2px; border-radius: 1px; }

/* ---------- 六专项赋分：满分角标 / 合计列 / 超分提示 ---------- */
.fullhint { font-size: 10.5px; color: var(--ink-400); font-weight: 400; margin-left: 2px; }
.table th.grp .tiny { opacity: .85; }
.table th.sumcol, .table td.sumcol { background: #fff7ed; }
.table thead th.sumcol { background: #ffedd5; color: #9a3412; }
.table td.sumcol { color: #9a3412; }
.table th.readonly::after { content: '（自动）'; font-size: 10px; color: var(--ink-400); font-weight: 400; }
.input.sc-in.over-full { border-color: #dc2626 !important; background: #fef2f2; color: #b91c1c; box-shadow: 0 0 0 2px rgba(220, 38, 38, .12); }

/* ---------- 学员姓名 → 学员档案 ---------- */
.stu-link {
  border: none; background: none; padding: 0; font: inherit; font-weight: 700;
  color: var(--brand-700); cursor: pointer; border-bottom: 1px dashed var(--brand-200);
  line-height: 1.5;
}
.stu-link:hover { color: var(--brand-600); border-bottom-style: solid; }
.stu-link::after { content: '›'; margin-left: 4px; font-weight: 700; color: var(--brand-500); }

/* ---------- 学员档案信息栅格 ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px; }
.pf-item { display: flex; align-items: baseline; gap: 8px; font-size: 13px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.pf-item .k { flex: 0 0 70px; color: var(--ink-500); font-size: 12px; }
.pf-item .v { color: var(--ink-900); font-weight: 600; word-break: break-all; }

/* ---------- 表格横滑提示（仅手机显示） ---------- */
.scroll-tip { display: none; }

/* ==========================================================================
   移动端适配（手机 ≤720px / 小屏 ≤360px）
   学员端（index.html）优先；所用组件为两端共用，管理端同步受益
   ========================================================================== */

/* 触屏基础：去掉点击高亮与双击缩放延迟 */
button, a, .tab, .nav-item, .chk-item, label, .captcha-img, .stu-link { touch-action: manipulation; }
button, a, input, select, textarea, .captcha-img { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* 刘海屏 / 底部横条安全区（viewport-fit=cover 时生效） */
.portal {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.portal-head { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
.portal-foot { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }

/* 横向滚动容器：惯性滑动 + 不把滚动传给页面 */
.table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

@media (max-width: 900px) {
  .portal-head { padding-left: 16px; padding-right: 16px; }
  .portal-body { padding: 6px 16px 48px; }
  .main { padding: 14px 12px 40px; }
}

@media (max-width: 720px) {
  /* ---------------- 学员端外框 ---------------- */
  .portal-head { padding: 10px 14px; gap: 8px; }
  .portal-head .brand { gap: 8px; min-width: 0; }
  .portal-head .logo { width: 34px; height: 34px; border-radius: 9px; font-size: 17px; }
  .portal-head .t1 { font-size: 15px; }
  .portal-head .t2 { font-size: 10.5px; }
  .portal-body { padding: 4px 12px 40px; }
  .portal-foot { padding: 18px 14px; font-size: 11.5px; line-height: 1.7; }

  .hero { padding: 14px 2px 18px; }
  .hero h1 { font-size: 21px; }
  .hero .lead { font-size: 13px; margin-top: 8px; }
  .hero .pills { gap: 6px; margin-top: 12px; }
  .hero .pills span { padding: 3px 10px; font-size: 11.5px; }

  /* ---------------- 卡片 ---------------- */
  .card { border-radius: 12px; }
  .card-head { padding: 12px 13px; gap: 8px; }
  .card-head h3 { font-size: 14px; }
  .card-head .sub { font-size: 11.5px; }
  .card-body { padding: 13px; }
  .query-card .card-body { padding: 16px 14px; }
  .query-card { max-width: none; }
  .tfoot-note { padding: 10px 13px; font-size: 11.5px; line-height: 1.75; }

  /* ---------------- 表单：16px 防 iOS 聚焦自动放大，加大触摸高度 ---------------- */
  .input, .select, .textarea { font-size: 16px; padding: 9px 11px; }
  .field { margin-bottom: 12px; }
  .field > label { font-size: 12.5px; margin-bottom: 4px; }
  .field .hint { font-size: 11px; }
  .btn { padding: 9px 15px; font-size: 13.5px; min-height: 38px; }
  .btn-sm { padding: 6px 11px; font-size: 12.5px; min-height: 32px; }
  .btn-lg { padding: 12px 20px; font-size: 15px; min-height: 46px; }
  .tab { padding: 10px 14px; font-size: 13px; }
  .notice { font-size: 12px; padding: 9px 11px; }
  .err-msg { font-size: 11.5px; }
  .steps { font-size: 11.5px; gap: 4px; margin-bottom: 14px; }

  /* ---------------- 身份卡 ---------------- */
  .id-card { padding: 15px; gap: 12px; border-radius: 14px; align-items: flex-start; }
  .id-card .avatar { width: 46px; height: 46px; flex: 0 0 46px; font-size: 19px; }
  .id-card .nm { font-size: 18px; line-height: 1.35; }
  .id-card .meta { gap: 6px; margin-top: 5px; }
  .id-card .meta span { font-size: 11.5px; padding: 2px 8px; }
  .id-card .spacer { display: none; }
  .id-card > .no-print { width: 100%; }
  .id-card > .no-print .btn { flex: 1 1 calc(50% - 4px); }

  /* ---------------- 最近一次成绩：指标卡 ---------------- */
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
  .latest-grid .score-tile.tile-brand { grid-column: 1 / -1; }
  .score-tile { padding: 12px 13px; }
  .score-tile .k { font-size: 11.5px; }
  .score-tile .v { font-size: 23px; }
  .score-tile .r { font-size: 11px; }

  /* ---------------- 各科目得分：固定宽度在手机上会挤爆轨道，改为「名称+分值 / 进度条 / 得分率」三行 ---------------- */
  .bar-row { flex-wrap: wrap; gap: 4px 8px; margin-bottom: 11px; align-items: center; }
  .bar-row .nm { flex: 1 1 auto; width: auto; min-width: 76px; font-size: 12px; }
  .bar-row .vl { order: 2; flex: 0 0 auto; width: auto; font-size: 11.5px; }
  .bar-row .track { order: 3; flex: 0 0 100%; height: 10px; }
  .bar-row .cmp { order: 4; flex: 0 0 auto; width: auto; font-size: 11px; }
  .bar-row.is-sub .nm { padding-left: 0; font-size: 11.5px; color: var(--ink-500); }
  .bar-row.is-sub .nm::before { content: '└ '; color: var(--ink-300); }

  /* ---------------- 学籍档案：两列、标签在上，长字段不再被挤 ---------------- */
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .pf-item { flex-direction: column; align-items: flex-start; gap: 0; padding-bottom: 5px; }
  .pf-item .k { flex: none; font-size: 11px; }
  .pf-item .v { font-size: 13px; line-height: 1.45; }

  /* ---------------- 判断推理细项 / 分数段 ---------------- */
  .subrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .subrid .it { padding: 9px 10px; }
  .subrid .it .v { font-size: 15px; }
  .band-row { gap: 7px; }
  .band-row .lb { flex: 0 0 60px; font-size: 11px; }
  .band-row .vl { flex: 0 0 42px; font-size: 11px; }
  .band-row .tr em { right: 5px; font-size: 10px; }
  .band-summary { font-size: 12px; }

  /* ---------------- 进步追踪 ---------------- */
  .prog-list { gap: 8px; }
  .prog-item { flex-wrap: wrap; gap: 6px 10px; padding: 10px 11px; }
  .prog-item .rd { flex: 1 1 100%; font-size: 13px; }
  .prog-item .cells { flex: 1 1 140px; gap: 6px 12px; }
  .prog-item .cell { font-size: 11.5px; }
  .prog-item .cell b { font-size: 12.5px; }

  /* ---------------- 明细表：横向滚动 + 首列吸附，扫行不迷路 ---------------- */
  table.table { font-size: 12px; }
  table.table th, table.table td { padding: 7px 9px; }
  table.table.compact th, table.table.compact td { padding: 6px 8px; font-size: 11.5px; }
  table.table thead tr:first-child > th:first-child,
  table.table tbody tr > td:first-child {
    position: sticky; left: 0; z-index: 3;
    background: #fff;
    box-shadow: 1px 0 0 var(--line);
  }
  table.table thead tr:first-child > th:first-child { z-index: 6; background: #f7f9fd; }
  .scroll-tip { display: block; padding: 7px 13px 0; }

  /* ---------------- 模态框：手机改为底部抽屉 ---------------- */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal, .modal.wide, .modal.xwide {
    width: 100%; max-width: none; max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }
  .modal-head { padding: 14px 16px; }
  .modal-head h3 { font-size: 15px; }
  .modal-body { padding: 14px; }
  .modal-foot { padding: 12px 14px; border-radius: 0; }
  .modal-foot .btn { flex: 1 1 auto; }
  .toast { font-size: 12.5px; padding: 8px 14px; }

  /* ---------------- 图表：按容器宽度等比缩放（原固定高度会在窄屏留白/裁切） ---------------- */
  .card-body > svg { width: 100%; height: auto; }

  /* ---------------- 防截图水印：窄屏两列，避免长文案在窄格里互相压字 ---------------- */
  .wm-layer span { width: 50%; padding: 30px 4px; font-size: 11px; }

  /* ---------------- 管理端 ---------------- */
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar h2 { font-size: 15.5px; }
  .toolbar { gap: 8px; margin-bottom: 12px; }
  .toolbar .input, .toolbar .select { min-width: 0; flex: 1 1 132px; }
  .pager { padding: 10px 13px; }
  .stat { padding: 13px 14px; }
  .stat .v { font-size: 23px; }
}

/* 超小屏（≤360px，如 iPhone SE 竖屏） */
@media (max-width: 360px) {
  .portal-body { padding: 4px 10px 36px; }
  .id-card { padding: 13px; gap: 10px; }
  .id-card .avatar { width: 40px; height: 40px; flex: 0 0 40px; font-size: 17px; }
  .id-card .nm { font-size: 16.5px; }
  .latest-grid { grid-template-columns: 1fr; }
  .latest-grid .score-tile.tile-brand { grid-column: auto; }
  .pf-grid { grid-template-columns: 1fr; }
  .subrid { grid-template-columns: 1fr; }
  .otp-row { flex-wrap: wrap; }
  .otp-row .btn { flex: 1 1 100%; min-width: 0; }
  .captcha-row { flex-wrap: wrap; }
  .captcha-row .captcha-img { flex: 1 1 100%; height: 44px; }
  .bar-row .nm { min-width: 64px; }
}

/* 小屏横屏（高度受限）：压缩纵向留白 */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 480px) {
  .hero { padding: 8px 2px 10px; }
  .hero h1 { font-size: 18px; }
  .modal { max-height: 96vh; }
}

/* 打印：吸附列还原为普通单元格，避免打印时错位 */
@media print {
  table.table thead tr:first-child > th:first-child,
  table.table tbody tr > td:first-child {
    position: static; box-shadow: none; background: transparent;
  }
  .scroll-tip { display: none !important; }
}

/* ==========================================================================
   考勤管理
   —— 场次页签 / 状态胶囊 / 批量条 / 汇总表
   ========================================================================== */

/* 顶部工具栏：可换行，避免小屏挤压 */
.at-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.at-bar .field { margin-bottom: 0; }
.at-daybtns { display: flex; gap: 6px; }
.at-grow { flex: 1 1 auto; }
.at-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-600); cursor: pointer; user-select: none; }
.at-chk input { width: 15px; height: 15px; accent-color: var(--brand); margin: 0; }

/* ---------------- 场次页签：带「已标记 / 总人数」，一眼看出哪场没点名 ---------------- */
.at-sess { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; }
.at-sess-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--ink-700); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .16s ease; font-family: inherit;
}
.at-sess-item:hover { border-color: var(--brand-500); color: var(--brand-700); }
.at-sess-item .ct { font-family: var(--mono); font-size: 11.5px; color: var(--ink-400); font-weight: 600; }
.at-sess-item .ok { color: var(--ok); font-size: 12px; }
.at-sess-item.on { background: var(--brand-500); border-color: var(--brand-500); color: #fff; box-shadow: 0 2px 8px rgba(59, 110, 245, .28); }
.at-sess-item.on .ct { color: rgba(255, 255, 255, .82); }
.at-sess-item.on .ok { color: #d9ffe6; }
.at-sess-item.done:not(.on) { border-color: #b7e4c7; background: var(--ok-bg); color: #15803d; }

/* ---------------- 覆盖度统计条 ---------------- */
.at-stats { margin-bottom: 12px; }
.at-chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.at-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px; font-size: 12px;
  background: #f2f6fd; color: var(--ink-600); border: 1px solid var(--line);
}
.at-chip b { font-family: var(--mono); font-size: 13px; color: var(--c, var(--ink-900)); }
.at-chip.muted { color: var(--ink-400); }
.at-chip.muted b { color: var(--ink-500); }

/* ---------------- 批量设置条 ---------------- */
.at-bulk {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; margin: 2px 0 4px;
  border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: #fbfcff;
}
.at-bulk-lb { font-size: 12.5px; color: var(--ink-500); }
.at-bulk .btn { border-radius: 999px; }

/* ---------------- 状态胶囊（单选组） ---------------- */
.at-seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.at-pill {
  padding: 5px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-600);
  cursor: pointer; transition: all .14s ease; font-family: inherit; line-height: 1.5;
}
.at-pill:hover { border-color: var(--brand-500); color: var(--brand-700); }
.at-pill.on { color: #fff; border-color: transparent; box-shadow: 0 1px 5px rgba(15, 23, 42, .16); }
.at-pill.t-ok.on { background: var(--ok); }
.at-pill.t-warn.on { background: var(--warn); }
.at-pill.t-info.on { background: var(--info); }
.at-pill.t-err.on { background: var(--danger); }
.at-pill.on:hover { color: #fff; }

/* 已标记的行加一条左侧色带，扫一眼就知道谁还没点 */
.table tbody tr.at-marked > td:first-child { box-shadow: inset 3px 0 0 var(--brand-500); }
.at-remark { min-width: 130px; padding: 6px 9px; font-size: 12.5px; }
.at-remark::placeholder { color: var(--ink-300); }

/* 明细弹窗里的状态标签 */
.at-tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.at-tag.t-ok { background: var(--ok-bg); color: #15803d; }
.at-tag.t-warn { background: var(--warn-bg); color: #92400e; }
.at-tag.t-info { background: var(--info-bg); color: #155e75; }
.at-tag.t-err { background: var(--danger-bg); color: #991b1b; }

/* ---------------- 出勤率条 ---------------- */
.at-rate {
  display: inline-block; vertical-align: middle; width: 74px; height: 8px;
  border-radius: 999px; background: #eef2f9; overflow: hidden; margin-right: 8px;
}
.at-rate i { display: block; height: 100%; border-radius: 999px; transition: width .2s ease; }
.at-rate-v { font-size: 12px; font-weight: 700; }

/* ==========================================================================
   请假申请 / 请假审批
   —— 学员端弹窗里的场次选择（大点按区，窄屏友好）与审批页的锁定标识
   ========================================================================== */
.lv-sess { display: flex; gap: 10px; flex-wrap: wrap; }
.lv-sess-item {
  flex: 1 1 0; min-width: 92px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--ink-700); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .16s ease; font-family: inherit;
}
.lv-sess-item:hover { border-color: var(--brand-500); color: var(--brand-700); }
.lv-sess-item.on {
  background: var(--brand-500); border-color: var(--brand-500); color: #fff;
  box-shadow: 0 2px 8px rgba(59, 110, 245, .28);
}
.lv-sess-item.on::before { content: '✓'; font-size: 12px; }

/* 审批表的行状态：待审批高亮，已通过加左侧色条 */
.lv-row-pending { background: #fffbf0; }
.lv-row-approved td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.lv-lock {
  display: inline-block; margin-left: 6px; font-size: 11px; color: var(--warn);
  background: var(--warn-bg); border-radius: 999px; padding: 1px 7px; vertical-align: middle;
}
.lv-reason { max-width: 260px; white-space: normal; word-break: break-word; }

/* ---- 手机号单元格：默认脱敏（138****0001），点👁或悬停才看完整号 ----
   表格里手机号一多，完整号码既占宽度又容易被旁边的人一眼看走；
   这里「默认隐藏中间 4 位」+ 完整号只在 title/复制时给出。
   搜索走的是原始数据字段，与这里展示什么无关。 */
.pf-phone { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pf-phone.open { font-weight: 600; }
/* 服务端已脱敏（非超管）：只读展示，没有 👁 —— 鼠标给个「不可展开」的暗示 */
.pf-phone.locked { cursor: not-allowed; color: var(--ink-500); }
.pf-eye {
  border: 0; background: transparent; padding: 0 2px; margin: 0;
  font-size: 11px; line-height: 1; cursor: pointer; opacity: .38;
  color: inherit; border-radius: 4px;
}
.pf-eye:hover, .pf-eye:focus { opacity: .95; background: rgba(0, 0, 0, .06); }
@media print { .pf-eye { display: none; } }

/* ---- 按天合并后的「场次」单元格：每个场次一个状态小标签 ----
   颜色 = 该场次自己的状态，右侧记号（… ✓ ✕ –）保证不依赖颜色也能读。
   一天三个场次在窄列里允许换行，避免把表格撑出横向滚动条。 */
.lv-sess-cell { white-space: normal; }
.lv-pill {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; margin: 1px 4px 1px 0; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 18px; white-space: nowrap;
  background: #eef1f6; color: var(--ink-500);
}
.lv-pill i { font-style: normal; font-size: 10px; line-height: 1; opacity: .92; }
.lv-pill.ok { background: var(--ok-bg); color: var(--ok); }
.lv-pill.warn { background: var(--warn-bg); color: var(--warn); }
.lv-pill.danger { background: var(--danger-bg); color: var(--danger); }
.lv-pill.info { background: var(--info-bg); color: var(--info); }
.lv-pill.gray { background: #eef1f6; color: var(--ink-400); }
/* 同一天多个场次的当前状态摘要（审批页勾选后提示用） */
.lv-day-sess { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* 场次页签上的「待批 N」：提醒老师先审批再点名 */
.at-sess-item .at-wait {
  font-size: 11px; font-weight: 700; color: #b45309;
  background: var(--warn-bg); border-radius: 999px; padding: 1px 7px;
}
.at-sess-item.on .at-wait { background: rgba(255, 255, 255, .22); color: #fff; }

@media (max-width: 720px) {
  .lv-sess { gap: 8px; }
  .lv-sess-item { min-width: 80px; padding: 11px 8px; }
  .lv-reason { max-width: none; }
  .lv-pill { font-size: 11px; padding: 1px 6px; margin-right: 3px; }
}

@media (max-width: 720px) {
  .at-bar { gap: 8px; }
  .at-bar .field, .at-bar .input, .at-bar .select { flex: 1 1 100%; width: 100% !important; }
  .at-daybtns { flex: 1 1 100%; }
  .at-daybtns .btn { flex: 1; }
  .at-grow { display: none; }
  .at-sess { gap: 6px; }
  .at-sess-item { flex: 1 1 0; justify-content: center; padding: 9px 8px; }
  .at-bulk { gap: 6px; }
  .at-bulk-lb { flex: 1 1 100%; }
  .at-bulk .btn { flex: 1 1 calc(50% - 6px); }
  .at-chip-row { gap: 6px; }
  .at-chip { padding: 4px 9px; font-size: 11.5px; }
  /* 触摸目标放大，避免误点 */
  .at-pill { padding: 8px 14px; font-size: 13px; }
  .at-seg { gap: 6px; }
  .at-rate { width: 54px; }
}

@media (max-width: 360px) {
  .at-pill { padding: 7px 11px; font-size: 12.5px; }
  .at-sess-item { padding: 8px 6px; font-size: 12.5px; }
}
