/**
 * 星钻辅学平台 - 管理员端样式
 * 设计风格：轻量 SaaS 管理后台
 * 特点：专业、克制、清晰、轻量、管理感
 */

/* ============================================
   1. 后台布局框架
   ============================================ */

/* 后台整体布局 */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--color-bg, #F8F9FB);
}

/* ============================================
   2. 侧边栏（深色背景）
   ============================================ */
.admin-sidebar {
  width: 240px;
  background-color: #1E293B;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  overflow-y: auto;
}

/* Logo 区域 */
.sidebar-brand {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.brand-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* 导航分组 */
.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 16px;
  margin: 0;
}

/* 导航项 */
.nav-item {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 40px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  margin: 2px 8px;
  border-radius: var(--radius-sm, 6px);
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
}

.nav-item.active {
  background-color: rgba(59, 130, 246, 0.12);
  color: #ffffff;
  border-left: 3px solid var(--color-primary, #3B82F6);
  margin-left: 0;
  border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
}

.nav-item svg,
.nav-item i {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

/* 侧边栏底部管理员信息 */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-primary, #3B82F6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.admin-details {
  flex: 1;
  min-width: 0;
}

.admin-name {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   3. 顶部栏
   ============================================ */
.admin-topbar {
  height: 56px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border, #E5E7EB);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  z-index: 999;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-size: var(--font-size-section-title, 18px);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-text, #1F2937);
  margin: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary, #6B7280);
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb a {
  color: var(--color-text-secondary, #6B7280);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-primary, #3B82F6);
}

.breadcrumb-separator {
  color: var(--color-text-tertiary, #9CA3AF);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 搜索框 */
.topbar-search {
  position: relative;
}

.topbar-search input {
  width: 240px;
  height: 36px;
  padding: 0 36px 0 14px;
  border: none;
  border-radius: 18px;
  background-color: var(--color-bg, #F8F9FB);
  font-size: 13px;
  color: var(--color-text, #1F2937);
  transition: all 0.2s ease;
}

.topbar-search input:focus {
  outline: none;
  background-color: #ffffff;
  box-shadow: 0 0 0 2px var(--color-primary-light, rgba(59, 130, 246, 0.2));
}

.topbar-search input::placeholder {
  color: var(--color-text-tertiary, #9CA3AF);
}

.topbar-search svg,
.topbar-search i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-tertiary, #9CA3AF);
  width: 16px;
  height: 16px;
}

/* 通知图标 */
.topbar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary, #6B7280);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.topbar-icon:hover {
  background-color: var(--color-bg, #F8F9FB);
  color: var(--color-text, #1F2937);
}

.topbar-icon svg,
.topbar-icon i {
  width: 20px;
  height: 20px;
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: var(--color-error, #EF4444);
  border-radius: 50%;
}

/* 顶部栏头像 */
.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-primary, #3B82F6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ============================================
   4. 内容区
   ============================================ */
.admin-content {
  flex: 1;
  margin-left: 240px;
  margin-top: 56px;
  padding: 24px;
  min-height: calc(100vh - 56px);
}

/* 页面标题区 */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

@media (max-width: 1200px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background-color: #ffffff;
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0, 0, 0, 0.05));
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-card-hover, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md, 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg,
.stat-icon i {
  width: 24px;
  height: 24px;
}

.stat-icon.primary {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--color-primary, #3B82F6);
}

.stat-icon.success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-success, #10B981);
}

.stat-icon.warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-warning, #F59E0B);
}

.stat-icon.info {
  background-color: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text, #1F2937);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--color-text-tertiary, #9CA3AF);
  margin-bottom: 4px;
}

.stat-change {
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.up {
  color: var(--color-success, #10B981);
}

.stat-change.down {
  color: var(--color-error, #EF4444);
}

/* ============================================
   6. 筛选栏
   ============================================ */
.filter-bar {
  background-color: #ffffff;
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0, 0, 0, 0.05));
  padding: 16px 20px;
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 13px;
  color: var(--color-text-secondary, #6B7280);
  white-space: nowrap;
}

.filter-input,
.filter-select {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: var(--radius-sm, 6px);
  font-size: 13px;
  color: var(--color-text, #1F2937);
  background-color: #ffffff;
  min-width: 140px;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--color-primary, #3B82F6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.filter-input::placeholder {
  color: var(--color-text-tertiary, #9CA3AF);
}

/* ============================================
   7. 数据表格容器
   ============================================ */
.table-container {
  background-color: #ffffff;
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0, 0, 0, 0.05));
  overflow: hidden;
}

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

.data-table thead {
  background-color: #FAFBFC;
}

.data-table th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary, #6B7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  border-bottom: 2px solid var(--color-border, #E5E7EB);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--color-text, #1F2937);
  border-bottom: 1px solid var(--color-border-light, #F3F4F6);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: var(--color-bg-hover, #F9FAFB);
}

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

/* 表格中的用户/教师信息 */
.table-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-bg, #F8F9FB);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--color-text-secondary, #6B7280);
  flex-shrink: 0;
}

.table-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.table-user-info {
  min-width: 0;
}

.table-user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text, #1F2937);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-user-meta {
  font-size: 12px;
  color: var(--color-text-tertiary, #9CA3AF);
}

/* 表格操作列 */
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   8. 状态 Tab
   ============================================ */
.status-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.status-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary, #6B7280);
  background-color: #ffffff;
  border: 1px solid var(--color-border, #E5E7EB);
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-tab:hover {
  border-color: var(--color-primary, #3B82F6);
  color: var(--color-primary, #3B82F6);
}

.status-tab.active {
  background-color: var(--color-primary, #3B82F6);
  border-color: var(--color-primary, #3B82F6);
  color: #ffffff;
}

.status-tab .count {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.1);
}

.status-tab.active .count {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   9. Badge 样式
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-sm {
  padding: 2px 8px;
  font-size: 11px;
}

.badge-pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-warning, #F59E0B);
}

.badge-processing {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--color-primary, #3B82F6);
}

.badge-scheduled {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-success, #10B981);
}

.badge-completed {
  background-color: rgba(107, 114, 128, 0.1);
  color: var(--color-text-secondary, #6B7280);
}

.badge-cancelled {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-error, #EF4444);
}

/* ============================================
   10. 按钮样式补充
   ============================================ */
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  height: 32px;
}

.btn-outline-primary {
  color: var(--color-primary, #3B82F6);
  border-color: var(--color-primary, #3B82F6);
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--color-primary, #3B82F6);
  color: #ffffff;
}

.btn-outline-secondary {
  color: var(--color-text-secondary, #6B7280);
  border-color: var(--color-border, #E5E7EB);
  background-color: transparent;
}

.btn-outline-secondary:hover {
  background-color: var(--color-bg, #F8F9FB);
  color: var(--color-text, #1F2937);
}

/* ============================================
   11. 详情抽屉/面板
   ============================================ */
.detail-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 480px;
  height: 100vh;
  background-color: #ffffff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.detail-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border, #E5E7EB);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text, #1F2937);
  margin: 0;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary, #6B7280);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
}

.drawer-close:hover {
  background-color: var(--color-bg, #F8F9FB);
  color: var(--color-text, #1F2937);
}

.drawer-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border, #E5E7EB);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 抽屉遮罩 */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1099;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   12. 日志条目样式
   ============================================ */
.log-list {
  background-color: #ffffff;
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0, 0, 0, 0.05));
  overflow: hidden;
}

.log-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light, #F3F4F6);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.log-item:last-child {
  border-bottom: none;
}

.log-time {
  min-width: 140px;
  font-size: 12px;
  color: var(--color-text-tertiary, #9CA3AF);
  font-family: monospace;
}

.log-content {
  flex: 1;
  min-width: 0;
}

.log-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 4px;
}

.log-type.create {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-success, #10B981);
}

.log-type.update {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--color-primary, #3B82F6);
}

.log-type.delete {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-error, #EF4444);
}

.log-type.view {
  background-color: rgba(107, 114, 128, 0.1);
  color: var(--color-text-secondary, #6B7280);
}

.log-description {
  font-size: 14px;
  color: var(--color-text, #1F2937);
  margin-bottom: 4px;
}

.log-operator {
  font-size: 12px;
  color: var(--color-text-secondary, #6B7280);
}

/* ============================================
   13. 空状态
   ============================================ */
.empty-state {
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background-color: var(--color-bg, #F8F9FB);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary, #9CA3AF);
}

.empty-icon svg,
.empty-icon i {
  width: 32px;
  height: 32px;
}

.empty-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text, #1F2937);
  margin-bottom: 8px;
}

.empty-description {
  font-size: 14px;
  color: var(--color-text-secondary, #6B7280);
  margin-bottom: 20px;
}

/* ============================================
   14. 快捷操作区
   ============================================ */
.quick-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* ============================================
   15. 近期活动列表
   ============================================ */
.activity-list {
  background-color: #ffffff;
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0, 0, 0, 0.05));
  overflow: hidden;
}

.activity-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light, #F3F4F6);
  display: flex;
  align-items: center;
  gap: 16px;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-time {
  font-size: 12px;
  color: var(--color-text-tertiary, #9CA3AF);
  min-width: 60px;
}

.activity-content {
  flex: 1;
  font-size: 14px;
  color: var(--color-text, #1F2937);
}

.activity-badge {
  flex-shrink: 0;
}

/* ============================================
   16. 两栏布局（排课中心等）
   ============================================ */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1200px) {
  .two-column-layout {
    grid-template-columns: 1fr;
  }
}

.column-panel {
  background-color: #ffffff;
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0, 0, 0, 0.05));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.column-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light, #F3F4F6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.column-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text, #1F2937);
  margin: 0;
}

.column-panel-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 280px);
}

/* ============================================
   17. 候选列表项（排课中心）
   ============================================ */
.candidate-item {
  padding: 16px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: var(--radius-md, 10px);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.candidate-item:hover {
  border-color: var(--color-primary, #3B82F6);
  background-color: rgba(59, 130, 246, 0.02);
}

.candidate-item.selected {
  border-color: var(--color-primary, #3B82F6);
  background-color: rgba(59, 130, 246, 0.05);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.candidate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.candidate-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text, #1F2937);
}

.candidate-match {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-success, #10B981);
}

.candidate-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--color-text-secondary, #6B7280);
}

/* ============================================
   18. 需求详情卡片
   ============================================ */
.detail-card {
  background-color: var(--color-bg, #F8F9FB);
  border-radius: var(--radius-md, 10px);
  padding: 16px;
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  margin-bottom: 12px;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  width: 80px;
  font-size: 13px;
  color: var(--color-text-secondary, #6B7280);
  flex-shrink: 0;
}

.detail-value {
  flex: 1;
  font-size: 14px;
  color: var(--color-text, #1F2937);
  font-weight: 500;
}

/* ============================================
   19. 等级分布卡片
   ============================================ */
.level-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .level-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {
  .level-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.level-stat-card {
  background-color: #ffffff;
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0, 0, 0, 0.05));
  padding: 16px;
  text-align: center;
}

.level-stat-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-stat-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text, #1F2937);
  margin-bottom: 4px;
}

.level-stat-label {
  font-size: 12px;
  color: var(--color-text-secondary, #6B7280);
}

/* ============================================
   20. 分页器
   ============================================ */
.pagination-container {
  display: flex;
  justify-content: center;
  padding: 20px;
  border-top: 1px solid var(--color-border-light, #F3F4F6);
}

.pagination {
  display: flex;
  gap: 4px;
}

.page-item {
  list-style: none;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm, 6px);
  font-size: 13px;
  color: var(--color-text-secondary, #6B7280);
  background-color: #ffffff;
  border: 1px solid var(--color-border, #E5E7EB);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.page-link:hover {
  border-color: var(--color-primary, #3B82F6);
  color: var(--color-primary, #3B82F6);
}

.page-item.active .page-link {
  background-color: var(--color-primary, #3B82F6);
  border-color: var(--color-primary, #3B82F6);
  color: #ffffff;
}

.page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   21. 模态框
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: #ffffff;
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border, #E5E7EB);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text, #1F2937);
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary, #6B7280);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
}

.modal-close:hover {
  background-color: var(--color-bg, #F8F9FB);
  color: var(--color-text, #1F2937);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border, #E5E7EB);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ============================================
   22. 表单样式补充
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text, #1F2937);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: var(--radius-sm, 6px);
  font-size: 14px;
  color: var(--color-text, #1F2937);
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary, #3B82F6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
  color: var(--color-text-tertiary, #9CA3AF);
}

textarea.form-control {
  height: auto;
  padding: 10px 12px;
  min-height: 80px;
  resize: vertical;
}

.form-select {
  width: 100%;
  height: 40px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: var(--radius-sm, 6px);
  font-size: 14px;
  color: var(--color-text, #1F2937);
  background-color: #ffffff;
  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='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--color-primary, #3B82F6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-text {
  font-size: 12px;
  color: var(--color-text-tertiary, #9CA3AF);
  margin-top: 4px;
}

/* ============================================
   23. 评分星星
   ============================================ */
.rating-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rating-stars {
  display: inline-flex;
  gap: 2px;
  color: var(--color-warning, #F59E0B);
}

.rating-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text, #1F2937);
  margin-left: 4px;
}

/* ============================================
   24. 钻石等级徽章
   ============================================ */
.diamond-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.diamond-badge.level-5 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #fff;
}

.diamond-badge.level-4 {
  background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
  color: #fff;
}

.diamond-badge.level-3 {
  background: linear-gradient(135deg, #CD7F32, #A0522D);
  color: #fff;
}

.diamond-badge.level-2,
.diamond-badge.level-1 {
  background-color: rgba(107, 114, 128, 0.1);
  color: var(--color-text-secondary, #6B7280);
}

/* ============================================
   25. 响应式适配
   ============================================ */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-topbar {
    left: 0;
  }

  .admin-content {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }

  .topbar-search input {
    width: 160px;
  }
}

/* ============================================
   26. 辅助类
   ============================================ */
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flex-1 {
  flex: 1;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}
