/* style.css - Xx.CLUB 管理后台样式 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f5f5;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

/* 登录页面 */
.login-body {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  display: flex;
  width: 900px;
  max-width: 95%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, #1a1a1a 0%, #8b0000 100%);
  color: #fff;
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-brand h1 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #d4af37, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-brand p {
  font-size: 16px;
  opacity: 0.8;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.feature-icon {
  font-size: 24px;
}

.login-right {
  flex: 1;
  padding: 60px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form-container {
  width: 100%;
  max-width: 320px;
}

.login-form-container h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.login-desc {
  color: #999;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #1a1a1a 0%, #8b0000 100%);
  color: #fff;
}

.btn-success {
  background: #28a745;
  color: #fff;
}

.btn-warning {
  background: #ffc107;
  color: #333;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-wechat {
  background: #07c160;
  color: #fff;
}

.wechat-icon {
  margin-right: 8px;
}

.login-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #999;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ddd;
}

.login-divider span {
  padding: 0 16px;
}

.login-footer {
  margin-top: 30px;
  text-align: center;
  color: #999;
  font-size: 12px;
}

.login-footer p {
  margin-bottom: 4px;
}

/* 管理后台布局 */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
}

.sidebar-header {
  padding: 30px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  font-size: 28px;
  font-weight: bold;
  background: linear-gradient(90deg, #d4af37, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.logo-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: rgba(212, 175, 55, 0.1);
  border-left-color: #d4af37;
  color: #d4af37;
}

.nav-icon {
  font-size: 18px;
  margin-right: 12px;
}

.nav-text {
  font-size: 14px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
}

/* 顶部栏 */
.topbar {
  background: #fff;
  padding: 16px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a1a 0%, #8b0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.admin-details {
  display: flex;
  flex-direction: column;
}

.admin-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.admin-role {
  font-size: 12px;
  color: #999;
}

.btn-logout {
  background: #f5f5f5;
  color: #666;
  padding: 8px 16px;
}

.btn-logout:hover {
  background: #e5e5e5;
}

/* 内容区 */
.content {
  flex: 1;
  padding: 30px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
}

.page-desc {
  color: #999;
  margin-top: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #d4af37;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.stat-icon.user {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.player {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon.order {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-icon.money {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-icon.withdraw {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stat-icon.profit {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: #999;
  margin-bottom: 4px;
}

.stat-change {
  font-size: 12px;
  color: #28a745;
}

/* 面板 */
.panel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.panel-header {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.panel-body {
  padding: 24px;
}

/* 待办列表 */
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.todo-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #f9f9f9;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.todo-item:hover {
  background: #f0f0f0;
}

.todo-icon {
  font-size: 20px;
  margin-right: 12px;
}

.todo-text {
  flex: 1;
  font-size: 14px;
  color: #333;
}

.todo-badge {
  background: #dc3545;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

/* 图表 */
.chart-container {
  height: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 20px 0;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  width: 100%;
  height: 100%;
}

.bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.bar-value {
  font-size: 12px;
  color: #666;
}

.bar {
  width: 60%;
  max-width: 40px;
  background: linear-gradient(180deg, #d4af37 0%, #8b0000 100%);
  border-radius: 4px 4px 0 0;
  min-height: 10px;
  transition: all 0.3s;
}

.bar-label {
  font-size: 12px;
  color: #999;
}

/* 数据表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.data-table th {
  background: #f9f9f9;
  font-weight: 600;
  color: #666;
  font-size: 13px;
}

.data-table tr:hover {
  background: #f9f9f9;
}

.data-table .empty {
  text-align: center;
  color: #999;
  padding: 40px;
}

/* 徽章 */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.badge.success {
  background: #d4edda;
  color: #155724;
}

.badge.danger {
  background: #f8d7da;
  color: #721c24;
}

.badge.warning {
  background: #fff3cd;
  color: #856404;
}

.badge.info {
  background: #d1ecf1;
  color: #0c5460;
}

.badge.primary {
  background: #cce5ff;
  color: #004085;
}

.badge.default {
  background: #e2e3e5;
  color: #383d41;
}

.badge.intern {
  background: #e2e3e5;
  color: #383d41;
}

.badge.regular {
  background: #d1ecf1;
  color: #0c5460;
}

.badge.senior {
  background: #fff3cd;
  color: #856404;
}

.badge.star {
  background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
  color: #1a1a1a;
}

.badge.super {
  background: linear-gradient(135deg, #1a1a1a 0%, #8b0000 100%);
  color: #fff;
}

.badge.admin {
  background: #cce5ff;
  color: #004085;
}

.badge.finance {
  background: #d4edda;
  color: #155724;
}

.badge.audit {
  background: #fff3cd;
  color: #856404;
}

.badge.operation {
  background: #f8d7da;
  color: #721c24;
}

/* 下拉选择 */
.select-small {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
}

.select-small:focus {
  outline: none;
  border-color: #d4af37;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s;
}

.page-btn:hover:not(.active):not(.disabled) {
  border-color: #d4af37;
  color: #d4af37;
}

.page-btn.active {
  background: linear-gradient(135deg, #1a1a1a 0%, #8b0000 100%);
  color: #fff;
  border-color: transparent;
}

.page-btn.disabled {
  color: #ccc;
  cursor: not-allowed;
}

/* 申请卡片 */
.application-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  margin-bottom: 16px;
}

.app-info h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.app-info p {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
}

.app-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 标签页 */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.tab {
  padding: 12px 24px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
}

.tab:hover {
  color: #d4af37;
}

.tab.active {
  color: #d4af37;
  border-bottom-color: #d4af37;
  font-weight: 500;
}

/* 设置表单 */
.settings-form {
  max-width: 600px;
}

.settings-form .form-group {
  margin-bottom: 20px;
}

.form-actions {
  margin-top: 30px;
}

/* 加载和空状态 */
.loading {
  text-align: center;
  padding: 60px;
  color: #999;
  font-size: 16px;
}

.empty {
  text-align: center;
  padding: 40px;
  color: #999;
}

.error {
  text-align: center;
  padding: 40px;
  color: #dc3545;
}

.text-muted {
  color: #999;
}

/* 响应式 */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
  }
  
  .login-left {
    display: none;
  }
  
  .sidebar {
    width: 60px;
  }
  
  .sidebar-header,
  .nav-text,
  .sidebar-footer {
    display: none;
  }
  
  .main-content {
    margin-left: 60px;
  }
  
  .panel-row {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* 陪玩申请：身份证正反面 */
.id-card-row {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.id-card-img {
  width: 180px;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fafafa;
}

.id-card-empty {
  display: inline-block;
  padding: 30px 18px;
  border: 1px dashed #ddd;
  border-radius: 8px;
  color: #999;
  font-size: 12px;
}

/* 订单详情 */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px 28px;
}
.detail-grid > div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #eee;
  padding-bottom: 8px;
}
.detail-grid span { color: #888; font-size: 13px; }
.detail-grid b { color: #222; font-weight: 600; }

/* 实名资料弹窗 */
.link-btn { cursor: pointer; }
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.modal-box { background: #fff; border-radius: 12px; padding: 24px; width: 720px; max-width: 92vw; max-height: 88vh; overflow: auto; }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.id-info div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f2f2f2; font-size: 14px; }
.id-info span { color: #888; }
.id-cards { display: flex; gap: 16px; margin-top: 18px; }
.id-card { flex: 1; }
.id-card-label { font-size: 13px; color: #666; margin-bottom: 8px; }
.id-card img { width: 100%; border-radius: 8px; border: 1px solid #eee; cursor: zoom-in; }
.id-empty { height: 160px; display: flex; align-items: center; justify-content: center; background: #fafafa; border: 1px dashed #ddd; border-radius: 8px; color: #aaa; font-size: 14px; }
.modal-actions { margin-top: 20px; text-align: right; }

/* 编辑表单弹窗 */
.edit-form { max-height: 60vh; overflow: auto; }
.ef-row { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid #f4f4f4; }
.ef-row span { width: 120px; color: #666; font-size: 14px; }
.ef-row input, .ef-row select { flex: 1; height: 34px; border: 1px solid #ddd; border-radius: 6px; padding: 0 10px; font-size: 14px; }

/* 仪表盘卡片可点击 */
.stat-card.clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.stat-card.clickable:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.08); }

/* 收支明细金额 */
.data-table td.in { color: #27ae60; font-weight: 600; }
.data-table td.out { color: #e74c3c; font-weight: 600; }
