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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333;
  line-height: 1.6;
}

.required { color: #e74c3c; }

/* ========== 报名页面 ========== */
.page-register {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.page-register .container {
  width: 100%;
  max-width: 640px;
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.card-header {
  padding: 32px 36px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-align: center;
}

.card-header h1 { font-size: 28px; margin-bottom: 8px; }
.card-header .subtitle { opacity: 0.9; font-size: 14px; }

.form { padding: 32px 36px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #555;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.radio-group {
  display: flex;
  gap: 24px;
  padding-top: 6px;
}

.radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  cursor: pointer;
  font-size: 15px;
}

.radio input { cursor: pointer; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-block { display: block; width: 100%; padding: 14px; font-size: 16px; }

.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }
.btn-success:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }

.footer-links {
  padding: 0 36px 28px;
  text-align: center;
}
.footer-links a {
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.footer-links a:hover { text-decoration: underline; }

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 14px 28px;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.35s ease;
  pointer-events: none;
  max-width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }
.toast.info { background: #3b82f6; }

/* ========== 后台页面 ========== */
.page-admin { background: #f3f4f6; min-height: 100vh; }

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
}

.logo {
  padding: 28px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.logo h2 { font-size: 20px; }

.menu {
  flex: 1;
  padding: 16px 12px;
}

.menu-item {
  display: block;
  padding: 12px 16px;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  transition: all 0.2s;
}
.menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.menu-item.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-content {
  flex: 1;
  margin-left: 240px;
  min-width: 0;
}

.topbar {
  background: #fff;
  padding: 20px 32px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { font-size: 22px; color: #111; }

.page-section { padding: 28px 32px; display: none; }
.page-section.active { display: block; }

/* 统计卡片 */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.stat-icon.total { background: #dbeafe; }
.stat-icon.pending { background: #fef3c7; }
.stat-icon.approved { background: #d1fae5; }
.stat-icon.rejected { background: #fee2e2; }

.stat-info h3 { font-size: 13px; color: #6b7280; font-weight: 500; margin-bottom: 4px; }
.stat-info .num { font-size: 28px; font-weight: 700; color: #111; }

/* 筛选栏 */
.filter-bar {
  background: #fff;
  padding: 18px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-item.grow { flex: 1; min-width: 200px; }

.filter-item label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.filter-item select,
.filter-item input {
  padding: 9px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  min-width: 140px;
}
.filter-item select:focus,
.filter-item input:focus {
  outline: none;
  border-color: #667eea;
}

.batch-bar {
  background: #fff;
  padding: 12px 20px;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #f3f4f6;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
}
.checkbox-inline input { cursor: pointer; width: 16px; height: 16px; }

.selected-count {
  font-size: 13px;
  color: #6b7280;
  margin-right: auto;
}

/* 表格 */
.table-wrap {
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #f3f4f6;
}

.data-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
  font-size: 13px;
  position: sticky;
  top: 0;
}

.data-table tbody tr:hover { background: #f9fafb; }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.approved { background: #d1fae5; color: #065f46; }
.status-badge.rejected { background: #fee2e2; color: #991b1b; }

.action-btns { display: flex; gap: 6px; }
.action-btns button {
  padding: 5px 10px;
  font-size: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}
.btn-approve { background: #d1fae5; color: #065f46; }
.btn-approve:hover { background: #a7f3d0; }
.btn-reject { background: #fee2e2; color: #991b1b; }
.btn-reject:hover { background: #fecaca; }

.empty-state {
  padding: 80px 20px;
  text-align: center;
  color: #9ca3af;
}
.empty-icon { font-size: 56px; margin-bottom: 16px; }

/* 统计页 */
.stats-content { }

.stats-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}
.stats-card h2 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #111;
}

.category-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.cat-item {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.cat-item .cat-name { font-size: 14px; color: #6b7280; margin-bottom: 6px; }
.cat-item .cat-num { font-size: 26px; font-weight: 700; color: #667eea; }

/* 响应式 */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .sidebar { width: 64px; }
  .logo h2, .menu-item span, .sidebar-footer .btn { display: none; }
  .main-content { margin-left: 64px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}
