/* ============================================================
   鹏程体育管理端 · 统一样式系统（方案 A：shadcn/ui 浅色范式）
   文件：static/css/ui.css ｜ 零 CDN ｜ 全站唯一样式入口
   规则：页面内禁止写死颜色/圆角/间距，一律引用下方令牌与组件类。
   换肤：只改 :root 一组变量即可全站变色（用户后期可调色）。
   ============================================================ */

/* ---------- 1. 设计令牌（换肤只改这里） ---------- */
:root {
  /* 色板 */
  --bg: #f6f7fb;                 /* 页面背景（浅灰） */
  --card: #ffffff;               /* 卡片背景 */
  --border: #e4e6ef;             /* 1px 细边框 */
  --border-strong: #d4d7e3;      /* 强调边框（hover） */
  --text: #14152b;               /* 主文本 */
  --muted: #8c8fa8;              /* 次要文本 */
  --primary: #2563eb;            /* 主色（唯一强调色） */
  --primary-hover: #1d4ed8;      /* 主色 hover */
  --primary-weak: rgba(37, 99, 235, 0.08);  /* 激活/弱化底色 */
  --primary-weak-2: rgba(37, 99, 235, 0.05);
  /* 品牌渐变（顶栏"鹏程体育"立体字，2026-09-16 第 27 次；换色只改这两处） */
  --brand-a: #3b82f6;   /* 渐变浅端 */
  --brand-b: #1e3a8a;   /* 渐变深端 */
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --danger-weak: rgba(220, 38, 38, 0.08);

  /* 布局 */
  --sidebar-w: 240px;
  --sidebar-w-mini: 64px;
  --topbar-h: 56px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(20, 21, 43, 0.04), 0 1px 3px rgba(20, 21, 43, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 21, 43, 0.08);

  /* 字体 */
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --fs-title: 16px;
  --fs-body: 14px;
  --fs-sm: 12px;
  --fs-xs: 11px;
}

/* ---------- 2. 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 3. 应用骨架（侧边栏 + 主区） ---------- */
.app { display: flex; min-height: 100vh; }

/* --- 侧边栏 --- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;   /* iOS 地址栏适配 */
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease, margin-left 0.2s ease;
  overflow: hidden;
  z-index: 40;
}
.sidebar .logo {
  display: flex; align-items: center; gap: 10px;
  height: var(--topbar-h);
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  white-space: nowrap;
}
.sidebar .logo .mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.sidebar .logo .name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; }
.sidebar .logo .sub { font-size: var(--fs-xs); color: var(--muted); display: block; }

.sidebar nav { flex: 1; overflow-y: auto; padding: 8px 8px 16px; scrollbar-width: thin; }
.sidebar .grp { margin-top: 12px; }
.sidebar .grp:first-child { margin-top: 4px; }
.sidebar .grp-label {
  font-size: var(--fs-xs); color: var(--muted);
  padding: 6px 12px 4px; text-transform: uppercase; letter-spacing: 0.4px;
  white-space: nowrap;
}
.sidebar .nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin: 1px 0;
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 13.5px;
  white-space: nowrap; cursor: pointer;
  border-left: 3px solid transparent;
}
.sidebar .nav-item:hover { background: var(--primary-weak-2); text-decoration: none; color: var(--text); }
.sidebar .nav-item.active {
  background: var(--primary-weak);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}
.sidebar .nav-item .ic { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.sidebar .user-mini {
  border-top: 1px solid var(--border);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; white-space: nowrap;
}
.sidebar .user-mini .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.sidebar .user-mini .u-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sidebar .user-mini .u-role { font-size: var(--fs-xs); color: var(--muted); }

/* 侧边栏折叠态（仅桌面） */
.sidebar.mini { width: var(--sidebar-w-mini); }
.sidebar.mini .logo { padding: 0 10px; justify-content: center; }
.sidebar.mini .logo .name, .sidebar.mini .logo .sub,
.sidebar.mini .grp-label, .sidebar.mini .nav-item .txt,
.sidebar.mini .user-mini .u-name, .sidebar.mini .user-mini .u-role {
  display: none;
}
.sidebar.mini .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.mini .user-mini { justify-content: center; padding: 12px 8px; }

/* --- 主区 --- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 30;
}
.topbar .menu-btn {
  display: none;  /* 移动端显示 */
  width: 40px; height: 40px; border: none; background: transparent;
  border-radius: var(--radius-sm); font-size: 18px; cursor: pointer; color: var(--text);
}
.topbar .menu-btn:hover { background: var(--primary-weak-2); }
.topbar .crumb { font-size: 11px; color: var(--muted); flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 400; letter-spacing: 0.2px; }
.topbar .crumb b { color: var(--muted); font-weight: 400; }
/* PageHeader 范式（第 28 次）：页面大标题 + 淡化面包屑（Ant Design 标准） */
.topbar .page-head { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.topbar .page-head .crumb { color: var(--muted); }
.topbar .page-head .ptitle { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: 1px; line-height: 1.2; }
/* 品牌名（dashboard"鹏程体育"）：几何徽章 + 纯色粗体（第 28 次，去渐变浮雕防廉价） */
.topbar .crumb.brand {
  display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
  font-size: 19px; font-weight: 800; letter-spacing: 2px; color: var(--brand-b);
}
.topbar .crumb.brand svg { flex-shrink: 0; }
.topbar .who { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.topbar .who a { cursor: pointer; color: var(--primary); }

.content { padding: 20px; flex: 1; }

/* --- 移动端抽屉（<1024px） --- */
.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(20, 21, 43, 0.4); z-index: 45;
}
.overlay.show { display: block; }
/* 抽屉打开时禁止背景滚动（渐进增强，不支持 :has 的浏览器仅不锁滚动） */
body:has(.sidebar.open-mobile) { overflow: hidden; }
.sidebar.open-mobile { margin-left: 0 !important; }

/* ---------- 4. 卡片与统计卡 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}
.card + .card, .grid > .card { margin-top: 0; }
.card .card-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 8px;
}
.card .card-h h3 { font-size: 14px; font-weight: 600; color: var(--text); }
.card .card-h .hint { font-size: var(--fs-xs); color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 16px;
}
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 16px; }
.stat .lab { font-size: var(--fs-sm); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .val { font-size: 24px; font-weight: 700; color: var(--text); margin-top: 6px; line-height: 1.2; }
.stat .val .unit { font-size: var(--fs-sm); color: var(--muted); font-weight: 400; margin-left: 2px; }
.stat .sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.stat .val.warn { color: var(--warning); }
.stat .val.danger { color: var(--danger); }
.stat .val.good { color: var(--success); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer;
  background: transparent; color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  min-height: 36px; user-select: none; white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.secondary { background: var(--card); border-color: var(--border-strong); color: var(--text); }
.btn.secondary:hover { background: var(--primary-weak-2); border-color: var(--primary); color: var(--primary); }
.btn.ghost { color: var(--muted); }
.btn.ghost:hover { background: var(--primary-weak-2); color: var(--text); }
.btn.danger { background: var(--danger-weak); color: var(--danger); }
.btn.danger:hover { background: rgba(220, 38, 38, 0.14); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; min-height: 30px; }
.btn.block { width: 100%; }

/* ---------- 6. 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.tbl th {
  text-align: left; padding: 10px 14px; font-size: var(--fs-sm); font-weight: 600;
  color: var(--muted); background: #fafbfe; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--primary-weak-2); }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .ops { white-space: nowrap; }
.tbl .ops .btn { margin-right: 6px; }
.tbl .ops .btn:last-child { margin-right: 0; }
.tbl .empty-td { text-align: center; color: var(--muted); padding: 28px 0; }
.tbl .ops { white-space: nowrap; }
.tbl .ops a { color: var(--primary); text-decoration: none; margin-right: 8px; cursor: pointer; font-size: 13px; }
.tbl .ops a:hover { text-decoration: underline; }
.tbl .ops a.del { color: var(--danger); }
.tbl .readonly { color: var(--muted); font-size: 12px; }

/* ---------- 7. 徽章 / 状态 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 500; line-height: 1.6;
  background: var(--primary-weak); color: var(--primary);
}
.badge.green { background: rgba(22, 163, 74, 0.1); color: var(--success); }
.badge.amber { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.badge.red { background: var(--danger-weak); color: var(--danger); }
.badge.gray { background: #f1f2f7; color: var(--muted); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- 8. 表单 ---------- */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: var(--text); font-weight: 500; margin-bottom: 6px; }
.form-item label .req { color: var(--danger); margin-left: 2px; }
.form-item .hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 14px;
}
.form-grid label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.form-grid label .req { color: var(--danger); }
.form-grid textarea { grid-column: 1 / -1; min-height: 56px; }
.dow-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.dow { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; color: var(--text); cursor: pointer; }
.dow input { margin: 0; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--text); background: var(--card);
  outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 36px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-weak);
}
textarea { min-height: 72px; resize: vertical; }
select { appearance: auto; }

/* 工具条（列表页顶部搜索/操作区） */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }
.toolbar .search {
  position: relative; min-width: 220px; flex: 1 1 220px; max-width: 340px;
}
.toolbar .search input {
  padding-left: 38px; height: 44px; font-size: 14px;
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.toolbar .search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); outline: none; }
/* 放大镜（CSS 自绘，零 emoji） */
.toolbar .search::before {
  content: ""; position: absolute; left: 13px; top: 50%; transform: translateY(-52%);
  width: 13px; height: 13px; border: 2px solid var(--muted); border-radius: 50%;
  pointer-events: none; box-sizing: border-box;
}
.toolbar .search::after {
  content: ""; position: absolute; left: 24px; top: 50%;
  width: 7px; height: 2px; background: var(--muted); border-radius: 1px;
  transform: translateY(-50%) rotate(45deg); transform-origin: left center;
  pointer-events: none;
}
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-row select { width: auto; min-width: 120px; }

/* ---------- 9. 弹窗（Modal） ---------- */
.modal-mask {
  display: none; position: fixed; inset: 0; background: rgba(20, 21, 43, 0.4);
  z-index: 100; align-items: flex-start; justify-content: center; padding: 48px 16px 24px; overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-md);
  width: 100%; max-width: 480px; padding: 20px;
  animation: modal-in 0.18s ease;
}
.modal.wide { max-width: 640px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.modal .m-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal .m-h h3 { font-size: 15px; font-weight: 600; }
.modal .m-close { border: none; background: transparent; font-size: 18px; cursor: pointer; color: var(--muted); width: 32px; height: 32px; border-radius: 6px; }
.modal .m-close:hover { background: var(--primary-weak-2); color: var(--text); }
.modal .m-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- 10. 空态 / 提示 ---------- */
.empty { text-align: center; color: var(--muted); padding: 32px 0; font-size: 13.5px; }
.tip { font-size: var(--fs-xs); color: var(--muted); margin-top: 8px; }

/* ---------- 11. 登录页（第 29 次：纯星空登录 + 登录后品牌过渡动画） ---------- */
.login-body {
  min-height: 100vh; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background:
    radial-gradient(1200px 800px at 72% -12%, #1e3a8a, transparent 60%),
    radial-gradient(900px 620px at -12% 112%, #12306e, transparent 55%),
    #0b1026;
}
#starCanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.login-wrap {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  display: flex; align-items: center; justify-content: center;
}
/* 毛玻璃登录卡（纯星空背景 + 居中卡片） */
.login-card {
  width: 100%; max-width: 400px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  padding: 34px 30px 26px;
}
.login-card .logo { text-align: center; margin-bottom: 24px; }
.login-card .logo .mark {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b)); color: #fff;
  font-size: 23px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; box-shadow: 0 6px 18px rgba(30, 58, 138, 0.35);
}
.login-card .logo h1 { font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: 1px; }
.login-card .logo p { font-size: var(--fs-sm); color: var(--muted); margin-top: 6px; letter-spacing: 1px; }
.login-card .err { color: var(--danger); font-size: 13px; margin-top: 12px; text-align: center; min-height: 18px; }

/* ---- 登录成功后的品牌过渡动画（第 30 次：方案 A，GSAP 电影级开场，约 2.5s；点击可跳过）
   编排：深空渐显 → 白光横扫 → 左右幕布拉开 → 徽章弹入＋逐字入场 → 定格 → 闪白淡出 → 跳转 ---- */
.transit-overlay {
  position: fixed; inset: 0; z-index: 999; cursor: pointer; overflow: hidden;
  background:
    radial-gradient(1200px 800px at 72% -12%, #1e3a8a, transparent 60%),
    radial-gradient(900px 620px at -12% 112%, #12306e, transparent 55%),
    #0b1026;
  visibility: hidden; opacity: 0;   /* GSAP autoAlpha 控制 */
}
/* 内容层（z1）：徽章 + 欢迎文字 */
.transit-body {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
}
.transit-body .badge { filter: drop-shadow(0 0 22px rgba(59, 130, 246, 0.5)); }
.transit-body .welcome {
  font-size: 34px; font-weight: 800; color: #fff; letter-spacing: 8px; text-indent: 8px;
  text-shadow: 0 0 24px rgba(126, 162, 255, 0.55), 0 0 80px rgba(59, 130, 246, 0.35);
}
/* 左右幕布（z2，纯黑，向两侧拉开） */
.transit-left, .transit-right {
  position: absolute; top: 0; bottom: 0; width: 50%; z-index: 2; background: #03040a;
}
.transit-left { left: 0; }
.transit-right { right: 0; }
/* 白光横扫（z3，激光感） */
.transit-light {
  position: absolute; top: 0; bottom: 0; width: 110px; z-index: 3; left: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  filter: blur(4px); pointer-events: none;
}
/* 闪白层（z4，末尾"一晃"） */
.transit-flash {
  position: absolute; inset: 0; z-index: 4; background: #fff;
  opacity: 0; pointer-events: none;
}

/* ---------- 12. 分页 / 其他 ---------- */
.pager { display: flex; align-items: center; gap: 8px; margin-top: 14px; justify-content: flex-end; font-size: 13px; color: var(--muted); }
.pager .btn { min-height: 30px; }

/* 批量点名工具栏（P0-4，2026-09-16） */
.batch-bar { display: flex; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap; }
.batch-bar .btn { flex: 1 1 110px; min-height: 44px; font-size: 14px; }

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1024px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    margin-left: calc(var(--sidebar-w) * -1);
  }
  .sidebar.mini { width: var(--sidebar-w); margin-left: calc(var(--sidebar-w) * -1); }
  .topbar .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .content { padding: 16px 14px; }
}
@media (max-width: 640px) {
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .content { padding: 12px 10px; }
  .topbar { padding: 0 12px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; }
  .stat .val { font-size: 20px; }
  .toolbar .search { max-width: none; }
  .modal-mask { padding: 16px 10px; }
  .modal { padding: 16px; }
}

/* ---------- 14. 页面特定组件（批次 3 起统一收纳） ---------- */
/* 体测/详情页：指标文本 */
.metric { color: var(--muted); font-size: 13px; }
/* 体测：项目成绩 tag 行 */
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px;
  background: var(--primary-weak); color: var(--primary); margin: 1px 2px 1px 0;
}
/* 体测：动态项目行 */
.items-box { margin-top: 12px; }
.items-box label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.item-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.item-row input { flex: 1; min-width: 0; }
.item-row .btn { flex-shrink: 0; }
/* 体测：趋势工具条与画布 */
.trend-tool {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.trend-tool .lab { font-size: 13px; color: var(--text); }
.trend-tool select { width: auto; min-width: 140px; }
.trend-tool .hint { font-size: var(--fs-xs); color: var(--muted); }
#trendBox { padding: 10px 14px 6px; }
#trendBox .note { color: var(--muted); font-size: 13px; padding: 10px 0; }

/* 排课：周视图 */
.week-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.week-toolbar .week-label { font-size: 15px; font-weight: 600; color: var(--text); min-width: 170px; text-align: center; }
.weekgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.daycol {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); min-height: 200px; min-width: 0;
}
.dayhead {
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--muted); text-align: center;
}
.dayhead.today { color: var(--primary); font-weight: 600; }
.daybody { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.lcard {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px;
  font-size: 12px; background: var(--primary-weak-2); min-width: 0;
}
.lcard .time { font-weight: 600; color: var(--primary); }
.lcard .cls { color: var(--text); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard .meta { color: var(--muted); margin-top: 2px; }
.lcard .ops { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.lcard .ops a { color: var(--primary); text-decoration: none; cursor: pointer; font-size: 12px; }
.lcard .ops a.del { color: var(--danger); }
.lcard.canceled { opacity: 0.55; }
.lcard .tag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; margin-left: 4px; }
.lcard .tag.已上 { background: rgba(22, 163, 74, 0.1); color: var(--success); }
.lcard .tag.取消 { background: var(--danger-weak); color: var(--danger); }
.lcard .tag.补课 { background: rgba(245, 158, 11, 0.12); color: #b45309; }
@media (max-width: 900px) { .weekgrid { grid-template-columns: 1fr; } }

/* 点名：课程信息卡与学员卡片流 */
.info-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 16px; margin-bottom: 12px; }
.info-card .back { color: var(--primary); text-decoration: none; font-size: 13px; }
.info-card .back:hover { text-decoration: underline; }
.lesson-info { font-size: 14px; line-height: 1.7; color: var(--text); }
.lesson-info .date { font-size: 17px; font-weight: 600; }
.lesson-info .meta { color: var(--muted); font-size: 13px; }
.list-title { font-size: 14px; font-weight: 600; margin: 14px 2px 8px; color: var(--text); }
.stu {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px; box-shadow: var(--shadow-sm);
}
.stu .name { font-size: 15px; font-weight: 600; min-width: 70px; color: var(--text); }
.stu .info { font-size: 12px; color: var(--muted); flex: 1; min-width: 0; }
.stu .rem { font-size: 12px; color: var(--primary); white-space: nowrap; }
.stu .rem.warn { color: var(--danger); font-weight: 600; }
.stu .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.stu .btns button {
  border: 1px solid var(--border-strong); background: var(--card); color: var(--text);
  padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; cursor: pointer; white-space: nowrap; min-height: 36px;
}
.stu .btns button.on-出勤 { background: rgba(22, 163, 74, 0.1); border-color: #66bb6a; color: var(--success); font-weight: 600; }
.stu .btns button.on-请假 { background: rgba(245, 158, 11, 0.12); border-color: #ffb74d; color: #b45309; font-weight: 600; }
.stu .btns button.on-缺勤 { background: var(--danger-weak); border-color: #ef9a9a; color: var(--danger); font-weight: 600; }
.done { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: #f1f2f7; color: var(--muted); }
.att-tip { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }

/* Tab 页签 */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button {
  padding: 8px 18px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text); font-size: 14px; cursor: pointer; min-height: 36px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tabs button:hover { background: var(--primary-weak-2); }
.tabs button.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }
/* 汇总行 */
.sum { font-size: 13px; color: var(--muted); margin: 10px 2px; }
.sum b { color: var(--primary); font-size: 16px; }
.sum b.danger { color: var(--danger); }
/* 结算预览卡 */
.sal-preview { padding: 14px 16px; margin-bottom: 14px; font-size: 14px; color: var(--text); display: none; }
.sal-preview b { color: var(--primary); }
/* 日志动作徽章 */
.act { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #f1f2f7; color: var(--text); font-size: 12px; }
.act.del { background: var(--danger-weak); color: var(--danger); }
.act.create { background: rgba(22, 163, 74, 0.1); color: var(--success); }
td.detail { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   15. 批次 5 · 移动端专项打磨（2026-09-16）
   目标：抽屉导航全量可用 + 触控 ≥44px + iOS 聚焦防缩放 + 表格横滑提示
   ============================================================ */
@media (max-width: 1024px) {
  /* 抽屉层级修复：打开时 sidebar 必须盖住遮罩（overlay z=45），否则菜单点不到 */
  .sidebar.open-mobile { z-index: 50; }
  /* 触控目标 ≥44px：导航项、汉堡按钮 */
  .sidebar .nav-item { min-height: 44px; padding: 10px 12px; font-size: 14px; }
  .topbar .menu-btn { width: 44px; height: 44px; }
}
@media (max-width: 640px) {
  /* 触控目标 ≥44px（iOS HIG / Material Design 标准） */
  .btn { min-height: 44px; padding: 10px 16px; font-size: 14px; }
  .btn.sm { min-height: 40px; padding: 6px 12px; font-size: 12.5px; }
  .tabs button { min-height: 44px; padding: 10px 16px; }
  /* 输入控件 44px + 16px 字号（iOS 聚焦自动缩放防护） */
  input[type="text"], input[type="password"], input[type="number"],
  input[type="date"], input[type="search"], select, textarea {
    min-height: 44px; font-size: 16px;
  }
  .toolbar .search input { font-size: 16px; }
  /* 弹窗关闭按钮触控区 */
  .modal .m-close { width: 44px; height: 44px; }
  /* 顶栏精简：手机端隐藏"当前用户…"文字，仅留退出 */
  .topbar .who span { display: none; }
  .topbar .who { gap: 4px; }
  /* 表格：横滑提示（tbl min-width 560px 在手机必然溢出，提示恒准确） */
  .table-wrap { position: relative; }
  .table-wrap::after {
    content: "← 左右滑动查看更多 →";
    display: block; padding: 6px; text-align: center;
    font-size: 11px; color: var(--muted); background: #fafbfe;
    border-top: 1px solid var(--border); flex-shrink: 0;
  }
  /* 表格操作链接触控区加大 */
  .tbl .ops a { padding: 8px 2px; display: inline-block; }
  /* 点名页：三状态按钮独占一行并均分，方便教练拇指操作 */
  .stu .btns { flex: 1 1 100%; }
  .stu .btns button { flex: 1; min-height: 44px; font-size: 14px; }
  /* 登录卡收窄（第 29 次：纯星空单卡，仅收窄内边距） */
  .login-card { padding: 26px 20px 20px; }
  .transit-body .welcome { font-size: 26px; letter-spacing: 6px; text-indent: 6px; }
}

/* ============================================================
   16. 手机端底部导航 + 全屏工作台（方案 A 样板 2026-09-16）
   触发：<1024px 显示底栏；「工作」按钮弹出整屏宫格导航（乙）
   注意：.m-hide-menu 标记在样板页 .main 上，铺开时 13 页统一加
   ============================================================ */
@media (min-width: 1025px) {
  .m-bottom-nav, .m-work { display: none !important; }
}
@media (max-width: 1024px) {
  /* 导航入口迁移到底部「工作」，隐藏左上角汉堡 */
  .m-hide-menu .menu-btn { display: none; }
  /* 顶栏 84px；PageHeader：移动端居中、只显示大标题（面包屑隐藏）；who 隐藏（退出迁至「我的」） */
  .m-hide-menu .topbar { height: 84px; }
  .m-hide-menu .topbar .page-head { align-items: center; text-align: center; }
  .m-hide-menu .topbar .page-head .crumb { display: none; }
  .m-hide-menu .topbar .page-head .ptitle { font-size: 20px; }
  .m-hide-menu .topbar .crumb { flex: 1; text-align: center; }
  .m-hide-menu .topbar .crumb.brand { color: var(--brand-b); justify-content: center; font-size: 19px; }
  .m-hide-menu .topbar .who { display: none; }
  /* 内容区底部留白（凸起按钮 + 悬浮底栏高度），避免遮挡最后一行（第 32 次：80px FAB + 96px 悬浮底栏） */
  .m-hide-menu .content { padding-bottom: 160px; }

  /* 悬浮胶囊底栏（第 32 次：方案 B，HarmonyOS 悬浮页签/iOS Liquid Glass 范式）
     半透明 + backdrop-filter 毛玻璃；不支持 blur 的 WebView 降级为近实心底 */
  .m-bottom-nav {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 90;  /* 高于工作台(80)，打开工作台时底栏仍可见可点（防误触 H5 后退） */
    display: flex; align-items: center; justify-content: space-around;
    height: 96px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 32px;
    box-shadow: 0 6px 24px rgba(20, 21, 43, 0.14);
  }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .m-bottom-nav { background: rgba(255, 255, 255, 0.94); }
  }
  .m-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; border: none; background: transparent; cursor: pointer;
    font-size: 14px; color: var(--muted); min-height: 96px;
    transition: color 0.2s ease;
  }
  /* 选中态：图标上浮 + 主色胶囊背景板（200ms，微信小程序/主流 APP 范式） */
  .m-nav-item .ic {
    padding: 5px 9px; border-radius: 16px; line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease;
  }
  .m-nav-item.on .ic { background: var(--primary-weak-2); transform: translateY(-2px) scale(1.08); }
  .m-nav-item.on { color: var(--primary); font-weight: 600; }
  .m-nav-fab {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--brand-b));
    color: #fff; border: 5px solid var(--bg);
    font-size: 16px; font-weight: 700; letter-spacing: 2px;
    margin-top: -40px;  /* 向上凸出（Material 3 Medium Extended FAB 档位 80dp） */
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 6px 20px rgba(30, 58, 138, 0.35);
    flex-shrink: 0;
  }
  .m-nav-fab:active { transform: scale(0.94); }

  /* 全屏工作台 */
  .m-work {
    display: none; position: fixed; inset: 0; z-index: 80;
    background: var(--bg); flex-direction: column;
  }
  .m-work.show { display: flex; animation: m-work-in 0.2s ease; }
  @keyframes m-work-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
  /* 头部（第 32 次）：标题居中 20px 粗体（与 12 图标页 PageHeader 同规格），关闭按钮放大在右侧 */
  .m-work-h {
    position: relative;
    display: flex; align-items: center;
    height: 64px; padding: 0 12px;
    background: var(--card); border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .m-work-h .t {
    position: absolute; left: 0; right: 0; text-align: center;
    font-size: 20px; font-weight: 700; color: var(--text);
    pointer-events: none; z-index: 1;
  }
  .m-work-h .close {
    width: 48px; height: 48px; margin-left: auto; border: none;
    background: var(--primary-weak-2); color: var(--text);
    cursor: pointer; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s ease;
  }
  .m-work-h .close:active { background: var(--border-strong); }
  .m-work-grid {
    flex: 1; overflow-y: auto; padding: 16px 14px calc(140px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    align-content: start;
  }
  .m-work-cell {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; min-height: 96px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    cursor: pointer; text-decoration: none;
  }
  .m-work-cell:active { background: var(--primary-weak-2); }
  .m-work-cell .ic { font-size: 26px; line-height: 1; }
  .m-work-cell .nm { font-size: 13px; color: var(--text); }
}
