/* 麻将后台 基础样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: #f5f7fa;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶部导航 */
.navbar {
  background: #1f2937;
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}
.navbar .brand { font-weight: 600; font-size: 16px; }
.navbar .menu { display: flex; gap: 24px; }
.navbar .menu a { color: #d1d5db; padding: 4px 0; }
.navbar .menu a:hover, .navbar .menu a.active { color: #fff; text-decoration: none; border-bottom: 2px solid #60a5fa; }
.navbar .user { color: #d1d5db; font-size: 13px; }
.navbar .user a { color: #fca5a5; margin-left: 12px; }

/* 主容器 */
.container {
  max-width: 1280px;
  margin: 24px auto;
  padding: 0 24px;
}
.page-title { font-size: 20px; font-weight: 600; margin-bottom: 16px; color: #111827; }

/* 卡片 */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  padding: 24px;
  margin-bottom: 16px;
}
.card h2 { font-size: 16px; margin-bottom: 16px; color: #111827; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: #374151; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.form-help { font-size: 12px; color: #6b7280; margin-top: 4px; }
.form-row { display: flex; gap: 16px; }
.form-row > .form-group { flex: 1; }

/* 按钮 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  text-align: center;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.table th { background: #f9fafb; color: #374151; font-weight: 600; font-size: 13px; }
.table tr:hover td { background: #f9fafb; }
.table .text-right { text-align: right; }
.table .text-center { text-align: center; }

/* 提示 */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* 登录/Setup 页 */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f2937;
}
.auth-card {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  width: 100%;
  max-width: 380px;
}
.auth-card h1 { font-size: 22px; margin-bottom: 8px; color: #111827; text-align: center; }
.auth-card .subtitle { color: #6b7280; font-size: 13px; text-align: center; margin-bottom: 24px; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.stat-card .label { color: #6b7280; font-size: 13px; margin-bottom: 8px; }
.stat-card .value { font-size: 24px; font-weight: 600; color: #111827; }

/* 工具栏 */
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}
.toolbar input { flex: 1; max-width: 300px; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }

/* 状态徽章 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-expired { background: #fee2e2; color: #991b1b; }
.badge-super { background: #fef3c7; color: #92400e; }
.badge-sub { background: #dbeafe; color: #1e40af; }

/* 弹窗 */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal h3 { font-size: 16px; margin-bottom: 16px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* 卡类型快捷按钮 */
.card-types { display: flex; gap: 8px; margin-bottom: 12px; }
.card-types .card-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
  font-size: 13px;
}
.card-types .card-btn:hover { border-color: #2563eb; color: #2563eb; }
.card-types .card-btn.active { border-color: #2563eb; background: #eff6ff; color: #2563eb; font-weight: 600; }

/* 分页 */
.pagination { display: flex; gap: 4px; margin-top: 16px; justify-content: center; }
.pagination a, .pagination span {
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
}
.pagination a { background: #fff; border: 1px solid #d1d5db; color: #374151; }
.pagination a:hover { background: #f3f4f6; text-decoration: none; }
.pagination .active { background: #2563eb; color: #fff; }
.pagination .disabled { color: #9ca3af; cursor: not-allowed; }
