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

body {
  font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f0f2f5;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-wrap {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}
.login-title {
  font-size: 24px;
  color: #1a3a5c;
  text-align: center;
  letter-spacing: 1px;
}
.login-sub {
  font-size: 13px;
  color: #999;
  text-align: center;
  margin-top: 6px;
  margin-bottom: 28px;
}
.login-form .form-group { margin-bottom: 16px; }
.login-form label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}
.login-form input[type=text],
.login-form input[type=password],
.form-group input[type=text],
.form-group input[type=password] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.login-form input:focus,
.form-group input:focus { border-color: #1a73e8; }

.btn-primary {
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: #1557b0; }
.btn-block { display: block; width: 100%; padding: 11px; font-size: 16px; margin-top: 8px; }

.form-error {
  color: #d93025;
  font-size: 13px;
  text-align: center;
  margin-bottom: 12px;
  min-height: 18px;
}
.login-footer {
  margin-top: 28px;
  font-size: 12px;
  color: #bbb;
  text-align: center;
  line-height: 1.5;
}

/* 分页 */
.pager {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  font-size: 13px;
  color: #666;
}
.pager a {
  color: #1a73e8;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
}
.pager a:hover { background: #e8f0fe; }
/* ---------- 后台布局 ---------- */
.admin-body { background: #f0f2f5; }

.topbar {
  height: 52px;
  background: #1a3a5c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.topbar-left { font-size: 16px; letter-spacing: 1px; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.topbar-user { color: #cfe0f3; }
.topbar-logout {
  color: #fff;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px;
}
.topbar-logout:hover { background: rgba(255,255,255,.12); }

.admin-layout { display: flex; min-height: calc(100vh - 52px); }

.sidebar {
  width: 190px;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  padding: 12px 0;
  flex-shrink: 0;
}
.menu-item {
  display: block;
  padding: 10px 20px;
  color: #444;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.menu-item:hover { background: #f5f8fd; color: #1a73e8; }
.menu-item.active {
  background: #e8f0fe;
  color: #1a73e8;
  border-left-color: #1a73e8;
  font-weight: 600;
}

.content { flex: 1; padding: 24px; min-width: 0; }

.page-title { font-size: 20px; color: #1a3a5c; margin-bottom: 20px; font-weight: 600; }

.panel {
  background: #fff;
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
  margin-bottom: 20px;
}
.panel-title { font-size: 15px; color: #333; margin-bottom: 14px; font-weight: 600; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.stat-value { font-size: 28px; font-weight: 700; color: #1a73e8; }
.stat-label { font-size: 13px; color: #888; margin-top: 4px; }

.quick-links { display: flex; flex-wrap: wrap; gap: 12px; }
.quick-link {
  padding: 8px 18px;
  background: #f0f6ff;
  color: #1a73e8;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  border: 1px solid #d6e4ff;
}
.quick-link:hover { background: #e0edff; }

.placeholder-text { color: #999; font-size: 14px; padding: 20px 0; }
/* ---------- 表单与表格 ---------- */
.filter-form .filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.filter-form input[type=text],
.filter-form select,
.edit-form input,
.edit-form select {
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}
.filter-form input[type=text] { width: 200px; }
.filter-form input:focus, .filter-form select:focus,
.edit-form input:focus, .edit-form select:focus { border-color: #1a73e8; }

.btn-secondary {
  display: inline-block;
  padding: 8px 18px;
  background: #fff;
  color: #1a73e8;
  border: 1px solid #1a73e8;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.btn-secondary:hover { background: #e8f0fe; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: middle;
}
.data-table th { background: #fafafa; color: #666; font-weight: 600; }
.data-table tr:hover td { background: #f7faff; }
.data-table .empty { text-align: center; color: #999; padding: 30px; }

.link { color: #1a73e8; text-decoration: none; margin-right: 8px; }
.link:hover { text-decoration: underline; }
.link.danger { color: #d93025; }

.detail-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.detail-table th, .detail-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
}
.detail-table th { width: 110px; color: #888; font-weight: 500; background: #fafafa; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 5px; }
.form-group input, .form-group select { width: 100%; }
.form-actions { margin-top: 24px; display: flex; gap: 12px; }
/* ---------- 学员扫码端 ---------- */
.stu-body { background: #f0f2f5; min-height: 100vh; padding: 20px 14px; }
.stu-wrap { max-width: 420px; margin: 0 auto; background: #fff; border-radius: 12px; padding: 26px 22px; box-shadow: 0 2px 14px rgba(0,0,0,.07); }
.stu-title { font-size: 22px; color: #1a3a5c; text-align: center; }
.stu-sub { font-size: 13px; color: #999; text-align: center; margin: 6px 0 22px; }
.stu-form .form-group { margin-bottom: 14px; }
.stu-form label { display: block; font-size: 13px; color: #666; margin-bottom: 5px; }
.stu-form input, .stu-form select, .stu-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 15px; outline: none;
}
.stu-form input:focus, .stu-form select:focus, .stu-form textarea:focus { border-color: #1a73e8; }
.stu-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid #eee; margin-bottom: 16px; font-size: 15px; color: #1a3a5c; }
.stu-logout { font-size: 13px; color: #888; text-decoration: none; }
.stu-section { font-size: 15px; color: #333; margin: 22px 0 12px; font-weight: 600; }
.form-ok { background: #e6f7ec; color: #0a7d32; padding: 9px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.stu-list { list-style: none; }
.stu-list li { padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.stu-li-top { display: flex; justify-content: space-between; color: #333; }
.stu-li-sub { color: #999; font-size: 12px; margin-top: 3px; }
.stu-status.s0 { color: #d48806; }
.stu-status.s1 { color: #0a7d32; }
.stu-status.s2 { color: #d93025; }

/* ---------- 审批表格 ---------- */
.small { font-size: 12px; color: #888; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge.pending { background: #fff7e6; color: #d48806; }
.badge.ok { background: #e6f7ec; color: #0a7d32; }
.badge.bad { background: #fde8e6; color: #d93025; }
.inline-form { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.small-input { width: 90px; padding: 4px 6px; font-size: 12px; border: 1px solid #d9d9d9; border-radius: 4px; }
.btn-mini { padding: 3px 8px; font-size: 12px; border: none; border-radius: 4px; cursor: pointer; }
.btn-mini.ok { background: #0a7d32; color: #fff; }
.btn-mini.bad { background: #d93025; color: #fff; }