/* 管理后台样式：对齐 my-auth-web-custom v1.1.5（Vue Ant Design Pro），不依赖用户后台 app.css */
*, *::before, *::after { box-sizing: border-box; }
body.admin-page {
  margin: 0;
  background: #f0f2f5;
  color: rgba(0,0,0,.65);
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
}
.admin-container { display: flex; min-height: 100vh; width: 100%; }
.admin-main { 
  flex: 1; 
  overflow: auto; 
  padding: 0; 
  min-width: 200px; 
  background: #f0f2f5; 
  margin-top: 56px;
  margin-left: 220px;
}

/* ========== 后台所有选择框统一样式（圆角、蓝框聚焦、下拉浅灰/悬停浅蓝） ========== */
.admin-page select {
  padding: 4px 11px;
  padding-right: 32px;
  height: 32px;
  min-height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: rgba(0,0,0,.65);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(0,0,0,.45)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.admin-page select:hover {
  border-color: #40a9ff;
}
.admin-page select:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.admin-page select option {
  background: #fff !important;
  color: rgba(0,0,0,.65) !important;
}
.admin-page select option:checked {
  background: #f5f5f5 !important;
  color: rgba(0,0,0,.85) !important;
}
.admin-page select option:hover {
  background: #e6f7ff !important;
  color: rgba(0,0,0,.85) !important;
}

/* ========== 输入框 / 文本域 / 按钮 / 表格 ========== */
.admin-content .form-group label,
.admin-modal .form-group label {
  font-weight: 400;
  font-size: 14px;
  color: rgba(0,0,0,.85);
  margin-bottom: 6px;
}
.admin-content .form-group input,
.admin-content .form-group textarea,
.admin-modal .form-group input,
.admin-modal .form-group textarea {
  padding: 4px 11px;
  height: 32px;
  min-height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: rgba(0,0,0,.65);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-content .form-group input:hover,
.admin-modal .form-group input:hover {
  border-color: #40a9ff;
}
.admin-content .form-group textarea,
.admin-modal .form-group textarea {
  height: auto;
  min-height: 60px;
  padding: 6px 11px;
}
.admin-content .form-group input:focus,
.admin-content .form-group textarea:focus,
.admin-modal .form-group input:focus,
.admin-modal .form-group textarea:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.admin-content .form-group select,
.admin-modal .form-group select {
  /* 与 .admin-page select 一致，表单内选择框同高同圆角 */
  height: 32px;
  min-height: 32px;
  border-radius: 4px;
}
.admin-content .form-group input::placeholder,
.admin-content .form-group textarea::placeholder,
.admin-modal .form-group input::placeholder,
.admin-modal .form-group textarea::placeholder { color: rgba(0,0,0,.45); }
/* 按钮：Ant Design 主色 #1890ff，默认白底 #d9d9d9 描边，高度 32px */
.admin-content .btn,
.admin-modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 15px;
  height: 32px;
  line-height: 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  box-sizing: border-box;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  vertical-align: middle;
}
.admin-content .btn-primary,
.admin-modal .btn-primary {
  background: #1890ff;
  color: #fff;
  border: 1px solid #1890ff;
}
.admin-content .btn-primary:hover,
.admin-modal .btn-primary:hover {
  background: #40a9ff;
  border-color: #40a9ff;
  color: #fff;
  transform: none;
}
.admin-content .btn-secondary,
.admin-modal .btn-secondary {
  background: #fff;
  color: rgba(0,0,0,.65);
  border: 1px solid #d9d9d9;
}
.admin-content .btn-secondary:hover,
.admin-modal .btn-secondary:hover {
  background: #fff;
  border-color: #1890ff;
  color: #1890ff;
  transform: none;
}
.admin-content .btn-danger,
.admin-modal .btn-danger {
  background: #ff4d4f;
  color: #fff;
  border: 1px solid #ff4d4f;
}
.admin-content .btn-danger:hover,
.admin-modal .btn-danger:hover {
  background: #ff7875;
  border-color: #ff7875;
  color: #fff;
  transform: none;
}
.admin-content .btn-warning,
.admin-modal .btn-warning {
  background: #faad14;
  color: #fff;
  border: 1px solid #faad14;
}
.admin-content .btn-warning:hover,
.admin-modal .btn-warning:hover {
  background: #ffc53d;
  border-color: #ffc53d;
  color: #fff;
  transform: none;
}
/* 表格：Ant Design 表头 #fafafa，边框 #e8e8e8 */
.admin-content .admin-table,
.admin-content .admin-table-wrap {
  border-radius: 4px;
  overflow: hidden;
}
.admin-content .admin-table thead th {
  background: #fafafa;
  color: rgba(0,0,0,.85);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 12px;
  border-bottom: 1px solid #e8e8e8;
}
.admin-content .admin-table tbody tr { transition: background 0.15s; }
.admin-content .admin-table tbody tr:hover { background: #fafafa; }
.admin-content .admin-table tbody td {
  padding: 4px 12px;
  border-bottom: 1px solid #e8e8e8;
  font-size: 14px;
  color: rgba(0,0,0,.65);
  line-height: 1.25;
}
.admin-content .admin-table tbody tr:last-child td { border-bottom: none; }
.admin-content .admin-table-wrap { border: 1px solid #e8e8e8; }
.admin-content .admin-card {
  border-radius: 4px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
}
.admin-modal {
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  background: #fff;
  padding: 0;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.admin-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
  background: linear-gradient(135deg, #fafafa 0%, #fff 100%);
}
.admin-modal-icon {
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.admin-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(0,0,0,.85);
  line-height: 24px;
  height: 24px;
  display: flex;
  align-items: center;
}
.admin-modal .admin-modal-form {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.admin-modal .admin-modal-actions {
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.admin-modal .admin-modal-actions .btn {
  margin: 0;
  padding: 8px 20px;
  font-weight: 500;
}
.admin-modal-card-type {
  max-width: 420px;
}
.admin-modal-agent {
  max-width: 420px;
}
.admin-modal-balance {
  max-width: 420px;
}
.admin-modal-card-type .form-group {
  margin-bottom: 16px;
}
.admin-modal-card-type .form-group:last-child {
  margin-bottom: 0;
}
.admin-modal-card-type .form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: rgba(0,0,0,.75);
  margin-bottom: 8px;
}
.admin-modal-card-type .label-icon {
  font-size: 14px;
}
.admin-modal-card-type .form-group input,
.admin-modal-card-type .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  height: auto;
  min-height: 40px;
  line-height: 1.5;
}
.admin-modal-card-type .form-group input:hover,
.admin-modal-card-type .form-group select:hover {
  border-color: #40a9ff;
}
.admin-modal-card-type .form-group input:focus,
.admin-modal-card-type .form-group select:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
  outline: none;
}
.admin-modal-card-type .form-group input::placeholder {
  color: rgba(0,0,0,.35);
}
.admin-modal-generate {
  max-width: 420px;
}
.admin-modal-generate .form-group {
  margin-bottom: 16px;
}
.admin-modal-generate .form-group:last-child {
  margin-bottom: 0;
}
.admin-modal-generate .form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: rgba(0,0,0,.75);
  margin-bottom: 8px;
}
.admin-modal-generate .form-group input,
.admin-modal-generate .form-group select,
.admin-modal-generate .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  height: auto;
  min-height: 40px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
}
.admin-modal-generate .form-group input:hover,
.admin-modal-generate .form-group select:hover,
.admin-modal-generate .form-group textarea:hover {
  border-color: #40a9ff;
}
.admin-modal-generate .form-group input:focus,
.admin-modal-generate .form-group select:focus,
.admin-modal-generate .form-group textarea:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
  outline: none;
}
.admin-modal-edit-card {
  max-width: 420px;
}
.admin-modal-edit-card .form-group {
  margin-bottom: 16px;
}
.admin-modal-edit-card .form-group:last-child {
  margin-bottom: 0;
}
.admin-modal-edit-card .form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: rgba(0,0,0,.75);
  margin-bottom: 8px;
}
.admin-modal-edit-card .form-group input,
.admin-modal-edit-card .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  height: auto;
  min-height: 40px;
  line-height: 1.5;
  box-sizing: border-box;
}
.admin-modal-edit-card .form-group input:hover,
.admin-modal-edit-card .form-group select:hover {
  border-color: #40a9ff;
}
.admin-modal-edit-card .form-group input:focus,
.admin-modal-edit-card .form-group select:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
  outline: none;
}
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  box-shadow: 2px 0 8px 0 rgba(29,35,41,.05);
  display: flex;
  flex-direction: column;
  padding-top: 0;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 101;
}
.admin-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: 56px;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 16px;
}
.admin-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: #1890ff;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: contain;
}
.admin-logo-text { font-weight: 600; font-size: 16px; color: rgba(0,0,0,.85); }
.admin-nav { flex: 1; }
.admin-nav-item {
  display: block;
  padding: 10px 20px;
  color: rgba(0,0,0,.65);
  text-decoration: none;
  font-size: 14px;
  border-radius: 8px;
  margin: 2px 12px;
  transition: background 0.2s, color 0.2s;
}
.admin-nav-item:hover { background: rgba(0,0,0,.04); color: rgba(0,0,0,.85); }
.admin-nav-item.active { background: #e6f7ff; color: #1890ff; }
.admin-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #e8e8e8;
  font-size: 13px;
  color: rgba(0,0,0,.45);
}
.admin-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 220px;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}
.admin-header-left {
  display: flex;
  align-items: center;
}
.admin-greeting {
  font-size: 14px;
  color: rgba(0,0,0,.65);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-greeting-icon {
  font-size: 16px;
}
.admin-header-right {
  display: flex;
  align-items: center;
}
.admin-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 12px;
  margin: -8px -12px;
  border-radius: 8px;
  transition: background 0.2s;
  position: relative;
}
.admin-user-info:hover {
  background: rgba(0,0,0,.04);
}
.admin-avatar-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.admin-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}
.admin-username {
  flex: 1;
  color: rgba(0,0,0,.85);
  font-weight: 500;
}
.admin-dropdown-arrow {
  transition: transform 0.2s;
  color: rgba(0,0,0,.45);
}
.admin-user-info:hover .admin-dropdown-arrow {
  color: rgba(0,0,0,.65);
}
.admin-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  margin-top: 8px;
  padding: 8px 0;
  display: none;
  z-index: 1000;
  min-width: 160px;
}
.admin-dropdown-menu.show {
  display: block;
}
.admin-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(0,0,0,.85);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.admin-dropdown-item:hover {
  background: #f5f5f5;
}
.admin-dropdown-item svg {
  color: rgba(0,0,0,.45);
  flex-shrink: 0;
}
.admin-dropdown-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 8px 0;
}
.admin-dropdown-logout {
  color: #ff4d4f;
}
.admin-dropdown-logout svg {
  color: #ff4d4f;
}
.admin-dropdown-logout:hover {
  background: #fff1f0;
}
.admin-logout { color: #1890ff; margin-left: 8px; text-decoration: none; }
.admin-logout:hover { text-decoration: underline; }
.admin-content { width: 100%; max-width: none; padding: 24px; box-sizing: border-box; }
.admin-content a { color: #1890ff; text-decoration: none; transition: color 0.2s; }
.admin-content a:hover { color: #40a9ff; }
.admin-content a:active { color: #096dd9; }
.admin-loading { color: rgba(0,0,0,.45); }
.admin-page-title { font-size: 20px; margin-bottom: 20px; font-weight: 500; color: rgba(0,0,0,.85); }
.admin-content-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #e8e8e8;
}
.admin-tab-btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(0,0,0,.45);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.admin-tab-btn:hover { color: rgba(0,0,0,.85); }
.admin-tab-btn.active { color: #1890ff; border-bottom-color: #1890ff; }
.admin-tab-content { margin-top: 0; }
.admin-card {
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
}
.admin-card h3 { font-size: 16px; margin-bottom: 16px; color: rgba(0,0,0,.85); font-weight: 500; }

/* 首页设置:多卡片网格布局 */
.home-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 900px) {
  .home-cards-grid { grid-template-columns: 1fr; }
}
.home-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.home-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1890ff;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.home-card .form-group { margin-bottom: 14px; }
.home-card .form-group:last-child { margin-bottom: 0; }
.home-card-full { grid-column: 1 / -1; }

/* 控制台统计卡片 */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  flex-shrink: 0;
}
.stat-card .stat-icon svg {
  width: 24px;
  height: 24px;
  color: rgba(0,0,0,.45);
}
.stat-card .stat-content {
  flex: 1;
  min-width: 0;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 600;
  color: rgba(0,0,0,.85);
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 14px;
  color: rgba(0,0,0,.45);
  margin-top: 4px;
}
.stat-card.stat-primary .stat-icon {
  background: #e6f7ff;
}
.stat-card.stat-primary .stat-icon svg {
  color: #1890ff;
}
.stat-card.stat-success .stat-icon {
  background: #f6ffed;
}
.stat-card.stat-success .stat-icon svg {
  color: #52c41a;
}
.stat-card.stat-info .stat-icon {
  background: #e6fffb;
}
.stat-card.stat-info .stat-icon svg {
  color: #13c2c2;
}
.stat-card.stat-warning .stat-icon {
  background: #fffbe6;
}
.stat-card.stat-warning .stat-icon svg {
  color: #faad14;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.admin-stat-item {
  padding: 16px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e8e8e8;
}
.admin-stat-value { font-size: 24px; font-weight: 600; color: rgba(0,0,0,.85); }
.admin-stat-label { font-size: 14px; color: rgba(0,0,0,.45); margin-top: 4px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th,
.admin-table td {
  padding: 6px 12px;
  text-align: left;
  border: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  line-height: 1.35;
}
.admin-table th { color: rgba(0,0,0,.85); font-weight: 500; }
.admin-table td { color: rgba(0,0,0,.65); }
/* 公告管理：所有列靠左对齐，标题列可占满剩余空间 */
.admin-table-announcements th:nth-child(3),
.admin-table-announcements th:nth-child(4),
.admin-table-announcements th:nth-child(5),
.admin-table-announcements td:nth-child(3),
.admin-table-announcements td:nth-child(4),
.admin-table-announcements td:nth-child(5) {
  text-align: left;
  white-space: nowrap;
  padding-left: 12px;
}
.admin-table-announcements th:nth-child(2),
.admin-table-announcements td:nth-child(2) {
  min-width: 0;
  max-width: none;
}
/* 广告表格：列宽与对齐稳定，避免排版错乱 */
.admin-table-ads th:nth-child(1),
.admin-table-ads td:nth-child(1) { width: 48px; text-align: left; }
.admin-table-ads th:nth-child(2),
.admin-table-ads td:nth-child(2) { min-width: 140px; word-break: break-word; }
.admin-table-ads th:nth-child(3),
.admin-table-ads td:nth-child(3) { min-width: 90px; word-break: break-all; }
.admin-table-ads th:nth-child(4),
.admin-table-ads th:nth-child(5),
.admin-table-ads th:nth-child(6),
.admin-table-ads th:nth-child(7),
.admin-table-ads td:nth-child(4),
.admin-table-ads td:nth-child(5),
.admin-table-ads td:nth-child(6),
.admin-table-ads td:nth-child(7) {
  min-width: 72px;
  text-align: left;
  white-space: nowrap;
  padding-left: 12px;
}
/* 广告表每行统一垂直居中，保证「是否加粗」与「字体颜色」在同一竖排不上下错位 */
.admin-table-ads tbody td {
  vertical-align: middle;
  line-height: 1.5;
}
.admin-table-ads tbody td > * {
  vertical-align: middle;
}
.admin-table-ads td.admin-ad-color-cell {
  vertical-align: middle;
  text-align: left;
  line-height: 22px;
}
.admin-table-ads .admin-ad-color-cell .admin-ad-color-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  vertical-align: middle;
  margin-right: 6px;
}
.admin-table-ads .admin-ad-color-cell span:not(.admin-ad-color-swatch) {
  vertical-align: middle;
  line-height: 22px;
  display: inline-block;
}
/* 账号管理表格：表头表体居中，表头字体与页面一致、不竖排 */
.admin-table-accounts thead th {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  white-space: nowrap;
}
.admin-table-accounts th,
.admin-table-accounts td { text-align: center; }
.admin-table-accounts th:nth-child(1),
.admin-table-accounts td:nth-child(1) { width: 40px; padding-left: 8px; padding-right: 8px; }
.admin-table-accounts th:nth-child(2),
.admin-table-accounts td:nth-child(2) { width: 48px; }
.admin-table-accounts th:nth-child(3),
.admin-table-accounts td:nth-child(3) { min-width: 100px; word-break: break-word; }
.admin-table-accounts th:nth-child(4),
.admin-table-accounts th:nth-child(5),
.admin-table-accounts td:nth-child(4),
.admin-table-accounts td:nth-child(5) {
  min-width: 72px;
  white-space: nowrap;
  padding-left: 12px;
  padding-right: 12px;
}
.admin-table-accounts td:nth-child(4),
.admin-table-accounts td:nth-child(5) { word-break: break-all; white-space: normal; }
.admin-table-accounts th:nth-child(6),
.admin-table-accounts th:nth-child(7),
.admin-table-accounts th:nth-child(8),
.admin-table-accounts th:nth-child(9),
.admin-table-accounts td:nth-child(6),
.admin-table-accounts td:nth-child(7),
.admin-table-accounts td:nth-child(8),
.admin-table-accounts td:nth-child(9) { min-width: 56px; padding-left: 4px; padding-right: 4px; }
.admin-table-accounts th:nth-child(10),
.admin-table-accounts td:nth-child(10) { min-width: 60px; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.admin-table-accounts tbody td { vertical-align: middle; line-height: 1.5; }
.admin-table-accounts tbody td > * { vertical-align: middle; }

/* 用户管理表格：ID固定宽度，其他列按内容分配宽度 */
.admin-table-users thead th {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  white-space: nowrap;
}
.admin-table-users th,
.admin-table-users td { text-align: center; }
.admin-table-users th:nth-child(1),
.admin-table-users td:nth-child(1) { width: 40px; }
.admin-table-users th:nth-child(2),
.admin-table-users td:nth-child(2) { width: 50px; }
.admin-table-users th:nth-child(3),
.admin-table-users td:nth-child(3) { min-width: 110px; }
.admin-table-users th:nth-child(4),
.admin-table-users td:nth-child(4) { min-width: 110px; }
.admin-table-users th:nth-child(5),
.admin-table-users td:nth-child(5) { min-width: 150px; white-space: nowrap; }
.admin-table-users th:nth-child(6),
.admin-table-users td:nth-child(6) { min-width: 70px; white-space: nowrap; }
.admin-table-users th:nth-child(7),
.admin-table-users td:nth-child(7) { min-width: 150px; white-space: nowrap; }
.admin-table-users th:nth-child(8),
.admin-table-users td:nth-child(8) { min-width: 70px; white-space: nowrap; }
.admin-table-users th:nth-child(9),
.admin-table-users td:nth-child(9) { min-width: 160px; }
.admin-table-users tbody td { vertical-align: middle; line-height: 1.5; }
.admin-table-users tbody td > * { vertical-align: middle; }
.admin-table-users .expire-badge,
.admin-table-users .user-status,
.admin-table-users .online-status { white-space: nowrap; flex-wrap: nowrap; }
.expire-expired { color: #ff4d4f; font-weight: 500; }

/* 版本管理表格 */
.admin-table-versions th,
.admin-table-versions td { text-align: center; }
.admin-table-versions th:nth-child(1),
.admin-table-versions td:nth-child(1) { width: 40px; }
.admin-table-versions th:nth-child(2),
.admin-table-versions td:nth-child(2) { width: 50px; }
.admin-table-versions th:nth-child(3),
.admin-table-versions td:nth-child(3) { min-width: 80px; white-space: nowrap; }
.admin-table-versions th:nth-child(4),
.admin-table-versions td:nth-child(4) { min-width: 120px; white-space: nowrap; }
.admin-table-versions th:nth-child(5),
.admin-table-versions td:nth-child(5) { min-width: 80px; white-space: nowrap; }
.admin-table-versions th:nth-child(6),
.admin-table-versions td:nth-child(6) { min-width: 150px; white-space: nowrap; }
.admin-table-versions th:nth-child(7),
.admin-table-versions td:nth-child(7) { min-width: 160px; }
.admin-table-versions tbody td { vertical-align: middle; line-height: 1.5; }
.admin-table-versions tbody td > * { vertical-align: middle; }
.admin-table-versions .expire-badge { white-space: nowrap; flex-wrap: nowrap; }

/* 回复管理表格 */
.admin-table-replies th,
.admin-table-replies td { text-align: center; }
.admin-table-replies th:nth-child(1),
.admin-table-replies td:nth-child(1) { width: 40px; }
.admin-table-replies th:nth-child(2),
.admin-table-replies td:nth-child(2) { width: 50px; }
.admin-table-replies th:nth-child(3),
.admin-table-replies td:nth-child(3) { min-width: 80px; }
.admin-table-replies th:nth-child(4),
.admin-table-replies td:nth-child(4) { min-width: 120px; }
.admin-table-replies th:nth-child(5),
.admin-table-replies td:nth-child(5) { min-width: 80px; }
.admin-table-replies th:nth-child(6),
.admin-table-replies td:nth-child(6) { min-width: 140px; }
.admin-table-replies th:nth-child(7),
.admin-table-replies td:nth-child(7) { min-width: 160px; }
.admin-table-replies tbody td { vertical-align: middle; line-height: 1.5; }
.admin-table-replies tbody td > * { vertical-align: middle; }

/* 在线状态样式 */
.online-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.online-status .online-dot,
.online-status .offline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.online-status.online {
  background: linear-gradient(135deg, #e6fffa 0%, #d4edda 100%);
  color: #155724;
  border: 1px solid #b7ebc6;
}
.online-status.online .online-dot {
  background: #52c41a;
  box-shadow: 0 0 6px #52c41a;
  animation: pulse 1.5s infinite;
}
.online-status.offline {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  color: rgba(0,0,0,.45);
  border: 1px solid #d9d9d9;
}
.online-status.offline .offline-dot {
  background: #d9d9d9;
}

/* 卡密管理表格样式 */
.admin-table-cards thead th {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  white-space: nowrap;
}
.admin-table-cards th,
.admin-table-cards td { text-align: left; }
.admin-table-cards th:nth-child(1),
.admin-table-cards td:nth-child(1) { width: 3%; }
.admin-table-cards th:nth-child(2),
.admin-table-cards td:nth-child(2) { width: 5%; }
.admin-table-cards th:nth-child(3),
.admin-table-cards td:nth-child(3) { width: 13%; }
.admin-table-cards th:nth-child(4),
.admin-table-cards td:nth-child(4) { width: 11%; }
.admin-table-cards th:nth-child(5),
.admin-table-cards td:nth-child(5) { width: 7%; }
.admin-table-cards th:nth-child(6),
.admin-table-cards td:nth-child(6) { width: 9%; }
.admin-table-cards th:nth-child(7),
.admin-table-cards td:nth-child(7) { width: 14%; }
.admin-table-cards th:nth-child(8),
.admin-table-cards td:nth-child(8) { width: 11%; }
.admin-table-cards th:nth-child(9),
.admin-table-cards td:nth-child(9) { width: 11%; }
.admin-table-cards th:nth-child(10),
.admin-table-cards td:nth-child(10) { width: 11%; }
.admin-table-cards th:nth-child(11),
.admin-table-cards td:nth-child(11) { width: 5%; min-width: 80px; }
.admin-table-cards tbody td { vertical-align: middle; line-height: 1.5; }
.admin-table-cards tbody td > * { vertical-align: middle; }
.admin-table-cards .days-badge,
.admin-table-cards .user-status,
.admin-table-cards .expire-badge { white-space: nowrap; flex-wrap: nowrap; }

/* 卡密状态样式 */
.card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.card-status .status-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.card-status.status-unused {
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
  color: #0050b3;
  border: 1px solid #91d5ff;
}
.card-status.status-unused .status-icon {
  background: #1890ff;
  color: #fff;
}
.card-status.status-used {
  background: linear-gradient(135deg, #f6ffed 0%, #d4edda 100%);
  color: #155724;
  border: 1px solid #b7ebc6;
}
.card-status.status-used .status-icon {
  background: #52c41a;
  color: #fff;
}

/* 卡密类型徽章 */
.card-type-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #f0f2f5;
  border-radius: 4px;
  font-size: 12px;
  color: rgba(0,0,0,.65);
}

.ct-name-icon {
  margin-right: 6px;
}

.days-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #1890ff;
}

.days-permanent {
  background: linear-gradient(135deg, #f0f5ff 0%, #d6e4ff 100%);
  color: #1d39c4;
  border: 1px solid #adc6ff;
}

.days-icon {
  margin-right: 4px;
}

.text-price {
  color: #52c41a;
  font-weight: 500;
}

.price-icon {
  margin-right: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 4px;
}

.badge-icon {
  margin-right: 4px;
}

.text-muted {
  color: rgba(0,0,0,.45);
}

/* 卡密类型弹窗样式 */
.admin-modal-card-types {
  width: 700px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
}
.card-type-form {
  background: #fafafa;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.card-type-form-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.card-type-form-row .form-group {
  margin-bottom: 0;
}
.card-type-form-row .form-group label {
  display: block;
  font-size: 12px;
  color: rgba(0,0,0,.45);
  margin-bottom: 4px;
}
.card-type-form-row .form-group input,
.card-type-form-row .form-group select {
  width: 100%;
  height: 32px;
  padding: 4px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  box-sizing: border-box;
}
.card-type-form-row .form-group input:focus,
.card-type-form-row .form-group select:focus {
  border-color: #1890ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.card-type-form .btn {
  width: 100%;
}
.card-type-form-actions {
  display: flex;
  gap: 8px;
}
.card-type-form-actions .btn {
  flex: 1;
}
.btn-default {
  background: #fff;
  border: 1px solid #d9d9d9;
  color: rgba(0,0,0,.65);
}
.btn-default:hover {
  border-color: #1890ff;
  color: #1890ff;
}

/* 标签页样式 */
.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #e8e8e8;
}
.admin-tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0,0,0,.65);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-tab:hover {
  color: #1890ff;
}
.admin-tab.active {
  color: #1890ff;
  border-bottom-color: #1890ff;
}
.admin-tab-content {
  display: none;
}
.admin-tab-content.active {
  display: block;
}

/* 卡密类型工具栏 */
.card-type-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
}
.card-type-toolbar .card-type-list-header {
  margin: 0;
}
.btn-add-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
  transition: all 0.2s ease;
}
.btn-add-type:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(24, 144, 255, 0.3);
}
.card-type-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 6px;
  flex-wrap: wrap;
}
.card-type-filter-row .admin-account-filter-input,
.card-type-filter-row .admin-account-filter-select {
  height: 32px;
  padding: 4px 12px;
  font-size: 14px;
  box-sizing: border-box;
  vertical-align: middle;
  margin: 0;
}
.card-type-filter-row .btn {
  height: 32px;
  padding: 4px 16px;
  margin: 0;
  flex-shrink: 0;
}
.card-type-list {
  margin-top: 16px;
}
.card-type-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0,0,0,.85);
}
.card-type-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 8px;
  margin-left: 8px;
  font-size: 12px;
  color: #1890ff;
  font-weight: 600;
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
  border-radius: 10px;
}
.admin-modal-table-wrap {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
}
.admin-modal-table-wrap .admin-table {
  margin: 0;
}
.admin-modal-table-wrap .admin-table th {
  background: #fafafa;
  font-weight: 500;
  color: rgba(0,0,0,.65);
}
.admin-modal-table-wrap .admin-table th,
.admin-modal-table-wrap .admin-table td {
  padding: 10px 12px;
  font-size: 13px;
  text-align: left;
}
.admin-modal-table-wrap .admin-table td strong {
  color: rgba(0,0,0,.85);
}
.badge-success {
  background: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7ebc6;
}
.badge-default {
  background: #f5f5f5;
  color: rgba(0,0,0,.45);
  border: 1px solid #d9d9d9;
}
.btn-sm {
  padding: 2px 8px;
  font-size: 12px;
  height: auto;
}
.ct-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ct-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ct-actions .btn {
  white-space: nowrap;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.ct-actions .btn:hover {
  transform: translateY(-1px);
}
.ct-actions .btn-secondary {
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  border: 1px solid #d9d9d9;
  color: rgba(0,0,0,.65);
}
.ct-actions .btn-secondary:hover {
  background: linear-gradient(135deg, #e6e6e6 0%, #d6d6d6 100%);
  border-color: #b3b3b3;
}
.ct-actions .btn-danger {
  background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
  border: 1px solid #ff4d4f;
  box-shadow: 0 2px 4px rgba(255, 77, 79, 0.2);
}
.ct-actions .btn-danger:hover {
  background: linear-gradient(135deg, #ff7875 0%, #ffa39e 100%);
  box-shadow: 0 4px 8px rgba(255, 77, 79, 0.3);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 用户状态徽章 */
.user-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.user-status .status-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.status-active {
  background: linear-gradient(135deg, #e6fffa 0%, #d4edda 100%);
  color: #155724;
  border: 1px solid #b7ebc6;
}
.status-active .status-icon {
  background: #52c41a;
  color: #fff;
}
.status-banned {
  background: linear-gradient(135deg, #fff2f0 0%, #ffccc7 100%);
  color: #a61c4e;
  border: 1px solid #ffa39e;
}
.status-banned .status-icon {
  background: #ff4d4f;
  color: #fff;
}

/* 用户表格单元格样式 */
.admin-table-users .cell-id {
  display: inline-block;
  padding: 2px 8px;
  background: #f0f2f5;
  border-radius: 4px;
  font-family: SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  color: #666;
}
.admin-table-users .cell-qq {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
}
.admin-table-users .qq-icon {
  font-size: 14px;
}
.admin-table-users .cell-bot {
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
  color: #0050b3;
}
.admin-table-users .cell-owner {
  background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%);
  color: #ad6800;
}

/* 到期时间样式 */
.expire-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
}
.expire-badge .expire-icon {
  font-size: 12px;
}
.expire-active {
  background: linear-gradient(135deg, #e6fffa 0%, #d4edda 100%);
  color: #155724;
  border: 1px solid #b7ebc6;
}
.expire-warning {
  background: linear-gradient(135deg, #fffbe6 0%, #ffe7ba 100%);
  color: #ad6800;
  border: 1px solid #ffd591;
}
.expire-expired {
  background: linear-gradient(135deg, #fff2f0 0%, #ffccc7 100%);
  color: #a61c4e;
  border: 1px solid #ffa39e;
}
.expire-permanent {
  background: linear-gradient(135deg, #f0f5ff 0%, #d6e4ff 100%);
  color: #1d39c4;
  border: 1px solid #adc6ff;
  font-weight: 500;
}

/* 代理管理表格样式 */
.admin-table-agents thead th {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  white-space: nowrap;
  font-size: 14px;
  padding: 12px 16px;
}
.admin-table-agents th,
.admin-table-agents td { text-align: center; }
.admin-table-agents th:nth-child(1),
.admin-table-agents td:nth-child(1) { width: 60px; }
.admin-table-agents th:nth-child(2),
.admin-table-agents td:nth-child(2) { min-width: 100px; white-space: nowrap; }
.admin-table-agents th:nth-child(3),
.admin-table-agents td:nth-child(3) { min-width: 140px; white-space: nowrap; }
.admin-table-agents th:nth-child(4),
.admin-table-agents td:nth-child(4) { min-width: 100px; white-space: nowrap; }
.admin-table-agents th:nth-child(5),
.admin-table-agents td:nth-child(5) { min-width: 80px; white-space: nowrap; }
.admin-table-agents th:nth-child(6),
.admin-table-agents td:nth-child(6) { min-width: 100px; white-space: nowrap; }
.admin-table-agents th:nth-child(7),
.admin-table-agents td:nth-child(7) { min-width: 80px; white-space: nowrap; }
.admin-table-agents th:nth-child(8),
.admin-table-agents td:nth-child(8) { min-width: 150px; white-space: nowrap; }
.admin-table-agents th:nth-child(9),
.admin-table-agents td:nth-child(9) { min-width: 160px; }
.admin-table-agents tbody td { vertical-align: middle; line-height: 1.5; }
.admin-table-agents tbody td > * { vertical-align: middle; }
.admin-table-agents .price-badge,
.admin-table-agents .days-badge,
.admin-table-agents .expire-badge { white-space: nowrap; flex-wrap: nowrap; }

/* 代理管理单元格样式 */
.admin-table-agents .cell-id {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #f0f2f5 0%, #e8e8e8 100%);
  border-radius: 6px;
  font-family: SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}
.admin-table-agents .cell-account {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: rgba(0,0,0,.85);
}
.admin-table-agents .cell-email {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(0,0,0,.65);
}

/* 余额徽章样式 */
.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #52c41a;
  border: 1px solid #b7ebc6;
}
.price-badge .price-icon {
  font-size: 14px;
}

/* 折扣徽章样式 */
.discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #1890ff;
  border: 1px solid #91d5ff;
}

/* 代理日志表格样式 */
.admin-table-agent-logs thead th {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  white-space: nowrap;
  font-size: 13px;
  padding: 10px 12px;
}
.admin-table-agent-logs th,
.admin-table-agent-logs td { text-align: center; }
.admin-table-agent-logs th:nth-child(1),
.admin-table-agent-logs td:nth-child(1) { width: 60px; }
.admin-table-agent-logs th:nth-child(2),
.admin-table-agent-logs td:nth-child(2) { min-width: 100px; white-space: nowrap; }
.admin-table-agent-logs th:nth-child(3),
.admin-table-agent-logs td:nth-child(3) { min-width: 100px; white-space: nowrap; }
.admin-table-agent-logs th:nth-child(4),
.admin-table-agent-logs td:nth-child(4) { min-width: 100px; white-space: nowrap; }
.admin-table-agent-logs th:nth-child(5),
.admin-table-agent-logs td:nth-child(5) { min-width: 100px; white-space: nowrap; }
.admin-table-agent-logs th:nth-child(6),
.admin-table-agent-logs td:nth-child(6) { min-width: 100px; white-space: nowrap; }
.admin-table-agent-logs th:nth-child(7),
.admin-table-agent-logs td:nth-child(7) { min-width: 80px; white-space: nowrap; }
.admin-table-agent-logs th:nth-child(8),
.admin-table-agent-logs td:nth-child(8) { min-width: 150px; white-space: nowrap; }
.admin-table-agent-logs th:nth-child(9),
.admin-table-agent-logs td:nth-child(9) { min-width: 150px; white-space: nowrap; }
.admin-table-agent-logs tbody td { vertical-align: middle; line-height: 1.5; font-size: 13px; }
.admin-table-agent-logs tbody td > * { vertical-align: middle; }
.admin-table-agent-logs .balance-badge,
.admin-table-agent-logs .change-amount,
.admin-table-agent-logs .user-status,
.admin-table-agent-logs .expire-badge { white-space: nowrap; flex-wrap: nowrap; }

/* 余额显示徽章 */
.balance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(0,0,0,.85);
  border: 1px solid #e8e8e8;
}

/* 变动金额样式 */
.change-amount {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}
.change-positive {
  background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
  color: #52c41a;
  border: 1px solid #b7ebc6;
}
.change-negative {
  background: linear-gradient(135deg, #fff2f0 0%, #ffccc7 100%);
  color: #ff4d4f;
  border: 1px solid #ffa39e;
}

/* 调整状态样式 */
.status-adjust {
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
  color: #0050b3;
  border: 1px solid #91d5ff;
}
.status-adjust .status-icon {
  background: #1890ff;
  color: #fff;
}

/* 备注文本样式 */
.remark-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: rgba(0,0,0,.65);
}

/* 代理操作按钮样式 */
.agent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.agent-actions .btn {
  margin: 2px;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.agent-actions .btn:hover {
  transform: translateY(-1px);
}
.agent-actions .btn-success {
  background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
  border-color: #52c41a;
}
.agent-actions .btn-success:hover {
  background: linear-gradient(135deg, #73d13d 0%, #95de64 100%);
}

/* 分页样式 */
.admin-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}
.pagination-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 14px;
}
.pagination-select {
  padding: 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}
.pagination-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-info {
  color: #666;
  font-size: 14px;
}
.btn-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #666;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}
.btn-page:hover:not(:disabled) {
  border-color: #1890ff;
  color: #1890ff;
}
.btn-page:disabled {
  background: #f5f5f5;
  color: #d9d9d9;
  cursor: not-allowed;
}
.btn-page-num {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
}
.btn-page-num.active {
  background: #1890ff;
  border-color: #1890ff;
  color: #fff;
}
.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-ellipsis {
  padding: 0 4px;
  color: rgba(0,0,0,.45);
}
.page-total {
  color: #666;
  font-size: 14px;
  white-space: nowrap;
}
.page-jump {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
  font-size: 14px;
}
.page-jump-input {
  width: 56px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
  background: #fff;
  color: rgba(0,0,0,.65);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  vertical-align: middle;
  margin: 0;
}
.page-jump-input:hover {
  border-color: #40a9ff;
}
.page-jump-input:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.page-jump-input::-webkit-inner-spin-button,
.page-jump-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.page-jump-input[type=number] {
  -moz-appearance: textfield;
}

/* 分区管理表格：与账号管理一致，表头表体居中、表头字体统一 */
.admin-table-partitions thead th {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  white-space: nowrap;
}
.admin-table-partitions th,
.admin-table-partitions td { text-align: center; }
.admin-table-partitions th:nth-child(1),
.admin-table-partitions td:nth-child(1) { width: 40px; padding-left: 8px; padding-right: 8px; }
.admin-table-partitions th:nth-child(2),
.admin-table-partitions td:nth-child(2) { width: 48px; }
.admin-table-partitions th:nth-child(3),
.admin-table-partitions td:nth-child(3) { min-width: 100px; word-break: break-word; }
.admin-table-partitions th:nth-child(4),
.admin-table-partitions td:nth-child(4) { min-width: 100px; word-break: break-word; }
.admin-table-partitions th:nth-child(5),
.admin-table-partitions td:nth-child(5) { min-width: 90px; word-break: break-word; }
.admin-table-partitions th:nth-child(6),
.admin-table-partitions td:nth-child(6),
.admin-table-partitions th:nth-child(7),
.admin-table-partitions td:nth-child(7),
.admin-table-partitions th:nth-child(8),
.admin-table-partitions td:nth-child(8) { min-width: 56px; padding-left: 4px; padding-right: 4px; }
.admin-table-partitions th:nth-child(9),
.admin-table-partitions td:nth-child(9) { min-width: 60px; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.admin-table-partitions tbody td { vertical-align: middle; line-height: 1.5; }
.admin-table-partitions tbody td > * { vertical-align: middle; }

/* 弹窗底部操作区：取消最左、保存最右 */
.admin-modal .admin-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e8e8e8;
}
.admin-modal .admin-modal-actions .btn { margin-right: 0; margin-bottom: 0; }
/* 广告弹窗：字体颜色与是否加粗同一行 */
.admin-modal .admin-form-row-color-bold {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.admin-modal .admin-form-row-color-bold .form-group {
  flex: 0 1 auto;
  min-width: 140px;
}
.admin-modal .admin-form-row-color-bold .form-group select {
  min-width: 100px;
}
/* 广告弹窗：颜色选择器做大、与色值并排更醒目 */
.admin-modal .form-group .admin-color-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-modal .admin-input-color {
  width: 80px;
  height: 48px;
  padding: 6px;
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid rgba(148, 163, 184, 0.4);
  flex-shrink: 0;
}
.admin-modal .admin-input-color:hover {
  border-color: #94a3b8;
}
.admin-modal .admin-color-hex {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0,0,0,.85);
  letter-spacing: 0;
  min-width: 80px;
}
/* 管理员后台使用用户后台同款：.form-group、.btn（见 app.css + theme.css） */
/* 与 my-auth .table-page-search-wrapper .ant-form-item 一致：表单项间距 */
.admin-content .form-group,
.admin-modal .form-group { margin-bottom: 24px; }
.admin-modal .form-group { margin-bottom: 20px; }
.admin-content .btn,
.admin-modal .btn { margin-right: 8px; margin-bottom: 8px; }
.admin-content .admin-filter-row .btn { margin-bottom: 0; }
/* 弹窗内选择框下拉颜色与页面内一致：选中浅灰、悬停浅蓝（见上方 option 规则） */
.admin-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-modal h3 { margin-bottom: 16px; color: rgba(0,0,0,.85); }
/* 新增/编辑账号弹窗：标签左对齐固定宽度，输入框右对齐整齐排列 */
.admin-modal-account .admin-modal-form { margin-bottom: 20px; }
.admin-modal-account .form-group {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}
.admin-modal-account .form-group:last-child { margin-bottom: 0; }
.admin-modal-account .form-group label {
  flex-shrink: 0;
  width: 72px;
  margin-bottom: 0;
  text-align: right;
  color: rgba(0,0,0,.85);
}
.admin-modal-account .form-group input,
.admin-modal-account .form-group select {
  flex: 1;
  min-width: 0;
}

.admin-modal-agent .admin-modal-form { margin-bottom: 20px; }
.admin-modal-agent .form-group {
  margin-bottom: 16px;
}
.admin-modal-agent .form-group:last-child { margin-bottom: 0; }
.admin-modal-agent .form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: rgba(0,0,0,.75);
  margin-bottom: 8px;
}
.admin-modal-agent .form-group input,
.admin-modal-agent .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  height: auto;
  min-height: 40px;
  line-height: 1.5;
}
.admin-modal-agent .form-group input:hover,
.admin-modal-agent .form-group select:hover {
  border-color: #40a9ff;
}
.admin-modal-agent .form-group input:focus,
.admin-modal-agent .form-group select:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
  outline: none;
}
.admin-modal-agent .form-group input::placeholder {
  color: rgba(0,0,0,.35);
}

.admin-modal-balance .admin-modal-form { margin-bottom: 20px; }
.admin-modal-balance .form-group {
  margin-bottom: 16px;
}
.admin-modal-balance .form-group:last-child { margin-bottom: 0; }
.admin-modal-balance .form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: rgba(0,0,0,.75);
  margin-bottom: 8px;
}
.admin-modal-balance .form-group input,
.admin-modal-balance .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  height: auto;
  min-height: 40px;
  line-height: 1.5;
}
.admin-modal-balance .form-group input:hover,
.admin-modal-balance .form-group select:hover {
  border-color: #40a9ff;
}
.admin-modal-balance .form-group input:focus,
.admin-modal-balance .form-group select:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
  outline: none;
}
.admin-modal-balance .form-group input::placeholder {
  color: rgba(0,0,0,.35);
}

/* 分区编辑弹窗：拉宽、与 /user/partition.html 一致（form-row 网格 + 标签在上） */
.admin-modal-partition { max-width: 780px; }
.admin-modal-partition .admin-modal-partition-body {
  max-height: 65vh;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}
.admin-modal-partition .form-row {
  display: grid;
  gap: 10px;
  margin-bottom: 6px;
}
.admin-modal-partition .form-row:last-child { margin-bottom: 0; }
.admin-modal-partition .form-row-two-cols { grid-template-columns: 1fr 1fr; }
.admin-modal-partition .form-row-three-cols { grid-template-columns: 1fr 1fr 1fr; }
.admin-modal-partition .form-row-disk-cols { grid-template-columns: 0.75fr 1.5fr 0.75fr; }
.admin-modal-partition .form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-modal-partition .form-group label {
  font-weight: 500;
  color: rgba(0,0,0,.85);
  margin-bottom: 2px;
  font-size: 14px;
  text-align: left;
}
.admin-modal-partition .form-group input,
.admin-modal-partition .form-group select,
.admin-modal-partition .form-group textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-top: 4px;
  padding-bottom: 4px;
  min-height: 28px;
}
.admin-modal-partition .form-group select { padding-top: 2px; padding-bottom: 2px; min-height: 28px; }
.admin-modal-partition .form-group textarea { resize: vertical; min-height: 44px; padding: 6px 8px; }
.admin-modal-partition input[readonly] {
  background: #f5f5f5;
  color: rgba(0,0,0,.45);
  cursor: default;
}

/* 新增分区弹窗 */
.admin-modal-add-part { max-width: 480px; }
.admin-modal-add-part .admin-modal-add-part-body {
  padding: 4px 0;
  margin-bottom: 16px;
}
.admin-modal-add-part .form-row-single {
  margin-bottom: 14px;
}
.admin-modal-add-part .form-row-single:last-child {
  margin-bottom: 0;
}
.admin-modal-add-part .form-group label {
  font-weight: 500;
  color: rgba(0,0,0,.85);
  margin-bottom: 6px;
  font-size: 14px;
  display: block;
}
.admin-modal-add-part .form-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 11px;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
}

/* 通用 Confirm/Alert 弹窗（对齐 user/activate.html 弹窗风格） */
.admin-confirm-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: admin-confirm-fade-in .15s ease;
  padding: 20px;
}
.admin-confirm-modal {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .18);
  overflow: hidden;
  animation: admin-confirm-pop-in .22s ease-out;
}
.admin-confirm-modal .admin-confirm-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-confirm-modal .admin-confirm-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.admin-confirm-modal .admin-confirm-header.danger h3 { color: #b91c1c; }
.admin-confirm-modal .admin-confirm-header.warning h3 { color: #b45309; }
.admin-confirm-modal .admin-confirm-header.info h3 { color: #1d4ed8; }
.admin-confirm-modal .admin-confirm-header.success h3 { color: #15803d; }
.admin-confirm-modal .admin-confirm-header.danger { background: linear-gradient(135deg,#fef2f2 0%,#fee2e2 100%); }
.admin-confirm-modal .admin-confirm-header.warning { background: linear-gradient(135deg,#fffbeb 0%,#fef3c7 100%); }
.admin-confirm-modal .admin-confirm-header.info { background: linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%); }
.admin-confirm-modal .admin-confirm-header.success { background: linear-gradient(135deg,#f0fdf4 0%,#dcfce7 100%); }
.admin-confirm-modal .admin-confirm-body {
  padding: 24px;
}
.admin-confirm-modal .admin-confirm-message {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
  margin: 0;
}
.admin-confirm-modal .admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 24px 20px;
}
.admin-confirm-modal .admin-confirm-btn {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .05s;
  min-width: 76px;
}
.admin-confirm-modal .admin-confirm-btn:active { transform: scale(0.97); }
.admin-confirm-modal .admin-confirm-btn.admin-btn-cancel {
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.admin-confirm-modal .admin-confirm-btn.admin-btn-cancel:hover { background: #f1f5f9; }
.admin-confirm-modal .admin-confirm-btn.admin-btn-primary {
  background: #3b82f6;
  color: #fff;
}
.admin-confirm-modal .admin-confirm-btn.admin-btn-primary:hover { background: #2563eb; }
.admin-confirm-modal .admin-confirm-btn.admin-btn-danger {
  background: #ef4444;
  color: #fff;
}
.admin-confirm-modal .admin-confirm-btn.admin-btn-danger:hover { background: #dc2626; }
.admin-confirm-modal .admin-confirm-btn.admin-btn-warning {
  background: #f59e0b;
  color: #fff;
}
.admin-confirm-modal .admin-confirm-btn.admin-btn-warning:hover { background: #d97706; }
@keyframes admin-confirm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes admin-confirm-pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Toast - 右上角弹出通知 */
.admin-toast {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  min-width: 220px;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .15), 0 2px 6px rgba(15, 23, 42, .08);
  background: #fff;
  color: #1e293b;
  border-left: 4px solid #64748b;
  animation: admin-toast-slide-in .25s cubic-bezier(.21,1.02,.73,1);
  pointer-events: auto;
}
.admin-toast .toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.admin-toast .toast-msg {
  flex: 1;
  word-break: break-word;
}
.admin-toast.success {
  border-left-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
}
.admin-toast.success .toast-icon { background: #10b981; }
.admin-toast.error {
  border-left-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
}
.admin-toast.error .toast-icon { background: #ef4444; }
.admin-toast.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}
.admin-toast.warning .toast-icon { background: #f59e0b; }
.admin-toast.info {
  border-left-color: #3b82f6;
  background: #eff6ff;
  color: #1e40af;
}
.admin-toast.info .toast-icon { background: #3b82f6; }
.admin-toast.fade-out {
  animation: admin-toast-fade-out .25s ease forwards;
}
@keyframes admin-toast-slide-in {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes admin-toast-fade-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}
/* 多条 toast 错位排列 */
.admin-toast + .admin-toast { top: calc(80px + 64px); }
.admin-toast + .admin-toast + .admin-toast { top: calc(80px + 128px); }
.admin-toast + .admin-toast + .admin-toast + .admin-toast { top: calc(80px + 192px); }

/* 卡密管理 */
.cdk-toolbar { margin-bottom: 16px; }
.cdk-toolbar-title { font-size: 14px; margin-bottom: 12px; color: rgba(0,0,0,.85); }
/* 卡密筛选/生成：使用与用户后台一致的 .form-group（app.css + theme.css） */
.cdk-gen-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.cdk-filter-bar { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #e8e8e8; }
.cdk-filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.cdk-filter-row .form-group { min-width: 100px; max-width: 200px; }
.cdk-filter-actions { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
/* 账号管理筛选：与卡密筛选一致，筛选在左、按钮在右 */
/* 账号管理：筛选与表格合并为同一卡片，从左到右 输入框 状态选择 查询 重置 新增账号 */
.admin-accounts-card { 
  width: 100%;
  box-sizing: border-box;
}
.admin-account-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
  min-height: 32px;
}
.admin-account-filter-row .btn {
  height: 32px;
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.admin-account-filter-input {
  width: 160px;
  min-width: 130px;
  padding: 4px 11px;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: rgba(0,0,0,.65);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-account-filter-input:hover { border-color: #40a9ff; }
.admin-account-filter-input:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.admin-account-filter-input::placeholder { color: rgba(0,0,0,.45); }
.admin-account-filter-select {
  width: 135px;
  min-width: 135px;
  height: 32px;
  box-sizing: border-box;
}
.admin-accounts-card .admin-table-wrap,
.admin-partitions-card .admin-table-wrap { margin-bottom: 0; }
.admin-modal #mGenNum { width: 100%; max-width: 120px; }
.admin-modal #mGenDaysCustom { width: 100%; max-width: 120px; }
.cdk-table-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.cdk-table-info { font-size: 14px; color: rgba(0,0,0,.45); }
.cdk-table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cdk-pagination { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid #e8e8e8; }
.cdk-page-num { font-size: 14px; color: rgba(0,0,0,.65); }
.cdk-limit-label { font-size: 14px; color: rgba(0,0,0,.65); display: inline-flex; align-items: center; gap: 6px; }
/* .cdk-limit-label select 继承 .admin-page select 统一样式 */
.cdk-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.cdk-badge-unused { background: #dcfce7; color: #166534; }
.cdk-badge-used { background: #fafafa; color: rgba(0,0,0,.65); }
.cdk-badge-disabled { background: #fef2f2; color: #b91c1c; }
.cdk-user-link { color: #1890ff; text-decoration: none; }
.cdk-user-link:hover { text-decoration: underline; }
.cdk-code {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #495057;
  border: 1px solid #dee2e6;
  letter-spacing: 1px;
  font-weight: 500;
}
.cdk-table .admin-cdk-row:hover { background: #f8fafc; }

/* 适配当前系统的额外样式 */
.admin-content .admin-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-content .admin-form-row .form-group {
  flex: 1;
  min-width: 180px;
  margin-bottom: 0;
}

.admin-content .admin-form-actions {
  margin-top: 16px;
}

.admin-content .admin-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
}

.admin-content .admin-filter-input {
  width: 120px;
  min-width: 100px;
  padding: 4px 11px;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  line-height: 22px;
  background: #fff;
  color: rgba(0,0,0,.65);
  transition: border-color 0.2s, box-shadow 0.2s;
  vertical-align: middle;
}

.admin-content .admin-filter-input:hover {
  border-color: #40a9ff;
}

.admin-content .admin-filter-input:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.admin-content .admin-filter-select {
  width: 120px;
  min-width: 100px;
  height: 32px;
  padding: 4px 11px;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  line-height: 22px;
  background: #fff;
  color: rgba(0,0,0,.65);
  cursor: pointer;
  vertical-align: middle;
}

.admin-content .admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.admin-content .admin-badge-active {
  background: #dcfce7;
  color: #166534;
}

.admin-content .admin-badge-inactive {
  background: #fafafa;
  color: rgba(0,0,0,.65);
}

.admin-content .admin-date {
  font-family: SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  color: rgba(0,0,0,.65);
}

.admin-content .admin-code {
  font-family: SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  padding: 4px 11px;
  border-radius: 4px;
  background: #fafafa;
  color: rgba(0,0,0,.85);
  border: 1px solid #e8e8e8;
}

.admin-content .admin-table-wrap {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 800px;
}

.admin-content .admin-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
}

.admin-content .admin-table th,
.admin-content .admin-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #e8e8e8;
}

.admin-content .admin-table th {
  background: #fafafa;
  color: rgba(0,0,0,.85);
  font-weight: 500;
}

.admin-content .admin-table tbody tr:hover {
  background: #fafafa;
}

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

.admin-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e8e8e8;
}

.admin-page-num {
  font-size: 14px;
  color: rgba(0,0,0,.65);
}

.admin-limit-label {
  font-size: 14px;
  color: rgba(0,0,0,.65);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-table-info {
  font-size: 14px;
  color: rgba(0,0,0,.45);
}

.admin-table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-link {
  color: #1890ff;
  text-decoration: none;
}

.admin-link:hover {
  text-decoration: underline;
}

.admin-user-link {
  color: #1890ff;
  text-decoration: none;
}

.admin-user-link:hover {
  text-decoration: underline;
}

/* ========== 移动端适配 ========== */
/* 汉堡菜单按钮 */
.admin-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  margin-right: 12px;
  border-radius: 8px;
  transition: background 0.2s;
}
.admin-menu-toggle:hover {
  background: rgba(0,0,0,.04);
}
.admin-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(0,0,0,.65);
  margin: 5px 0;
  transition: all 0.3s;
  border-radius: 2px;
}
.admin-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.admin-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.admin-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* 侧边栏遮罩 */
.admin-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s;
}
.admin-sidebar-overlay.show {
  display: block;
  opacity: 1;
}

/* 文章弹窗样式 */
.admin-modal-article .admin-modal-form {
  padding: 24px;
}
.admin-modal-article .form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-modal-article .form-row:last-child {
  margin-bottom: 0;
}
.admin-modal-article .form-group {
  flex: 1;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-modal-article .form-group-full {
  flex: none;
  width: 100%;
  margin-bottom: 16px;
}
.admin-modal-article .form-group label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0,0,0,.75);
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-modal-article .form-group input,
.admin-modal-article .form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #fff;
}
.admin-modal-article .form-group input:focus,
.admin-modal-article .form-group select:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 富文本编辑器样式 */
.rich-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: #fafafa;
  border: 1px solid #d9d9d9;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  flex-wrap: wrap;
}
.editor-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(0,0,0,.65);
  transition: all 0.2s;
}
.editor-btn:hover {
  background: #e6f7ff;
  border-color: #1890ff;
  color: #1890ff;
}
.editor-btn b,
.editor-btn i,
.editor-btn u {
  font-size: 12px;
}
.editor-divider {
  width: 1px;
  height: 18px;
  background: #d9d9d9;
  margin: 0 6px;
}
.rich-editor {
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  padding: 12px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 0 0 6px 6px;
  font-size: 14px;
  line-height: 1.6;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rich-editor:focus,
.rich-editor.focused {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.rich-editor:empty:before {
  content: attr(placeholder);
  color: #bfbfbf;
  pointer-events: none;
}
.rich-editor p {
  margin: 0 0 12px 0;
}
.rich-editor p:last-child {
  margin-bottom: 0;
}
.rich-editor ul,
.rich-editor ol {
  margin: 0 0 12px 0;
  padding-left: 24px;
}
.rich-editor img {
  max-width: 100%;
  border-radius: 4px;
}
.rich-editor a {
  color: #1890ff;
  text-decoration: none;
}
.rich-editor a:hover {
  text-decoration: underline;
}

/* 大屏幕适配 (1200px以下) */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 中等屏幕适配 (992px以下) */
@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .admin-content {
    padding: 16px;
  }
  
  .email-templates-grid {
    grid-template-columns: 1fr;
  }
}

/* 平板适配 (768px以下) */
@media (max-width: 768px) {
  /* 显示汉堡菜单 */
  .admin-menu-toggle {
    display: block;
  }
  
  /* 侧边栏变为抽屉式 */
  .admin-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 999;
    transition: left 0.3s ease;
    padding-top: 0;
  }
  .admin-sidebar.show {
    left: 0;
  }
  
  /* Logo区域调整 */
  .admin-logo {
    height: 56px;
    padding: 0 16px;
  }
  
  /* 导航项显示文字 */
  .admin-nav-item {
    padding: 12px 16px;
    margin: 2px 8px;
  }
  
  /* 顶部导航栏 */
  .admin-header {
    left: 0;
    padding: 0 16px;
  }
  
  .admin-greeting {
    display: none;
  }
  
  /* 主内容区域 */
  .admin-main {
    margin-left: 0;
  }
  
  .admin-content {
    padding: 12px;
  }
  
  /* 标签页 */
  .admin-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-tab {
    padding: 10px 16px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  /* 筛选栏 */
  .admin-filter-row,
  .admin-account-filter-row,
  .card-type-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .admin-filter-input,
  .admin-filter-select,
  .admin-account-filter-input,
  .admin-account-filter-select {
    width: 100%;
    max-width: none;
  }
  
  .admin-filter-row .btn,
  .admin-account-filter-row .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* 卡片 */
  .admin-card {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  /* 统计卡片 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .stat-icon-wrapper {
    width: 40px;
    height: 40px;
  }
  
  /* 表格 */
  .admin-table-wrap {
    max-height: 60vh;
  }
  
  .admin-table {
    min-width: 600px;
  }
  
  /* 分页 */
  .admin-pagination {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .pagination-left,
  .pagination-right {
    justify-content: center;
  }
  
  .page-numbers {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .page-jump {
    justify-content: center;
  }
  
  /* 弹窗 */
  .admin-modal-mask {
    padding: 12px;
    align-items: flex-start;
    padding-top: 60px;
  }
  
  .admin-modal {
    max-height: 85vh;
    width: 100%;
    margin: 0;
  }
  
  .admin-modal-header {
    padding: 16px;
  }
  
  .admin-modal-form {
    padding: 16px;
  }
  
  .admin-modal-actions {
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
  }
  
  .admin-modal-actions .btn {
    width: 100%;
    margin: 0;
  }
  
  .admin-modal-article .form-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .admin-modal-article .form-group-full {
    margin-bottom: 12px;
  }
  
  .rich-editor {
    min-height: 150px;
    max-height: 250px;
  }
  
  .rich-editor-toolbar {
    padding: 6px 8px;
  }
  
  .editor-btn {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  
  /* 用户信息下拉 */
  .admin-user-info {
    padding: 6px 10px;
  }
  
  .admin-username {
    display: none;
  }
  
  .admin-dropdown-menu {
    right: -10px;
    min-width: 140px;
  }
  
  /* 代理端顶部余额和折扣 */
  .admin-header-right .balance-badge,
  .admin-header-right .discount-badge {
    font-size: 11px;
    padding: 2px 6px;
    gap: 2px;
  }
  
  .admin-header-right .balance-badge .price-icon,
  .admin-header-right .discount-badge .days-icon {
    font-size: 10px;
  }
  
  .admin-header-right > div:first-child {
    gap: 8px;
    margin-right: 8px;
  }
  
  .admin-avatar-wrapper {
    width: 28px;
    height: 28px;
  }
  
  .admin-avatar,
  .admin-avatar-placeholder {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  /* 设置页面 */
  .settings-form-container {
    max-width: none;
  }
  
  /* 快捷操作卡片 */
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
  
  .action-card-fixed {
    width: 100%;
  }
  
  /* 版本管理表格 */
  .changelog-cell {
    max-width: 200px;
  }
}

/* 手机适配 (576px以下) */
@media (max-width: 576px) {
  /* 统计卡片单列 */
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 14px;
  }
  
  .stat-value {
    font-size: 18px;
  }
  
  /* 标签页更紧凑 */
  .admin-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  /* 卡片内边距 */
  .admin-card {
    padding: 12px;
  }
  
  /* 代理端顶部导航优化 */
  .admin-header-right .balance-badge,
  .admin-header-right .discount-badge {
    font-size: 10px;
    padding: 2px 4px;
    gap: 1px;
  }
  
  .admin-header-right > div:first-child {
    gap: 4px;
    margin-right: 4px;
  }
  
  .admin-avatar-wrapper {
    width: 24px;
    height: 24px;
  }
  
  .admin-avatar,
  .admin-avatar-placeholder {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  
  /* 弹窗更紧凑 */
  .admin-modal-header h3 {
    font-size: 15px;
  }
  
  .admin-modal-icon {
    font-size: 16px;
  }
  
  .admin-modal-form .form-group {
    margin-bottom: 14px;
  }
  
  /* 分页简化 */
  .page-jump {
    display: none;
  }
}

/* 超小屏幕 (400px以下) */
@media (max-width: 400px) {
  .admin-header {
    padding: 0 12px;
  }
  
  .admin-content {
    padding: 8px;
  }
  
  .admin-avatar-wrapper {
    width: 22px;
    height: 22px;
  }
  
  .admin-avatar,
  .admin-avatar-placeholder {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }
  
  .admin-header-right .balance-badge,
  .admin-header-right .discount-badge {
    font-size: 9px;
    padding: 1px 3px;
  }
  
  .admin-header-right > div:first-child {
    gap: 3px;
    margin-right: 3px;
  }
  
  .admin-menu-toggle {
    width: 36px;
    height: 36px;
    padding: 6px;
  }
  
  .admin-menu-toggle span {
    width: 20px;
    margin: 4px 0;
  }
  
  /* 隐藏部分分页按钮 */
  #firstPage,
  #lastPage {
    display: none;
  }
}

/* ========== 移动端表格优化 ========== */
@media (max-width: 768px) {
  /* 表格整体优化 */
  .admin-table-wrap {
    margin: 0 -12px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .admin-table {
    min-width: 500px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  /* 表格内单元格优化 */
  .cell-id {
    font-size: 11px;
    padding: 2px 6px;
  }
  
  .cell-qq {
    padding: 2px 6px;
    font-size: 12px;
  }
  
  .qq-icon {
    font-size: 12px;
  }
  
  /* 到期时间徽章 */
  .expire-badge {
    padding: 3px 8px;
    font-size: 11px;
    gap: 4px;
  }
  
  .expire-badge .expire-icon {
    font-size: 11px;
  }
  
  /* 状态徽章 */
  .user-status,
  .online-status,
  .card-status,
  .status-active,
  .status-banned,
  .status-unused,
  .status-used {
    padding: 2px 8px;
    font-size: 11px;
    flex-wrap: nowrap;
  }
  
  .user-status .status-icon {
    width: 12px;
    height: 12px;
    font-size: 8px;
    flex-shrink: 0;
  }
  
  /* 卡密代码 */
  .cdk-code {
    font-size: 11px;
    padding: 3px 8px;
    letter-spacing: 0;
  }
  
  /* 表格内按钮组 */
  .ct-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
  }
  
  .ct-actions .btn {
    padding: 3px 6px;
    font-size: 10px;
  }
  
  /* 代理操作按钮 */
  .agent-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
  }
  
  .agent-actions .btn {
    padding: 3px 6px;
    font-size: 10px;
    width: auto;
  }
  
  /* 筛选行优化 */
  .admin-account-filter-row {
    gap: 8px;
  }
  
  .admin-account-filter-input {
    width: 100%;
    min-width: 0;
    flex: 1;
    min-width: 120px;
  }
  
  .admin-account-filter-select {
    width: 100%;
    min-width: 0;
    flex: 1;
    min-width: 100px;
  }
  
  .admin-account-filter-row .btn {
    flex: 0 0 auto;
    padding: 0 12px;
  }
  
  /* 分页优化 */
  .admin-pagination {
    padding: 12px;
    gap: 10px;
  }
  
  .pagination-left {
    width: 100%;
    justify-content: center;
  }
  
  .pagination-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .btn-page {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }
  
  .page-numbers {
    gap: 4px;
  }
  
  .btn-page-num {
    min-width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  /* 表格更紧凑 */
  .admin-table {
    min-width: 520px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  /* 隐藏部分列 */
  .admin-table .hide-mobile {
    display: none;
  }
  
  /* 单元格进一步优化 */
  .cell-id {
    font-size: 10px;
    padding: 1px 4px;
  }
  
  .cell-qq {
    font-size: 11px;
    padding: 1px 4px;
  }
  
  .qq-icon {
    font-size: 10px;
  }
  
  /* 到期时间 */
  .expire-badge {
    padding: 2px 6px;
    font-size: 10px;
  }
  
  /* 状态徽章 */
  .user-status,
  .online-status,
  .card-status,
  .status-active,
  .status-banned,
  .status-unused,
  .status-used {
    padding: 1px 6px;
    font-size: 10px;
    flex-wrap: nowrap;
  }
  
  .user-status .status-icon {
    width: 10px;
    height: 10px;
    font-size: 7px;
    flex-shrink: 0;
  }
  
  /* 卡密代码 */
  .cdk-code {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  /* 表格内按钮 */
  .ct-actions {
    gap: 3px;
    min-width: 140px;
    flex-wrap: nowrap;
  }
  
  .ct-actions .btn {
    padding: 2px 4px;
    font-size: 8px;
    white-space: nowrap;
  }
  
  .agent-actions {
    gap: 3px;
    flex-wrap: nowrap;
  }
  
  .agent-actions .btn {
    padding: 2px 4px;
    font-size: 8px;
    white-space: nowrap;
  }
  
  /* 筛选行 */
  .admin-account-filter-row {
    gap: 6px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
  
  .admin-account-filter-input,
  .admin-account-filter-select {
    height: 28px;
    font-size: 13px;
  }
  
  .admin-account-filter-row .btn {
    height: 28px;
    font-size: 12px;
    padding: 0 10px;
  }
  
  /* 分页简化 */
  .btn-page {
    min-width: 28px;
    height: 28px;
    font-size: 12px;
    padding: 0 8px;
  }
  
  .btn-page-num {
    min-width: 24px;
    height: 24px;
    font-size: 11px;
  }
  
  /* 表格信息 */
  .cdk-table-info {
    font-size: 12px;
  }
  
  .admin-table-info {
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  /* 超小屏幕表格 */
  .admin-table {
    min-width: 420px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 4px 6px;
    font-size: 11px;
  }
  
  /* 单元格 */
  .cell-qq {
    font-size: 10px;
  }
  
  /* 按钮更小 */
  .ct-actions {
    gap: 2px;
    min-width: 120px;
  }
  
  .agent-actions {
    gap: 2px;
  }
  
  .ct-actions .btn,
  .agent-actions .btn {
    padding: 1px 4px;
    font-size: 8px;
    white-space: nowrap;
  }
  
  /* 状态徽章 */
  .user-status,
  .online-status,
  .card-status,
  .status-active,
  .status-banned,
  .status-unused,
  .status-used {
    padding: 1px 4px;
    font-size: 9px;
    flex-wrap: nowrap;
  }
  
  .user-status .status-icon {
    width: 8px;
    height: 8px;
    font-size: 6px;
    flex-shrink: 0;
  }
  
  /* 筛选按钮 */
  .admin-account-filter-row .btn {
    font-size: 11px;
    padding: 0 8px;
  }
  
  /* 分页按钮 */
  .btn-page {
    min-width: 24px;
    height: 24px;
    font-size: 11px;
  }
}

/* 卡密表格移动端优化 */
@media (max-width: 768px) {
  .days-badge {
    padding: 3px 8px;
    font-size: 11px;
    gap: 4px;
  }
  
  .days-badge .days-icon {
    font-size: 11px;
  }
  
  .days-badge .days-text {
    font-size: 11px;
  }
  
  .badge-default {
    padding: 2px 8px;
    font-size: 11px;
  }
  
  .admin-filter-actions {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
  }
  
  .admin-filter-actions .btn {
    flex: 1;
  }
}

@media (max-width: 576px) {
  .days-badge {
    padding: 2px 6px;
    font-size: 10px;
    gap: 3px;
  }
  
  .days-badge .days-icon {
    font-size: 10px;
  }
  
  .days-badge .days-text {
    font-size: 10px;
  }
  
  .badge-default {
    padding: 1px 6px;
    font-size: 10px;
  }
  
  .admin-filter-actions {
    gap: 6px;
  }
  
  .admin-filter-actions .btn {
    padding: 0 8px;
    font-size: 11px;
  }
}

/* 网站设置页面 */
.settings-form-container {
  max-width: 600px;
}

/* 邮件设置卡片 */
.email-settings-box {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.email-settings-box:last-of-type {
  margin-bottom: 0;
}

.email-settings-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e8e8e8;
}

.email-settings-icon {
  font-size: 24px;
}

.email-settings-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
}

.email-settings-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
  border-radius: 10px;
  font-size: 11px;
  color: #1890ff;
  border: 1px solid #91d5ff;
}

.email-settings-body {
  padding: 20px;
}

.email-settings-body .form-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.email-settings-body .form-group:last-child {
  margin-bottom: 0;
}

.email-settings-body .form-group label {
  flex-shrink: 0;
  width: 120px;
  margin-bottom: 0;
  text-align: right;
  justify-content: flex-end;
}

.email-settings-body .form-group input,
.email-settings-body .form-group select {
  flex: 1;
  min-width: 0;
}

.email-settings-footer {
  padding: 16px 20px;
  background: #fafafa;
  border-top: 1px solid #e8e8e8;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.email-settings-footer .btn-primary {
  margin-left: 8px;
}

@media (max-width: 768px) {
  .email-settings-box {
    min-width: 0;
  }
}
.settings-form-container .form-group {
  margin-bottom: 20px;
}
.settings-form-container .form-group:last-child {
  margin-bottom: 0;
}
.settings-form-container .form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: rgba(0,0,0,.75);
  margin-bottom: 8px;
}
.settings-form-container .form-group input,
.settings-form-container .form-group select,
.settings-form-container .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  height: auto;
  min-height: 40px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
}
.settings-form-container .form-group input:hover,
.settings-form-container .form-group select:hover,
.settings-form-container .form-group textarea:hover {
  border-color: #40a9ff;
}
.settings-form-container .form-group input:focus,
.settings-form-container .form-group select:focus,
.settings-form-container .form-group textarea:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
  outline: none;
}
.settings-form-container .form-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

/* 邮件模版卡片 */
.email-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}
.template-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
}
.template-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e8e8e8;
}
.template-icon {
  font-size: 20px;
}
.template-card-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(0,0,0,.85);
}
.template-card-body {
  padding: 16px;
}
.template-card-body .form-group {
  margin-bottom: 16px;
}
.template-card-body .form-group:last-child {
  margin-bottom: 0;
}
.template-card-body .form-group label {
  display: block;
  font-weight: 500;
  color: rgba(0,0,0,.75);
  margin-bottom: 6px;
  font-size: 14px;
}
.template-card-body .form-group input,
.template-card-body .form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
}
.template-card-body .form-group input:hover,
.template-card-body .form-group textarea:hover {
  border-color: #40a9ff;
}
.template-card-body .form-group input:focus,
.template-card-body .form-group textarea:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
  outline: none;
}
.template-card-body .form-group textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}
.template-tips {
  margin-top: 6px;
  color: rgba(0,0,0,.45);
}
.template-tips small {
  font-size: 12px;
}
.template-card-body .btn {
  margin-top: 12px;
}

/* 图片上传组件样式 */
.image-upload-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.image-preview-box {
  width: 120px;
  height: 120px;
  border: 2px dashed #d9d9d9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  background: #fafafa;
  position: relative;
}

.image-preview-box:hover {
  border-color: #1890ff;
  background: #e6f7ff;
}

.image-preview-box.favicon-preview {
  width: 64px;
  height: 64px;
}

.image-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-preview-placeholder {
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-box.favicon-preview .image-preview-placeholder {
  font-size: 10px;
  padding: 4px;
}

.image-upload-actions {
  display: flex;
  gap: 8px;
}

/* 版本管理 - 更新日志单元格样式 */
.changelog-cell {
  max-width: 300px;
  position: relative;
  padding-right: 60px;
}
.changelog-preview {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(0, 0, 0, 0.65);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}
.changelog-cell .btn-expand-changelog {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #f0f5ff 0%, #e6f7ff 100%);
  border: 1px solid #d6e4ff;
  color: #1890ff;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  height: auto;
  line-height: 1.4;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.changelog-cell .btn-expand-changelog:hover {
  background: linear-gradient(135deg, #d6e4ff 0%, #bae7ff 100%);
  border-color: #91d5ff;
  color: #096dd9;
}
.changelog-cell.expanded .changelog-preview {
  display: block;
  -webkit-line-clamp: unset;
  white-space: pre-wrap;
  word-break: break-word;
}
.changelog-cell.expanded .btn-expand-changelog {
  top: 0;
  transform: none;
}
.changelog-cell .btn-expand-reply {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #f0f5ff 0%, #e6f7ff 100%);
  border: 1px solid #d6e4ff;
  color: #1890ff;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  height: auto;
  line-height: 1.4;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.changelog-cell .btn-expand-reply:hover {
  background: linear-gradient(135deg, #d6e4ff 0%, #bae7ff 100%);
  border-color: #91d5ff;
  color: #096dd9;
}
.changelog-cell.expanded .btn-expand-reply {
  top: 0;
  transform: none;
}

.log-remark {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.log-remark.remark-success {
  background: linear-gradient(135deg, #f6ffed 0%, #d4edda 100%);
  color: #52c41a;
  border: 1px solid #b7ebc6;
}

/* 表格操作栏：按钮始终单行显示 */
.admin-table tbody td:last-child {
    white-space: nowrap;
    min-width: 160px;
}
.admin-table tbody td:last-child .btn {
    white-space: nowrap;
    flex-shrink: 0;
}
.admin-table tbody td:last-child .ct-actions,
.admin-table tbody td:last-child .agent-actions {
    flex-wrap: nowrap;
    min-width: max-content;
}
.admin-table-users tbody td:last-child,
.admin-table-cards tbody td:last-child {
    min-width: 180px;
}
.admin-table-agents tbody td:last-child {
    min-width: 200px;
}
.admin-table-versions tbody td:last-child {
    min-width: 160px;
}
.admin-table-agent-logs tbody td:last-child {
    min-width: 100px;
}
.admin-table-announcements tbody td:last-child {
    min-width: 140px;
}
.admin-table-ads tbody td:last-child {
    min-width: 140px;
}
.admin-table-partitions tbody td:last-child {
    min-width: 160px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 22px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #1890ff;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}