/* ============ 后台登录 + 管理页 ============ */

/* 登录页 */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bgPage);
  padding: 24px;
}

.admin-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: 0 4px 24px rgba(20, 40, 20, 0.06), 0 30px 60px rgba(20, 40, 20, 0.08);
  border: 1px solid rgba(200, 215, 195, 0.4);
  text-align: center;
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-page-desc {
  font-size: 13px;
  color: var(--textMuted);
  margin: 0 0 20px;
}

/* 等级与订阅组对应关系 */
.level-sub-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.level-map-item {
  background: var(--bgSoft);
  border-radius: 12px;
  padding: 18px;
  border: 1px solid var(--borderSoft);
}

.level-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.level-map-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--header);
}

.level-map-nodes {
  font-size: 12px;
  color: var(--textMuted);
  background: var(--surface);
  padding: 3px 10px;
  border-radius: 9999px;
}

.level-map-groups {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.level-map-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.level-map-chip.on {
  background: linear-gradient(135deg, var(--accent), var(--accentDark));
  color: white;
}

.level-map-chip.off {
  background: rgba(0, 0, 0, 0.05);
  color: #999;
  text-decoration: line-through;
}

/* 订阅详情行 */
.sub-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-detail-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bgSoft);
  border-radius: 10px;
  border: 1px solid var(--borderSoft);
}

.sub-detail-type {
  flex-shrink: 0;
  width: 90px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accentDeeper);
}

.sub-detail-url {
  flex: 1;
  font-family: var(--fontMono);
  font-size: 12px;
  color: var(--textBody);
  word-break: break-all;
  background: var(--surface);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--borderLight);
}

.sub-copy-mini {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--borderLight);
  background: var(--surface);
  color: var(--textMuted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.sub-copy-mini:hover {
  color: var(--accentDeeper);
  border-color: var(--accent);
}

.sub-copy-mini.copied {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.sub-roman-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accentDark));
  color: white;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  margin-right: 10px;
}

.group-desc-cell {
  font-size: 12px;
  color: var(--textMuted);
}

.remark-cell {
  font-size: 12px;
  color: var(--textMuted);
}

@media (max-width: 768px) {
  .level-sub-map {
    grid-template-columns: 1fr;
  }

  .sub-detail-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .sub-detail-type {
    width: auto;
  }

  .sub-detail-url {
    order: 3;
    width: 100%;
    flex: none;
  }

  .sub-copy-mini {
    order: 2;
    margin-left: auto;
  }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-login-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent), var(--accentDark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--header);
  font-size: 24px;
  box-shadow: 0 8px 20px rgba(108, 191, 74, 0.3);
}

.admin-login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--header);
  margin: 0 0 6px;
}

.admin-login-subtitle {
  font-size: 13px;
  color: var(--textMuted);
  margin: 0 0 28px;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-login-input-wrap {
  position: relative;
  border-radius: 10px;
  background: var(--bgSoft);
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}

.admin-login-input-wrap:focus-within {
  border-color: var(--accentDark);
  background: white;
  box-shadow: 0 0 0 4px rgba(108, 191, 74, 0.1);
}

.admin-login-input-wrap.has-error {
  border-color: var(--danger);
}

.admin-login-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--textFaint);
  font-size: 14px;
}

.admin-login-input-wrap:focus-within .admin-login-icon {
  color: var(--accentDark);
}

.admin-login-input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
}

.admin-login-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-login-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--danger);
}

.admin-login-btn {
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--accent), var(--accentDark));
  color: var(--header);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(108, 191, 74, 0.25);
  font-family: inherit;
}

.admin-login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(108, 191, 74, 0.35);
}

.admin-login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.admin-login-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--textFaint);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.admin-login-back {
  margin-top: 14px;
  font-size: 12px;
  color: var(--textMuted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  transition: color 0.2s ease;
}

.admin-login-back:hover {
  color: var(--accentDeeper);
}

/* ============ 后台主布局 ============ */
.admin-app {
  min-height: 100vh;
  display: flex;
  background: var(--bgPage);
}

.admin-sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid rgba(200, 215, 195, 0.3);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(200, 215, 195, 0.2);
}

.admin-sidebar-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accentDark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--header);
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(108, 191, 74, 0.3);
  flex-shrink: 0;
}

.admin-sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--header);
}

.admin-sidebar-subtitle {
  font-size: 11px;
  color: var(--textMuted);
}

.admin-sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--textMuted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: left;
  width: 100%;
}

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

.admin-nav-item.active {
  background: linear-gradient(135deg, rgba(163, 230, 122, 0.2), rgba(108, 191, 74, 0.1));
  color: var(--accentDeeper);
  font-weight: 600;
}

.admin-nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.admin-sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(200, 215, 195, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-sidebar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--textMuted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: left;
  width: 100%;
}

.admin-sidebar-btn:hover {
  background: var(--bgSoft);
  color: var(--text);
}

.admin-sidebar-btn.logout:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.06);
}

.admin-sidebar-btn i {
  width: 16px;
  text-align: center;
}

/* 主内容 */
.admin-main-content {
  flex: 1;
  min-width: 0;
  padding: 24px 32px 32px;
  overflow-x: hidden;
}

/* 本地模式提示横幅 */
.local-mode-banner {
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 12px 16px;
  background: rgba(20, 80, 50, 0.06);
  border: 1px solid rgba(20, 80, 50, 0.15);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  color: #1a4d33;
}
.local-mode-banner i {
  margin-top: 2px;
  color: #2e8b57;
  flex-shrink: 0;
}
.local-mode-banner strong {
  font-weight: 600;
}

.admin-tab-content {
  max-width: 1200px;
  margin: 0 auto;
}

.admin-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--header);
  margin: 0 0 6px;
}

.admin-page-desc {
  font-size: 13px;
  color: var(--textMuted);
  margin: 0 0 24px;
}

.admin-loading-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
  gap: 10px;
  color: var(--textMuted);
  font-size: 14px;
}

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

.stat-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(20, 40, 20, 0.04);
  border: 1px solid rgba(200, 215, 195, 0.3);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(20, 40, 20, 0.08);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 16px;
}

.stat-total .stat-icon {
  background: rgba(108, 191, 74, 0.15);
  color: var(--accentDeeper);
}

.stat-active .stat-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.stat-expiring .stat-icon {
  background: rgba(251, 191, 36, 0.15);
  color: #b45309;
}

.stat-expired .stat-icon {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--header);
  line-height: 1;
  margin-bottom: 8px;
  font-family: var(--fontMono);
}

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

/* 通用卡片 */
.admin-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(20, 40, 20, 0.04);
  border: 1px solid rgba(200, 215, 195, 0.3);
  margin-bottom: 24px;
}

.admin-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--header);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-card-title > i {
  color: var(--accentDark);
  font-size: 14px;
}

.admin-count-badge {
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--bgSoft);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--textMuted);
}

.admin-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--textFaint);
}

.admin-empty i {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
  display: block;
}

.admin-empty p {
  font-size: 13px;
  margin: 0;
}

/* 表单 */
.admin-add-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--textMuted);
}

.form-input {
  padding: 10px 12px;
  background: var(--bgSoft);
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--accentDark);
  background: white;
  box-shadow: 0 0 0 3px rgba(108, 191, 74, 0.1);
}

.form-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}

.form-input-with-action {
  display: flex;
  gap: 8px;
}

.form-input-with-action .form-input {
  flex: 1;
  min-width: 0;
}

.form-action-btn {
  flex-shrink: 0;
  padding: 0 14px;
  background: var(--bgSoft);
  color: var(--accentDark);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-family: inherit;
}

.form-action-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--header);
  border-color: var(--accentDark);
}

.form-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.form-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accentDark);
  cursor: pointer;
}

.admin-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accentDark));
  color: var(--header);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(108, 191, 74, 0.2);
}

.admin-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 191, 74, 0.3);
}

.admin-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* 表格 */
.admin-table-wrap {
  overflow-x: auto;
}

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

.admin-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--bgSoft);
  color: var(--textMuted);
  font-weight: 500;
  font-size: 12px;
  border-bottom: 1px solid var(--borderLight);
  white-space: nowrap;
}

.admin-table th:first-child {
  border-radius: 8px 0 0 8px;
}

.admin-table th:last-child {
  border-radius: 0 8px 8px 0;
}

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

.admin-table tbody tr:hover {
  background: var(--bgSoft);
}

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

.code-cell {
  font-family: var(--fontMono);
}

.code-text {
  background: rgba(163, 230, 122, 0.1);
  color: var(--accentDeeper);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.username-cell {
  font-weight: 500;
}

.remark-sub {
  font-size: 11px;
  color: var(--textFaint);
  margin-top: 2px;
  font-weight: 400;
}

.empty-text {
  color: var(--textFaint);
  font-style: italic;
}

.date-cell {
  font-family: var(--fontMono);
  font-size: 12px;
  color: var(--textMuted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.level-badge {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(135deg, rgba(163, 230, 122, 0.2), rgba(108, 191, 74, 0.1));
  color: var(--accentDeeper);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-active {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.status-active .status-badge-dot {
  background: #10b981;
}

.status-expired {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
}

.status-expired .status-badge-dot {
  background: var(--danger);
}

.status-disabled {
  background: var(--bgSoft);
  color: var(--textFaint);
}

.status-disabled .status-badge-dot {
  background: var(--textFaint);
}

.actions-cell {
  white-space: nowrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  margin-right: 5px;
  font-family: inherit;
}

.action-btn:last-child {
  margin-right: 0;
}

.action-edit {
  background: rgba(108, 191, 74, 0.1);
  color: var(--accentDeeper);
}

.action-edit:hover {
  background: rgba(108, 191, 74, 0.2);
}

.action-enable {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.action-enable:hover {
  background: rgba(16, 185, 129, 0.2);
}

.action-disable {
  background: rgba(251, 191, 36, 0.1);
  color: #b45309;
}

.action-disable:hover {
  background: rgba(251, 191, 36, 0.2);
}

.action-delete {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.action-delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 15, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(20, 40, 20, 0.2);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

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

.edit-modal {
  max-width: 440px;
}

.edit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.edit-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bgSoft);
  border-radius: 50%;
  cursor: pointer;
  color: var(--textMuted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--header);
  margin: 0 0 20px;
}

.confirm-modal {
  max-width: 380px;
  text-align: center;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  font-size: 28px;
}

.confirm-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--header);
  margin: 0 0 12px;
}

.confirm-desc {
  font-size: 13px;
  color: var(--textMuted);
  margin: 0 0 24px;
  line-height: 1.6;
}

.confirm-code {
  background: rgba(163, 230, 122, 0.15);
  color: var(--accentDeeper);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--fontMono);
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.confirm-btn-cancel {
  background: var(--bgSoft);
  color: var(--text);
}

.confirm-btn-cancel:hover:not(:disabled) {
  background: var(--border);
}

.confirm-btn-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.confirm-btn-danger {
  background: var(--danger);
  color: white;
}

.confirm-btn-danger:hover {
  background: #dc2626;
}

/* 等级管理 */
.levels-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.level-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(20, 40, 20, 0.04);
  border: 1px solid rgba(200, 215, 195, 0.3);
  transition: all 0.3s ease;
}

.level-card:hover {
  box-shadow: 0 6px 20px rgba(20, 40, 20, 0.08);
}

.level-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.level-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.level-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accentDark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--header);
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(108, 191, 74, 0.3);
  flex-shrink: 0;
}

.level-card-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--header);
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-default-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(251, 191, 36, 0.15);
  color: #b45309;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.level-card-key {
  font-size: 12px;
  color: var(--textFaint);
  font-family: var(--fontMono);
  margin-top: 2px;
}

.level-card-meta {
  display: flex;
  gap: 24px;
}

.level-meta-item {
  text-align: center;
}

.level-meta-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--header);
  font-family: var(--fontMono);
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}

.level-meta-label {
  font-size: 11px;
  color: var(--textMuted);
}

.level-card-desc {
  font-size: 13px;
  color: var(--textMuted);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--borderLight);
}

.level-card-links {
  margin-top: 4px;
}

.level-links-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--textMuted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.level-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.level-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bgSoft);
  border-radius: 8px;
}

.level-link-line {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.level-link-types {
  display: flex;
  gap: 6px;
}

.level-link-type {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  background: white;
  color: var(--accentDeeper);
  border-radius: 4px;
  border: 1px solid rgba(108, 191, 74, 0.2);
  text-transform: uppercase;
}

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

@media (max-width: 768px) {
  .admin-sidebar {
    width: 64px;
  }
  .admin-sidebar-header > div:last-child,
  .admin-sidebar-subtitle,
  .admin-nav-item span,
  .admin-sidebar-btn span {
    display: none;
  }
  .admin-sidebar-header {
    justify-content: center;
    padding: 20px 12px;
  }
  .admin-nav-item {
    justify-content: center;
    padding: 12px;
  }
  .admin-main-content {
    padding: 20px 16px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .stat-card {
    padding: 18px;
  }
  .stat-value {
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .level-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .level-card-meta {
    width: 100%;
    justify-content: flex-start;
    gap: 32px;
  }
}
