/* ============ 托管刷脸签到系统 - 公共样式 ============ */
:root {
  --primary: #2f7cf6;
  --primary-dark: #1c5fd4;
  --primary-light: #e8f1ff;
  --success: #22c55e;
  --success-dark: #16a34a;
  --success-light: #e8f9ee;
  --warning: #f59e0b;
  --warning-light: #fef3e2;
  --danger: #ef4444;
  --danger-light: #feecec;
  --purple: #8b5cf6;
  --text: #1f2937;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --border: #e5e7eb;
  --bg: #f3f6fb;
  --card: #ffffff;
  --shadow-sm: 0 1px 3px rgba(31, 41, 55, 0.08);
  --shadow-md: 0 4px 16px rgba(31, 41, 55, 0.1);
  --shadow-lg: 0 12px 36px rgba(31, 41, 55, 0.16);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-full: 999px;
  --t: 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; outline: none; }
a { color: var(--primary); text-decoration: none; }

/* ============ 顶部导航 ============ */
.topbar {
  background: linear-gradient(135deg, var(--primary) 0%, #5b9bff 100%);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-md);
  min-height: 54px;
}

.topbar .back-btn {
  color: #fff;
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t);
}
.topbar .back-btn:hover { background: rgba(255, 255, 255, 0.18); }

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.topbar-title small { display: block; font-size: 12px; font-weight: 400; opacity: 0.85; }

/* ============ 布局 ============ */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}
.page-wide { max-width: 1080px; }

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============ 表单 ============ */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 15px;
  background: #fff;
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 124, 246, 0.12);
}
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--t);
  width: 100%;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(47, 124, 246, 0.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35); }
.btn-success:hover { background: var(--success-dark); }
.btn-outline {
  background: #fff; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: #f3f4f6; color: var(--text-2); }
.btn-ghost:hover { background: #e5e7eb; }
.btn-danger { background: var(--danger-light); color: var(--danger); }
.btn-danger:hover { background: #fddddd; }
.btn-sm { padding: 7px 14px; font-size: 13px; width: auto; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ============ 首页角色入口 ============ */
.hero {
  text-align: center;
  padding: 36px 16px 28px;
}
.hero-logo { font-size: 52px; margin-bottom: 10px; }
.hero h1 { font-size: 26px; font-weight: 800; color: var(--text); }
.hero p { color: var(--text-2); font-size: 18px; font-weight: 600; margin-top: 8px; }

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}
.role-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 26px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--t);
  display: block;
  color: var(--text);
}
.role-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.role-icon { font-size: 40px; margin-bottom: 10px; }
.role-name { font-size: 16px; font-weight: 700; }
.role-desc { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.role-card.highlight { background: linear-gradient(135deg, var(--primary), #5b9bff); color: #fff; }
.role-card.highlight .role-desc { color: rgba(255,255,255,0.85); }

.features {
  margin-top: 22px;
  background: var(--card);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.features h3 { font-size: 14px; margin-bottom: 10px; color: var(--text-2); }
.features li {
  list-style: none;
  font-size: 13px;
  color: var(--text-2);
  padding: 5px 0;
  display: flex;
  gap: 8px;
}
.features li::before { content: "✅"; }

/* ============ 摄像头区域 ============ */
.camera-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 3 / 4;
  margin-bottom: 14px;
}
.camera-wrap.landscape { aspect-ratio: 16 / 10; }
.camera-wrap video, .camera-wrap canvas.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera-wrap img.native-preview, .meal-camera-wrap img.native-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  background: #0f172a;
}
.meal-camera-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 4 / 3;
  margin-bottom: 6px;
}
.camera-wrap .camera-tip {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--r-full);
  font-size: 13px;
  white-space: nowrap;
  z-index: 3;
}
.camera-wrap .face-frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}
/* 现场诊断行：亮度 / 曝光档 / 检测分 / 距离 / 耗时（强光与弱网排障用，不进热路径） */
.camera-wrap .dbg {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 6;
  pointer-events: none;
  font-size: 10px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.66);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 2px 5px;
  max-width: calc(100% - 12px);
  word-break: break-all;
}
.face-frame-ring {
  /* 近距离(20~40cm)人脸在画面里占比大，取景框放大到 78% 引导站位 */
  width: 78%;
  aspect-ratio: 1;
  border: 3px dashed rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  transition: border-color var(--t);
}
.face-frame-ring.detected { border-color: var(--success); border-style: solid; }

/* 站位提示徽标：按「脸高/画面高」实时自适应，各机型自动适配，不写死厘米数 */
.dist-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--r-full, 999px);
  white-space: nowrap;
  pointer-events: none;
  transition: background var(--t), color var(--t);
}
.dist-badge.ok { background: rgba(16, 185, 129, 0.92); font-weight: 600; }
.dist-badge.warn { background: rgba(245, 158, 11, 0.94); font-weight: 600; }

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  text-align: center;
  padding: 20px;
  z-index: 1;
}
.camera-placeholder .big { font-size: 46px; }

/* 录入进度点 */
.capture-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
}
.capture-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--t);
}
.capture-dot.active { background: var(--primary); transform: scale(1.25); }
.capture-dot.done { background: var(--success); }

/* ============ 签到结果遮罩 ============ */
.result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.result-overlay.show { display: flex; animation: fadeIn 0.25s ease; }
.result-box {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 28px 24px;
  text-align: center;
  width: 100%;
  max-width: 360px;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.result-box.success { border-top: 6px solid var(--success); }
.result-box.fail { border-top: 6px solid var(--danger); }
.result-box.dup { border-top: 6px solid var(--warning); }
.result-emoji { font-size: 56px; margin-bottom: 8px; }
.result-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.result-box.success .result-title { color: var(--success-dark); }
.result-box.fail .result-title { color: var(--danger); }
.result-box.dup .result-title { color: var(--warning); }
.result-name { font-size: 18px; font-weight: 700; margin: 6px 0 2px; }
.result-meta { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.result-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 8px auto 12px;
  border: 4px solid var(--success-light);
  display: block;
}
.result-msg { font-size: 14px; color: var(--text-2); margin-bottom: 18px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============ 签到台模式切换 ============ */
.mode-switch {
  display: flex;
  background: #eef2f8;
  border-radius: var(--r-full);
  padding: 5px;
  margin-bottom: 16px;
}
.mode-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--r-full);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-2);
  transition: all var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.mode-btn.active-in { background: var(--success); color: #fff; box-shadow: 0 3px 10px rgba(34,197,94,0.35); }
.mode-btn.active-out { background: var(--warning); color: #fff; box-shadow: 0 3px 10px rgba(245,158,11,0.35); }

/* ============ 统计概览 ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num { font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.stat-card.c-in .stat-num { color: var(--success-dark); }
.stat-card.c-out .stat-num { color: var(--warning); }
.stat-card.c-miss .stat-num { color: var(--danger); }
.stat-card.c-total .stat-num { color: var(--primary); }

/* ============ 列表 / 标签 ============ */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}
.list-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  overflow: hidden;
}
.list-main { flex: 1; min-width: 0; }
.list-title-text { font-weight: 700; font-size: 15px; }
.list-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.list-actions { display: flex; gap: 8px; flex-shrink: 0; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
}
.badge-in { background: var(--success-light); color: var(--success-dark); }
.badge-out { background: var(--warning-light); color: #b45309; }
.badge-manual { background: #f3f4f6; color: var(--text-2); }
.badge-class { background: var(--primary-light); color: var(--primary-dark); }
/* 人脸自检未通过（跟别人太像 / 样本太散）→ 花名册红标，提示重新录入 */
.badge-reenroll { background: var(--danger-light); color: var(--danger); }

.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-3);
  font-size: 14px;
}
.empty .empty-icon { font-size: 44px; margin-bottom: 8px; }

/* ============ 家长端时间轴 ============ */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.tl-item { position: relative; margin-bottom: 16px; }
.tl-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--success);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--success);
}
.tl-dot.out { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.tl-card {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.tl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tl-type { font-weight: 700; font-size: 15px; }
.tl-time { font-size: 12px; color: var(--text-3); }
.tl-photo {
  width: 100%;
  border-radius: var(--r-sm);
  object-fit: cover;
  max-height: 240px;
  display: block;
}
.tl-nophoto {
  background: #f8fafc;
  border-radius: var(--r-sm);
  padding: 18px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

/* 微信推送风格消息卡 */
.push-card {
  background: #fff;
  border-radius: var(--r-sm);
  border-left: 4px solid var(--success);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}
.push-card.out { border-left-color: var(--warning); }
.push-card .push-title { font-weight: 700; margin-bottom: 2px; }
.push-card .push-time { font-size: 12px; color: var(--text-3); }

/* ============ 表格（管理端宽屏）============ */
.table-wrap {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: #f8fafc; font-size: 13px; color: var(--text-2); font-weight: 600; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfd; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.tab-btn {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: var(--r-full);
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  transition: all var(--t);
}
.tab-btn.active { background: var(--primary); color: #fff; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--r-full);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s ease;
  z-index: 200;
  max-width: 88vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: rgba(239, 68, 68, 0.95); }
.toast.success { background: rgba(34, 197, 94, 0.95); }

/* ============ 登录页 ============ */
.login-body {
  background: linear-gradient(160deg, #eef4ff 0%, #e0f2fe 55%, #ecfdf5 100%);
  min-height: 100vh;
}
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(30, 64, 175, 0.14);
  padding: 34px 28px 26px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-logo { font-size: 52px; line-height: 1; }
.login-title { font-size: 20px; font-weight: 800; margin: 14px 0 6px; }
.login-sub { font-size: 13px; color: var(--text-3); margin-bottom: 22px; }
.login-btn { width: 100%; padding: 13px; font-size: 16px; margin-top: 6px; }
.login-parent-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
}
.login-parent-link:hover { color: var(--primary); }

/* ============ 顶栏用户信息 ============ */
.user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-role-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.role-super { background: rgba(253, 224, 71, 0.95); color: #92400e; }
.role-admin { background: rgba(255, 255, 255, 0.22); color: #fff; }
.user-bar .btn-sm { padding: 5px 10px; font-size: 12px; background: rgba(255,255,255,0.18); color: #fff; }
.user-bar .btn-sm:hover { background: rgba(255,255,255,0.3); }

/* ============ 账号管理 ============ */
.perm-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}
.perm-check {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.perm-check input { accent-color: var(--primary); width: 15px; height: 15px; }
.perm-badge {
  display: inline-block;
  font-size: 11px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 2px 8px;
  margin: 2px 3px 2px 0;
}
.badge-disabled { background: #fee2e2; color: #b91c1c; }
.badge-active { background: var(--success-light); color: var(--success-dark); }

/* ============ 今日统计卡片 ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.1; }
.stat-warn { color: #ea580c; }
.stat-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.stat-clickable { cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; border: 1.5px solid transparent; }
.stat-clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.stat-muted { opacity: 0.55; }

/* ============ 未签到名单弹窗 ============ */
.absent-box {
  background: #fff;
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.absent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.absent-title { font-size: 16px; font-weight: 800; }
.absent-close {
  background: #f3f4f6;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-2);
}
.absent-close:hover { background: #e5e7eb; }
.absent-filter { display: flex; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.absent-filter .form-select { flex: 1; min-width: 0; }
.absent-count { padding: 10px 18px 2px; font-size: 13px; color: var(--text-2); }
.absent-list { flex: 1; overflow-y: auto; padding: 6px 18px 14px; min-height: 80px; }
.absent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.absent-item:last-child { border-bottom: none; }
.absent-name { font-size: 15px; font-weight: 700; }
.absent-meta { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.absent-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.absent-tip { padding: 6px 18px 14px; font-size: 12px; color: var(--text-2); }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; }

/* ============ 工具类 ============ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.safe-tip {
  background: var(--warning-light);
  color: #92400e;
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .role-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
  .hero h1 { font-size: 22px; }
  .mode-btn { font-size: 14px; padding: 11px 8px; }
  .tab-btn { font-size: 13px; padding: 8px 14px; }
}
