/* 优雅白蓝风格 - 精致美观 */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --primary-soft: #eff6ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  /* 固定顶栏占位：需 ≥ 实际顶栏高度，避免遮挡标题与内容 */
  --top-bar-offset: 88px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 0;
}

body.login-page {
  padding-top: 0;
}

/* 后台无前台顶栏，避免整块内容上移留白 */
body.admin-body,
body:has(.admin-wrapper) {
  padding-top: 0;
}

/* 顶部导航栏 */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding-top: env(safe-area-inset-top, 0px);
}

.top-bar-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  flex: 1;
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.top-bar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.top-bar-item i {
  font-size: 16px;
}

.top-bar-item:hover {
  background: var(--bg);
  color: var(--text);
}

.top-bar-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.top-bar-item.logout {
  color: var(--danger);
}

.top-bar-item.logout:hover {
  background: #fef2f2;
}

/* 主内容 */
.main-content {
  max-width: 100%;
  padding: 24px 20px;
}

/* 页面标题 */
.page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
  scroll-margin-top: calc(var(--top-bar-offset) + env(safe-area-inset-top, 0px) + 8px);
}

/* 导航标签 */
.nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--bg-white);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-tab {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}

.nav-tab:hover {
  color: var(--text);
  background: var(--bg);
}

.nav-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

/* 卡片 */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--primary);
  font-size: 18px;
}

.card-body {
  padding: 24px;
}

/* 统计仪表盘 */
.stats-dashboard .stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-box {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 18px 14px 16px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  border: 1.5px solid var(--border);
}

.stat-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* 顶部强调色条 */
.stat-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  border-radius: 16px 16px 0 0;
  opacity: 1;
}

/* 配色方案 */
.stat-box--blue::before    { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-box--indigo::before  { background: linear-gradient(90deg, #6366f1, #818cf8); }
.stat-box--violet::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-box--emerald::before{ background: linear-gradient(90deg, #10b981, #34d399); }

/* 图标 */
.stat-box .stat-icon {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

.stat-box--blue .stat-icon    { background: #eff6ff; color: #3b82f6; }
.stat-box--indigo .stat-icon  { background: #eef2ff; color: #6366f1; }
.stat-box--violet .stat-icon  { background: #f5f3ff; color: #8b5cf6; }
.stat-box--emerald .stat-icon { background: #ecfdf5; color: #10b981; }

/* 数值 */
.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 2px;
}

.stat-value--accent { letter-spacing: -0.5px; }
.stat-box--blue .stat-value--accent    { color: #2563eb; }
.stat-box--indigo .stat-value--accent  { color: #4f46e5; }
.stat-box--violet .stat-value--accent  { color: #7c3aed; }
.stat-box--emerald .stat-value--accent { color: #059669; }

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 500;
}

/* 明细行：横向排列 */
.stat-detail {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-detail-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
}

.stat-detail-item i {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.stat-detail-label {
  color: var(--text-muted);
  flex: 1;
  text-align: left;
}

.stat-detail-num {
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
}

.stat-detail-item--green .stat-detail-label,
.stat-detail-item--green i {
  color: var(--success);
}

.stat-detail-item--green .stat-detail-num {
  color: var(--success);
}

/* 趋势条形图 */
.trend-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.trend-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trend-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trend-bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trend-bar-label {
  width: 44px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

.trend-bar-track {
  flex: 1;
  height: 24px;
  background: #f1f5f9;
  border-radius: 10px;
  position: relative;
  overflow: visible;
}

.trend-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary) 100%);
  border-radius: 10px;
  min-width: 6px;
  transition: width 0.4s ease;
  position: relative;
}

.trend-bar-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px;
  background: var(--primary-dark);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.trend-bar-value {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 0 2px rgba(255,255,255,0.8);
  z-index: 1;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  color: var(--primary);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

/* 表单 */
.form-group {
  margin-bottom: 20px;
}

/* 多图上传区域 */
.img-upload-area {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  min-height: 140px;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.img-upload-area:hover,
.img-upload-area.drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.img-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
}

.img-upload-placeholder i {
  font-size: 36px;
  color: var(--primary-light);
  margin-bottom: 10px;
}

.img-upload-placeholder p {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.img-upload-placeholder span {
  font-size: 12px;
}

.img-file-input {
  display: none;
}
.upload-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 14px;
  background: #eff6ff;
  border: 1.5px dashed #bfdbfe;
  border-radius: 10px;
  font-size: 13px;
  color: #1e40af;
}

.img-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.img-preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.img-preview-item:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0;
}

.img-preview-item:hover .img-remove-btn {
  opacity: 1;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--bg-white);
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* 表格 */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-container::-webkit-scrollbar {
  height: 6px;
}
.table-container::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 3px;
}
.table-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.table-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 16px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

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

.table tr:hover td {
  background: var(--primary-soft);
  transition: background 0.15s;
}

/* 订单表格：列宽与对齐 */
.table--order th:first-child,
.table--order td:first-child { width: 70px; text-align: center; }
.table--order th:nth-child(2),
.table--order td:nth-child(2) { text-align: left; }
.table--order th:nth-child(3),
.table--order td:nth-child(3) { text-align: right; }
.table--order th:nth-child(4),
.table--order td:nth-child(4) { text-align: right; }
.table--order th:last-child,
.table--order td:last-child { text-align: center; }

/* 订单表格：各列宽度（配合截图列） */
.table--order .col-date     { width: 70px; text-align: center; }
.table--order .col-service  { min-width: 120px; }
.table--order .col-money    { text-align: right; }
.table--order .col-income   { text-align: right; }
.table--order .col-img      { width: 80px; text-align: center; }
.table--order .col-detail    { width: 60px; text-align: center; }
.table--order .col-status   { width: 130px; text-align: center; }

.order-imgs { text-align: center; }

.img-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* 用户订单列表的驳回理由行内显示 */
.reject-reason-inline {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #991b1b;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

.table--order th i,
.table--order td i { font-size: 12px; }

/* 订单表格：行样式 */
.order-date {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.order-service {
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.money-value {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.income-value {
  font-weight: 700;
  color: var(--success);
  font-size: 14px;
}

.income-none {
  color: var(--text-muted);
  font-size: 13px;
}

/* 订单汇总栏 */
.order-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.order-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.order-summary-item i { font-size: 13px; color: var(--text-muted); }
.order-summary-item strong { color: var(--text); font-weight: 700; }

.order-summary-item--money {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #065f46;
}

.order-summary-item--money i { color: var(--success); }
.order-summary-item--money strong { color: var(--success); }

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.badge i { font-size: 11px; }

.badge-waiting { background: #fef3c7; color: #92400e; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #fef3c7; color: #92400e; }

.order-status { text-align: center; }
.order-status .badge { margin: 0 auto; }

/* 后台管理表格中的截图缩略图 */
.img-preview-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.img-thumb {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  flex-shrink: 0;
}

.img-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-color: var(--primary);
}

.img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 驳回理由文字 */
.reject-reason {
  font-size: 12px;
  color: #991b1b;
  background: #fee2e2;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: default;
  display: inline-block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 提示 */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert-error::before { content: '\f06a'; }

.alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.alert-success::before { content: '\f00c'; }

/* 余额卡片 */
.balance-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  color: white;
  box-shadow: 0 10px 30px rgba(59,130,246,0.3);
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.balance-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.balance-amount {
  font-size: 36px;
  font-weight: 700;
}

/* 信息项 */
.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

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

.info-label {
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-value {
  font-weight: 600;
  color: var(--text);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 15px;
}

/* 筛选标签 */
.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-white);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.filter-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59,130,246,0.25);
}

/* 图片缩略 */
.thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all 0.2s;
}

.thumb:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

/* 统计网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* 通用 stat-value / stat-label 已迁移到仪表盘内部，避免全局冲突 */
.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.15;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Loading 加载状态 */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.spinner-sm {
    width: 24px;
    height: 24px;
    border-width: 3px;
}
.spinner-lg {
    width: 64px;
    height: 64px;
    border-width: 5px;
}
.loading-text {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}
.btn-loading .spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-width: 2px;
    border-color: rgba(255,255,255,0.3);
    border-top-color: white;
}
.btn-loading.btn-primary { color: transparent; }

/* 分页样式 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.page-btn, .page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    background: var(--bg-white);
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.2s;
}
.page-btn:hover, .page-num:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}
.page-btn.disabled, .page-num.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    pointer-events: none;
}
.page-num.active {
    cursor: default;
}
.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.page-ellipsis {
    color: var(--text-muted);
    padding: 0 4px;
}

@media (max-width: 768px) {
    .pagination { gap: 4px; }
    .page-btn, .page-num {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 8px;
    }
}

/* 电脑端 */
@media (min-width: 769px) {
  .main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
  }
  /* 桌面端导航栏不固定，全宽 */
  .top-bar {
    position: static;
  }
  .top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* 手机端：顶栏固定，第二行横向滑动菜单（强化样式） */
@media (max-width: 768px) {
  :root {
    --top-bar-offset: 106px;
  }

  .page-title {
    font-size: 20px;
    margin-bottom: 14px;
  }

  /* 主内容区：躲开固定顶栏 + 刘海屏安全区 */
  .main-content {
    padding-top: calc(var(--top-bar-offset) + env(safe-area-inset-top, 0px) + 10px);
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 70px;
  }

  /* 余额卡片 */
  .balance-card {
    border-radius: 16px;
    padding: 20px 16px;
  }

  .balance-amount {
    font-size: 28px;
  }

  /* 顶栏 */
  .top-bar {
    background: rgba(249, 250, 251, 0.97);
    -webkit-backdrop-filter: saturate(1.8) blur(20px);
    backdrop-filter: saturate(1.8) blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(255,255,255,0.5) inset;
  }

  .top-bar-content {
    flex-wrap: wrap;
    flex-direction: row;
    padding: 10px 14px 8px;
    gap: 0 10px;
    align-items: center;
    justify-content: flex-start;
  }

  .brand {
    font-size: 15px;
    flex: 0 0 auto;
    min-width: 0;
    max-width: calc(100% - 56px);
    order: 1;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.30), 0 0 0 2px rgba(255,255,255,0.4) inset;
    flex-shrink: 0;
  }

  .brand-text {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-bar-nav {
    display: flex;
    flex: 1 1 100%;
    order: 3;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 5px;
    padding: 8px 0 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  .top-bar-nav::-webkit-scrollbar {
    display: none;
  }

  .top-bar-item {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
    white-space: nowrap;
    color: var(--text-secondary);
    background: rgba(226, 232, 240, 0.7);
    border: 1.5px solid transparent;
    -webkit-tap-highlight-color: transparent;
  }

  .top-bar-item i {
    font-size: 14px;
    line-height: 1;
  }

  .top-bar-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.38), 0 0 0 1px rgba(255,255,255,0.15) inset;
  }

  .top-bar-item.logout {
    background: rgba(254, 226, 226, 0.8);
    color: var(--danger);
  }

  .top-bar-item.logout:active {
    background: rgba(239, 68, 68, 0.12);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.22);
  }

  /* 卡片 */
  .card {
    border-radius: 16px;
  }

  .card-body {
    padding: 16px;
  }

  .card-header {
    padding: 16px;
  }

  /* 统计网格 2 列 */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* 统计仪表盘：2 列网格 */
  .stats-dashboard .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-box {
    padding: 14px 10px 12px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-icon {
    width: 34px;
    height: 34px;
    font-size: 14px;
    margin-bottom: 8px;
  }

  .stat-detail-item {
    padding: 4px 6px;
    font-size: 10px;
    gap: 4px;
  }

  .stat-detail-num {
    font-size: 11px;
  }

  /* 趋势条 */
  .trend-section {
    margin-top: 20px;
    padding-top: 18px;
  }

  .trend-bar-track {
    height: 16px;
  }

  /* 导航标签：横向滚动 */
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 3px;
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 13px;
  }

  /* 筛选标签：横向滚动 */
  .filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    flex-shrink: 0;
    padding: 7px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* 表单 */
  .form-control {
    font-size: 15px;
    padding: 12px 14px;
  }

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

  /* 表格 */
  .table th,
  .table td {
    padding: 12px 10px;
    font-size: 13px;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border-left: none;
    border-right: none;
  }

  .table {
    min-width: 800px;
  }

  .table--order {
    min-width: 520px;
  }

  .order-summary {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* 图片上传区 */
  .img-upload-area {
    min-height: 120px;
  }

  .img-preview-item {
    width: 80px;
    height: 80px;
  }

  /* 按钮全宽 */
  .btn-block {
    padding: 14px;
    font-size: 15px;
  }

  /* 提现页面 */
  .withdraw-apply-wrap {
    padding-left: 0;
    padding-right: 0;
  }

  /* 登录页面 */
  body.login-page .login-wrapper {
    padding: 16px;
  }
  body.login-page .login-card {
    padding: 24px 16px;
  }
  body.login-page .form-row {
    flex-direction: column;
  }
}

/* ============================================================
   后台管理样式
   ============================================================ */

/* 后台布局 */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* 侧边导航 */
.admin-sidebar {
  width: 260px;
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.admin-sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: var(--shadow);
}

.admin-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.admin-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  transition: all 0.2s;
}

.admin-nav-item:hover {
  background: var(--bg);
  color: var(--text);
}

.admin-nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.admin-nav-item.logout {
  margin-top: auto;
  color: var(--danger);
}

.admin-nav-item.logout:hover {
  background: #fef2f2;
}

/* 后台主内容 */
.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
}

.admin-header {
  margin-bottom: 32px;
}

.admin-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

/* 后台统计卡片 */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}

.admin-stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.admin-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.admin-stat-icon.blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.admin-stat-icon.orange {
  background: #fff7ed;
  color: #f97316;
}

.admin-stat-icon.green {
  background: #f0fdf4;
  color: #22c55e;
}

.admin-stat-icon.red {
  background: #fef2f2;
  color: #ef4444;
}

.admin-stat-info {
  flex: 1;
}

.admin-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.admin-stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 后台顶部导航（手机端）：磨砂顶条 + 图标上下型胶囊 */
.admin-top-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding-top: env(safe-area-inset-top, 0px);
}

.admin-top-nav-inner {
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
}

.admin-top-nav-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 12px;
  max-width: 100%;
}

.admin-logo-sm {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.admin-nav-scroll {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
}

.admin-nav-scroll::-webkit-scrollbar {
  display: none;
}

.admin-top-nav-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 8px 10px;
  min-width: 58px;
  max-width: 76px;
  border-radius: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.admin-top-nav-item i {
  font-size: 15px;
  line-height: 1;
  color: inherit;
}

.admin-top-nav-item span {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  word-break: break-all;
}

.admin-top-nav-item:hover {
  color: var(--text);
  background: var(--bg);
}

.admin-top-nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.2);
}

.admin-top-nav-item.active i {
  color: var(--primary);
}

.admin-logout-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 100%);
  flex-shrink: 0;
  text-decoration: none;
  border: 1px solid rgba(254, 202, 202, 0.6);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12);
  transition: transform 0.15s;
}

.admin-logout-btn:active {
  transform: scale(0.96);
}

/* 后台手机端适配 */
@media (max-width: 1024px) {
  .admin-sidebar {
    display: none;
  }
  
  .admin-top-nav {
    display: block;
  }
  
  .admin-main {
    margin-left: 0;
    /* 顶栏为双行图标+文字，需略多留白 */
    padding: 96px 16px 100px;
  }
  
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .admin-stat-card {
    padding: 20px;
  }
  
  .admin-stat-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .admin-stat-value {
    font-size: 24px;
  }
}

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

/* ============================================================
   通用工具类（UI 统一化，替代内联 style）
   ============================================================ */

/* 左边距 */
.ml-8  { margin-left: 8px !important; }
.ml-12 { margin-left: 12px !important; }

/* 间距 */
.mt-0  { margin-top: 0 !important; }
.mt-4  { margin-top: 4px !important; }
.mt-8  { margin-top: 8px !important; }
.mt-12 { margin-top: 12px !important; }
.mt-16 { margin-top: 16px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-24 { margin-top: 24px !important; }
.mb-0  { margin-bottom: 0 !important; }
.mb-4  { margin-bottom: 4px !important; }
.mb-8  { margin-bottom: 8px !important; }
.mb-12 { margin-bottom: 12px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-24 { margin-bottom: 24px !important; }
.py-16 { padding-top: 16px !important; padding-bottom: 16px !important; }
.py-20 { padding-top: 20px !important; padding-bottom: 20px !important; }
.px-16 { padding-left: 16px !important; padding-right: 16px !important; }
.px-20 { padding-left: 20px !important; padding-right: 20px !important; }

/* 文字 */
.text-center { text-align: center !important; }
.text-left   { text-align: left !important; }
.text-right  { text-align: right !important; }
.text-muted  { color: var(--text-muted) !important; }
.text-small  { font-size: 12px !important; }
.text-tiny   { font-size: 11px !important; }
.font-bold   { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }

/* Flex */
.flex       { display: flex !important; }
.flex-col   { flex-direction: column !important; }
.items-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-end    { justify-content: flex-end !important; }
.gap-8  { gap: 8px !important; }
.gap-12 { gap: 12px !important; }
.gap-16 { gap: 16px !important; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* 宽度 */
.w-full    { width: 100% !important; }
.w-auto    { width: auto !important; }
.max-w-sm  { max-width: 420px !important; }

/* 边框 */
.border-none { border: none !important; }
.border-b-0 { border-bottom: none !important; }

/* 图片 */
.img-120 {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 2px solid var(--border);
  object-fit: cover;
}
.img-160 {
  width: 160px;
  border-radius: 12px;
  border: 2px solid var(--border);
}

/* 支付方式徽章 */
.pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
}

/* 收款码展示 */
.qrcode-wrap {
  margin-top: 16px;
}

.qrcode-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* 金额大输入框 */
.input-money {
  font-size: 18px !important;
  font-weight: 600 !important;
}

/* 按钮尺寸变体 */
.btn-sm { padding: 6px 12px !important; font-size: 13px !important; }
.btn-lg { padding: 16px 32px !important; font-size: 16px !important; }

/* 后台管理警告框 */
.admin-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  margin: 0 24px 16px;
}

.admin-alert--warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.admin-alert code {
  background: rgba(0,0,0,0.07);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* 文字颜色 */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: var(--danger) !important; }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.empty-state p {
  margin: 0 0 16px;
  font-size: 15px;
}

/* 统计卡片悬停 */
.stat-box {
  cursor: default;
  user-select: none;
}

/* 表格单元格工具 */
.td-muted { color: var(--text-muted); font-size: 12px; }
.td-center { text-align: center; }
.td-right  { text-align: right; }

/* 快速入口网格 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

/* 筛选标签激活态 */
.filter-tab.active {
  background: var(--primary) !important;
  color: #fff !important;
}

/* 时间区间双列 */
.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ============================================================
   陪玩管理优化样式（追加到 modern.css）
   ============================================================ */

/* 概览统计 */
.admin-overview {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.overview-item {
  flex: 1;
  min-width: 160px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.overview-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.overview-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.overview-icon.blue { background: #eff6ff; color: #3b82f6; }
.overview-icon.green { background: #ecfdf5; color: #10b981; }
.overview-icon.purple { background: #f5f3ff; color: #8b5cf6; }
.overview-icon.orange { background: #fff7ed; color: #f59e0b; }
.overview-info { flex: 1; min-width: 0; }
.overview-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.overview-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* 搜索表单 */
.search-form {
  margin-bottom: 20px;
  padding: 0 4px;
}
.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.search-input-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}
.search-input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s;
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.filter-select {
  padding: 11px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  min-width: 110px;
  color: var(--text);
}
.filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* 表格内用户信息 */
.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-name {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}
.user-nick {
  font-size: 12px;
  color: var(--text-muted);
}

/* 信息标签 */
.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.tag i { font-size: 10px; }
.tag-time { background: #eff6ff; color: #3b82f6; }

.info-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.info-mini i { width: 12px; text-align: center; color: var(--text-muted); font-size: 11px; }

/* 收入统计 */
.income-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.income-count {
  font-size: 11px;
  color: var(--text-muted);
}
.income-amount {
  font-weight: 600;
  color: var(--success);
  font-size: 13px;
}

/* 余额 */
.balance-value {
  font-weight: 600;
  color: var(--primary);
  font-size: 13px;
}

/* 表格页脚 */
.table-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
}

/* 模态框表单 */
.modal-form .modal-body {
  padding: 20px 24px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-divider {
  display: flex;
  align-items: center;
  margin: 20px 0 16px;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* 信息盒 */
.info-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
}
.info-box-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.info-box-label {
  color: var(--text-muted);
  font-size: 13px;
}
.info-box-value {
  font-weight: 600;
  color: var(--text);
}

/* 危险按钮 */
.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

/* 警告按钮 */
.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  color: white;
}
.btn-warning:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* 成功按钮 */
.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* 轮廓按钮 */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--bg);
  border-color: var(--text-muted);
}

/* 响应式 */
@media (max-width: 1024px) {
  .admin-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .overview-item {
    padding: 16px;
    min-width: auto;
  }
  .overview-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .overview-value { font-size: 1.2rem; }
}

@media (max-width: 768px) {
  .search-row { flex-direction: column; }
  .search-input-wrap { min-width: auto; width: 100%; }
  .filter-select { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .modal-content {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px;
    margin: 10px;
  }
  .modal-body {
    padding: 16px;
  }
  .modal-header {
    padding: 16px;
  }
  .admin-overview {
    grid-template-columns: 1fr;
  }
}

/* 后台搜索工具栏 */
.search-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
}
.search-bar { flex: 1; min-width: 200px; }
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-wrap i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 14px;
}
.search-toolbar .search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.search-toolbar .search-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.filter-tags {
  display: flex;
  gap: 4px;
}
.filter-tag {
  padding: 6px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.filter-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-range span { color: var(--text-muted); font-size: 12px; }
.filter-input {
  padding: 7px 10px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
}
.filter-input:focus {
  border-color: var(--primary);
  outline: none;
}
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* 前台日期筛选 */
.date-filter-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
}
.date-input {
  padding: 7px 10px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
}
.date-input:focus { border-color: var(--primary); outline: none; }
.date-filter-inline span { color: var(--text-muted); font-size: 12px; }
.btn-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-clear:hover { background: var(--danger); color: white; }

/* 响应式搜索工具栏 */
@media (max-width: 768px) {
  .search-toolbar { flex-direction: column; align-items: stretch; }
  .search-bar { width: 100%; }
  .filter-tags { overflow-x: auto; padding-bottom: 4px; white-space: nowrap; }
  .date-range { width: 100%; }
  .header-actions { flex-wrap: wrap; }
}

/* 页脚版权信息 */
.page-footer {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.page-footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
