/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
  background: #f0f2f5;
  color: #333;
}

/* 登录页面 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  padding: 50px 40px;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.login-header .logo-icon {
  font-size: 36px;
}

.login-header .logo-text {
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
}

.login-header h1 {
  font-size: 24px;
  color: #222;
  margin-bottom: 10px;
}

.login-header p {
  color: #888;
  font-size: 14px;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  transition: border-color 0.3s;
}

.login-form input:focus {
  outline: none;
  border-color: #667eea;
}

.login-form .remember {
  display: flex;
  align-items: center;
}

.login-form .remember input {
  margin-right: 8px;
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.login-tip {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
}

.login-tip p {
  color: #888;
  font-size: 13px;
  margin-bottom: 5px;
}

.login-footer {
  margin-top: 30px;
  text-align: center;
}

.login-footer a {
  color: #667eea;
  font-size: 14px;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

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

/* 侧边栏 */
.sidebar {
  width: 240px;
  background: #1a1a2e;
  color: #fff;
  position: fixed;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 25px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-header .logo-icon {
  font-size: 28px;
}

.sidebar-header .logo-text {
  font-size: 18px;
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: #aaa;
  text-decoration: none;
  transition: all 0.3s;
  gap: 12px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-item.active {
  border-left: 3px solid #667eea;
  padding-left: 17px;
}

.nav-icon {
  font-size: 18px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
  display: block;
  color: #aaa;
  font-size: 13px;
  margin-bottom: 10px;
}

.logout-btn {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 20px 30px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.content-header h1 {
  font-size: 24px;
  color: #222;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.current-time {
  color: #888;
  font-size: 14px;
}

.content-body {
  padding-bottom: 30px;
}

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

.stat-card {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: #222;
}

.stat-label {
  font-size: 14px;
  color: #888;
}

/* 按钮 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: none;
  background: #f0f0f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.btn-icon:hover {
  background: #e0e0e0;
}

.btn-icon.danger:hover {
  background: #fee;
  color: #e53935;
}

/* 快捷操作 */
.quick-actions {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.quick-actions h2,
.system-info h2 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #222;
}

.action-buttons {
  display: flex;
  gap: 15px;
}

.action-btn {
  flex: 1;
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
}

.action-btn:hover {
  background: #f0f0f5;
  transform: translateY(-3px);
}

.action-icon {
  display: block;
  font-size: 30px;
  margin-bottom: 10px;
}

.action-btn span:last-child {
  font-size: 14px;
}

/* 系统信息 */
.system-info {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

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

.info-table td {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-table td:first-child {
  color: #888;
  width: 150px;
}

/* 轮播图管理 */
.banner-list {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
}

.banner-item {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.banner-preview {
  width: 200px;
  height: 100px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #fff;
  flex-shrink: 0;
}

.banner-info {
  flex: 1;
}

.banner-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.banner-info p {
  color: #888;
  font-size: 14px;
  margin-bottom: 8px;
}

.banner-order {
  font-size: 12px;
  color: #aaa;
}

.banner-actions {
  display: flex;
  gap: 10px;
}

.empty-state {
  text-align: center;
  padding: 60px;
  color: #888;
  background: #fff;
  border-radius: 12px;
}

/* 预览区域 */
.preview-section {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.preview-section h2 {
  font-size: 18px;
  margin-bottom: 20px;
}

.preview-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.preview-container .swiper-container {
  height: 300px;
}

.preview-container .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-container .slide-content {
  text-align: center;
  color: #fff;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  font-size: 18px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

.modal-close:hover {
  background: #e0e0e0;
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 25px;
  border-top: 1px solid #eee;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

.form-group textarea {
  resize: vertical;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}

.required {
  color: #e53935;
}

.color-input-group {
  display: flex;
  gap: 10px;
}

.color-input-group input[type="color"] {
  width: 50px;
  height: 40px;
  padding: 2px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
}

.color-input-group .color-text {
  flex: 1;
}

/* 设置页面 */
.settings-section {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.settings-section h2 {
  font-size: 16px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
}

/* 响应式 */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .admin-wrapper {
    flex-direction: column;
  }

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

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .banner-item {
    flex-direction: column;
    text-align: center;
  }

  .banner-actions {
    justify-content: center;
  }
}

/* ========== 新增样式 ========== */

/* 标签页 */
.tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 25px;
  border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
  padding: 12px 25px;
  border: none;
  background: transparent;
  color: #888;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
}

.tab-btn:hover {
  color: #667eea;
}

.tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 账户信息 */
.account-info {
  background: #f8fafc;
  border-radius: 10px;
  padding: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

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

.info-label {
  color: #888;
}

.info-value {
  font-weight: 600;
  color: #333;
}

/* 数据表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.data-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #555;
  font-size: 13px;
  text-transform: uppercase;
}

.data-table tr:hover {
  background: #f8fafc;
}

.data-table tr.selected {
  background: rgba(102, 126, 234, 0.1);
}

.data-table code {
  background: #f0f0f5;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
}

.empty-cell {
  text-align: center;
  color: #999;
  padding: 40px !important;
}

/* 状态徽章 */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.online {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-badge.offline {
  background: #f5f5f5;
  color: #757575;
}

/* VIP徽章 */
.vip-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  background: #f5f5f5;
  color: #757575;
}

.vip-badge.active {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

/* 设备列表 */
.device-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
}

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

.filter-item label {
  font-size: 14px;
  color: #666;
}

.filter-item select,
.filter-item input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.filter-item input[type="text"] {
  min-width: 200px;
}

/* 批量操作 */
.batch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  margin-top: 15px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.batch-actions strong {
  color: #667eea;
}

.btn-danger {
  background: #ff5252 !important;
  color: #fff !important;
}

.btn-danger:hover {
  background: #ff1744 !important;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* 设备列表区块 */
.device-list-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.device-list-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.device-list-section h2 {
  font-size: 16px;
  color: #333;
}

.device-table-container {
  overflow-x: auto;
}

/* 关于页面 */
.about-content {
  text-align: center;
  padding: 40px 20px;
}

.about-logo {
  font-size: 80px;
  margin-bottom: 20px;
}

.about-content h1 {
  font-size: 28px;
  color: #333;
  margin-bottom: 10px;
}

.about-content .version {
  color: #667eea;
  font-weight: 600;
  margin-bottom: 15px;
}

.about-content .desc {
  color: #666;
  margin-bottom: 30px;
}

.system-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
}

.system-stats .stat-item {
  text-align: center;
}

.system-stats .stat-icon {
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
}

.system-stats .stat-num {
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
  display: block;
}

.system-stats .stat-name {
  font-size: 13px;
  color: #888;
}

.about-links {
  margin-bottom: 30px;
}

.about-links h3 {
  font-size: 14px;
  color: #888;
  margin-bottom: 15px;
}

.about-links a {
  display: inline-block;
  margin: 0 10px;
  color: #667eea;
  text-decoration: none;
  padding: 8px 16px;
  background: #f0f0f5;
  border-radius: 20px;
  transition: all 0.3s;
}

.about-links a:hover {
  background: #667eea;
  color: #fff;
}

.about-content .copyright {
  color: #999;
  font-size: 13px;
}

/* VIP套餐设置 */
.vip-packages-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vip-package-item {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s;
}

.vip-package-item:hover {
  border-color: #667eea;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.1);
}

.vip-package-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #e8e8e8;
}

.vip-package-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.vip-enabled {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #666;
  font-size: 14px;
}

.vip-enabled input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.vip-enabled input[type="checkbox"]:checked {
  accent-color: #667eea;
}

.vip-package-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.vip-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vip-field label {
  font-size: 13px;
  color: #888;
}

.vip-field input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.vip-field input:focus {
  outline: none;
  border-color: #667eea;
}

@media (max-width: 768px) {
  .vip-package-fields {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .vip-package-fields {
    grid-template-columns: 1fr;
  }
}

/* 图片上传区域 */
.image-upload-area {
  border: 2px dashed #ddd;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fafafa;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-upload-area:hover {
  border-color: #667eea;
  background: #f5f5ff;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.upload-icon {
  font-size: 48px;
  opacity: 0.6;
}

.upload-placeholder p {
  color: #666;
  margin: 0;
}

.upload-hint {
  font-size: 12px;
  color: #999;
}

.upload-preview {
  position: relative;
  max-width: 100%;
}

.upload-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  object-fit: contain;
}

.remove-image {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ff4757;
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.remove-image:hover {
  background: #ff3344;
  transform: scale(1.1);
}

/* 表单布局 */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

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

/* 轮播图列表项 */
.banner-item.disabled {
  opacity: 0.6;
}

.banner-item.disabled .banner-preview {
  position: relative;
}

.disabled-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* 颜色输入组 */
.color-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-input-group input[type="color"] {
  width: 45px;
  height: 40px;
  padding: 2px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
}

.color-input-group .color-text {
  flex: 1;
}

/* 复选框标签 */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding-top: 28px;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #667eea;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tech-tag {
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 20px;
  font-size: 13px;
}

/* ========== VIP激活码管理样式 ========== */

/* 生成表单 */
.generate-form {
  background: #f8fafc;
  border-radius: 10px;
  padding: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

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

/* 按钮样式 */
.btn-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #fff;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

/* 徽章 */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: #e8f5e9;
  color: #10B981;
}

.badge-warning {
  background: #fff3e0;
  color: #F59E0B;
}

.badge-danger {
  background: #ffebee;
  color: #EF4444;
}

.badge-info {
  background: #e3f2fd;
  color: #2196F3;
}

/* 激活码文本 */
.code-text {
  background: #e8f5e9;
  color: #10B981;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-weight: 600;
}

/* 淡色文字 */
.text-muted {
  color: #999;
  font-size: 12px;
}

/* 表格容器 */
.table-container {
  overflow-x: auto;
  margin-top: 15px;
}

/* 区块头部 */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-header h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* 表格状态 */
.loading,
.error,
.empty {
  text-align: center;
  color: #999;
  padding: 40px !important;
}

.error {
  color: #EF4444;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #666;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.page-btn:hover {
  background: #f0f0f0;
}

.page-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-color: #667eea;
}

.page-ellipsis {
  padding: 0 10px;
  line-height: 36px;
  color: #999;
}

/* 消息提示 */
.message {
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.message.success {
  background: #e8f5e9;
  color: #10B981;
  border: 1px solid #10B981;
}

.message.error {
  background: #ffebee;
  color: #EF4444;
  border: 1px solid #EF4444;
}

.message.info {
  background: #e3f2fd;
  color: #2196F3;
  border: 1px solid #2196F3;
}

/* ========== TOTP 二次验证样式 ========== */

/* 登录页 TOTP 步骤 */
.totp-step {
  text-align: center;
  padding: 20px 0;
}

.totp-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.totp-tip {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.btn-link {
  background: none;
  border: none;
  color: #667eea;
  cursor: pointer;
  font-size: 14px;
  padding: 10px;
}

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

/* 设置页 TOTP 状态框 */
.totp-status-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.totp-enabled-box {
  background: #e8f5e9;
  border-color: #10B981;
}

.totp-status-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.totp-status-info {
  flex: 1;
}

.totp-status-info h3 {
  font-size: 16px;
  margin-bottom: 5px;
  color: #333;
}

.totp-status-info p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* 设置页 TOTP 设置框 */
.totp-setup-box {
  padding: 25px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
}

.totp-setup-header {
  text-align: center;
  margin-bottom: 25px;
}

.totp-setup-header h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #333;
}

.totp-setup-header p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

/* 二维码容器 */
.qr-code-container {
  text-align: center;
  margin-bottom: 25px;
}

.qr-code {
  width: 200px;
  height: 200px;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 密钥显示 */
.totp-secret-box {
  text-align: center;
  margin-bottom: 25px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.secret-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.totp-secret {
  display: inline-block;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 18px;
  font-weight: 600;
  color: #667eea;
  letter-spacing: 2px;
  background: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* 验证码输入框 */
.totp-verify-box {
  text-align: center;
}

.totp-verify-box > p {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.totp-verify-box input {
  text-align: center;
  font-size: 24px;
  letter-spacing: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  max-width: 200px;
  margin: 0 auto;
}

/* 说明文字 */
.section-desc {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px !important;
}
