/* ============================================
   上号器管理系统 - 极简黑白风格
   Mobile-first, iOS Human Interface Guidelines
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --text-primary: #1C1C1E;
  --text-secondary: #8E8E93;
  --text-tertiary: #C7C7CC;
  --border: #E5E5EA;
  --border-light: #F2F2F7;
  --shadow: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --btn-bg: #1C1C1E;
  --btn-text: #FFFFFF;
  --btn-hover: #2C2C2E;
  --danger: #FF3B30;
  --danger-bg: #FFF0EF;
  --success: #34C759;
  --success-bg: #EDF7EE;
  --blue: #007AFF;
  --blue-bg: #EDF4FF;
  --green: #34C759;
  --green-bg: #EDF7EE;
  --purple: #AF52DE;
  --purple-bg: #F5EDFC;
  --orange: #FF9500;
  --orange-bg: #FFF5E8;
  --red: #FF3B30;
  --red-bg: #FFF0EF;
  --cyan: #5AC8FA;
  --cyan-bg: #EDF8FD;

  /* ===== 别名（供新页面使用）===== */
  --bg-card: var(--surface);
  --bg-body: var(--bg);
  --primary: var(--blue);
  --border-color: var(--border);
  --text-muted: var(--text-secondary);
  --nav-bg: rgba(245,245,247,0.85);
}

/* ===== 深色主题 ===== */
html[data-theme="dark"] {
  --bg: #0F0F12;
  --surface: #1C1C1E;
  --text-primary: #F2F2F7;
  --text-secondary: #98989F;
  --text-tertiary: #5A5A5F;
  --border: #2C2C2E;
  --border-light: #232325;
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);

  --btn-bg: #F2F2F7;
  --btn-text: #1C1C1E;
  --btn-hover: #E5E5EA;

  --danger: #FF6961;
  --danger-bg: #33100F;
  --success: #30D158;
  --success-bg: #0E2A16;
  --blue: #0A84FF;
  --blue-bg: #0B2540;
  --green: #30D158;
  --green-bg: #0E2A16;
  --purple: #BF5AF2;
  --purple-bg: #24102F;
  --orange: #FF9F0A;
  --orange-bg: #2E1E04;
  --red: #FF6961;
  --red-bg: #33100F;
  --cyan: #64D2FF;
  --cyan-bg: #062632;

  --bg-card: var(--surface);
  --bg-body: var(--bg);
  --primary: var(--blue);
  --border-color: var(--border);
  --text-muted: var(--text-secondary);
  --nav-bg: rgba(15,15,18,0.85);
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text-primary);
}

html[data-theme="dark"] .top-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #232325;
  color: var(--text-primary);
  border-color: var(--border);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: var(--text-tertiary);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .func-card,
html[data-theme="dark"] .account-card {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .btn-light {
  background: #2C2C2E;
  color: var(--text-primary);
  border-color: var(--border);
}

html[data-theme="dark"] .modal {
  background: var(--surface);
  color: var(--text-primary);
}

html[data-theme="dark"] .modal-overlay {
  background: rgba(0,0,0,0.65);
}

html[data-theme="dark"] img {
  opacity: 0.92;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* ===== Top Navigation Bar ===== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-nav .back-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--border-light);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 16px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.top-nav .back-btn:hover { background: var(--border); }

.top-nav .nav-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-nav .nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.top-nav .nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}
.top-nav .nav-link:hover { color: var(--text-primary); background: var(--border-light); }
.top-nav .nav-link.active { color: var(--text-primary); font-weight: 600; }

.top-nav .logout-link {
  font-size: 14px;
  color: var(--danger);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.top-nav .logout-link:hover { background: var(--danger-bg); }

/* Mobile nav tabs */
.nav-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs a {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-tabs a:hover { color: var(--text-primary); background: var(--border-light); }
.nav-tabs a.active { color: var(--text-primary); background: var(--border); font-weight: 600; }

/* ===== Main Content ===== */
.main-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ===== Page Header ===== */
.page-header {
  margin-bottom: 24px;
  text-align: center;
}
.page-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.page-header p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}
.card-header .card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-header .card-icon svg { width: 22px; height: 22px; }
.card-header .card-title-area { flex: 1; }
.card-header .card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.card-header .card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.card-header .card-action {
  flex-shrink: 0;
}

/* Icon color variants */
.icon-blue { background: var(--blue-bg); color: var(--blue); }
.icon-green { background: var(--green-bg); color: var(--green); }
.icon-purple { background: var(--purple-bg); color: var(--purple); }
.icon-orange { background: var(--orange-bg); color: var(--orange); }
.icon-red { background: var(--red-bg); color: var(--red); }
.icon-cyan { background: var(--cyan-bg); color: var(--cyan); }

/* ===== Function Cards (Home page) ===== */
.func-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.func-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}
.func-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.func-card.highlight {
  border-color: var(--purple);
}
.func-card .fc-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.func-card .fc-icon svg { width: 24px; height: 24px; }
.func-card .fc-body { flex: 1; }
.func-card .fc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.func-card .fc-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}
.func-card.logout .fc-title { color: var(--danger); }

/* ===== Forms ===== */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: none;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(28,28,30,0.08);
}
.form-group textarea {
  min-height: 80px;
  resize: vertical;
}
.form-group select {
  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='%238E8E93' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
  -webkit-appearance: none;
}
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
}
.btn-primary:hover { background: var(--btn-hover); }

.btn-outline {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--border-light); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #E0352B; }

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { background: #2DB84E; }

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
}
.btn-xs {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== Tables ===== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 12px 14px;
  text-align: left;
}
th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--border-light); }

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-active { background: var(--green-bg); color: var(--green); }
.badge-banned { background: var(--red-bg); color: var(--red); }
.badge-used { background: var(--blue-bg); color: var(--blue); }
.badge-expired { background: var(--border-light); color: var(--text-secondary); }
.badge-disabled { background: var(--red-bg); color: var(--red); }

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.stat-card .stat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.stat-card .stat-icon svg { width: 18px; height: 18px; }
.stat-card .stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ===== Charts ===== */
.charts-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (min-width: 700px) {
  .charts-row { grid-template-columns: 2fr 1fr; }
}
.chart-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.chart-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}
canvas { width: 100% !important; max-height: 260px; }

/* ===== Toolbar ===== */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.toolbar input,
.toolbar select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
}
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--text-primary);
}
.toolbar input { flex: 1; min-width: 150px; }
.toolbar select {
  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='%238E8E93' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 16px 0 4px;
}
.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  transition: all 0.2s;
  font-family: inherit;
}
.pagination button:hover { background: var(--border-light); }
.pagination button.active {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Modals ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.modal .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ===== Import Area ===== */
.import-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.import-area:hover {
  border-color: var(--text-secondary);
  background: var(--border-light);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.toast.show { opacity: 1; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

/* ===== Toggle group ===== */
.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toggle-item {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  color: var(--text-secondary);
  background: var(--surface);
}
.toggle-item.active {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
}

/* ===== List items ===== */
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: all 0.2s;
  background: var(--surface);
}
.list-item:hover { border-color: var(--border); }
.list-item.selected { border-color: var(--text-primary); background: var(--border-light); }
.list-item .info { flex: 1; min-width: 0; }
.list-item .info .name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-item .info .meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-item .actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 12px;
}

/* ===== Detail info ===== */
.detail-info {
  margin-bottom: 12px;
}
.detail-info .label {
  font-size: 12px;
  color: var(--text-secondary);
}
.detail-info .value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}
.launcher-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-primary);
  margin: 2px 4px 2px 0;
}

/* ===== Info box ===== */
.info-box {
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}
.info-box code {
  background: var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-primary);
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
}

/* ===== Login page ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}
.login-card .login-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  background: var(--border-light);
  color: var(--text-primary);
}
.login-card .login-icon svg { width: 28px; height: 28px; }
.login-card h1 {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.login-card .login-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.login-card .error-msg {
  background: var(--red-bg);
  border: 1px solid rgba(255,59,48,0.2);
  color: var(--red);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.login-card .error-msg.show { display: block; }
.login-card .hint {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 12px;
  margin-top: 20px;
}
.login-card .hint a {
  color: var(--text-secondary);
  text-decoration: none;
}
.login-card .hint a:hover { color: var(--text-primary); }

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 8px; }
.hidden { display: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .main-content {
    padding: 28px 24px 48px;
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 480px) {
  .page-header h1 { font-size: 22px; }
  .card { padding: 18px; }
  .btn { font-size: 14px; padding: 10px 18px; }
  .form-row { grid-template-columns: 1fr; }
  .top-nav .nav-link { font-size: 12px; padding: 4px 8px; }
}

/* ===== 后台管理子菜单 ===== */
.func-card--stack {
  flex-direction: column;
  align-items: stretch;
}
.func-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.admin-submenu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.admin-sub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  cursor: pointer;
}
.admin-sub-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.admin-sub-card .fc-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.admin-sub-card .fc-icon svg { width: 22px; height: 22px; }
.admin-sub-card .fc-body { flex: 1; }
.admin-sub-card .fc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-sub-card .fc-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}
.admin-sub-card.logout {
  border-color: transparent;
}
.admin-sub-card.logout .fc-title { color: var(--danger); }
.admin-sub-card.logout:hover { border-color: #FFCDD2; }

/* ============================================
   v2.5 UI 优化 — 首页卡片紧凑化与分组
   ============================================ */

/* 分组容器 */
.card-group {
  margin-bottom: 22px;
}
.card-group:last-child {
  margin-bottom: 0;
}

/* 分组标题 */
.group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  margin: 0 0 10px 4px;
  user-select: none;
}
.group-title span {
  font-size: 14px;
  line-height: 1;
}

/* 卡片列表：更紧凑的间距 */
.func-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 卡片本体：压缩内边距，图标垂直居中 */
.func-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  border: 1.5px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
  min-height: 68px;
}
.func-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.func-card:active {
  transform: scale(0.985);
  box-shadow: var(--shadow);
}

/* 图标：略小一点，加柔和投影 */
.func-card .fc-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.func-card .fc-icon svg {
  width: 21px;
  height: 21px;
}

/* 文字区 */
.func-card .fc-body {
  flex: 1;
  min-width: 0;
}
.func-card .fc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 6px;
}
.func-card .fc-title .badge {
  font-size: 11px;
  padding: 1px 7px;
  line-height: 1.6;
}
/* 描述最多两行，超出省略 */
.func-card .fc-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 右侧箭头 */
.func-card > svg:last-child {
  flex-shrink: 0;
  opacity: 0.65;
}

/* 退出卡片弱化 */
.func-card.logout {
  background: transparent;
  box-shadow: none;
  border-color: var(--border);
}
.func-card.logout:hover {
  background: var(--danger-bg);
  border-color: #FFCDD2;
  box-shadow: none;
}

/* 页面头部更紧凑 */
.page-header {
  margin-bottom: 20px;
  text-align: left;
  padding: 0 4px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  line-height: 1.3;
}
.page-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 5px;
  line-height: 1.5;
}

/* 小屏适配 */
@media (max-width: 480px) {
  .page-header h1 { font-size: 20px; }
  .page-header p { font-size: 12.5px; }
  .func-card { padding: 13px 14px; min-height: 64px; gap: 12px; }
  .func-card .fc-icon { width: 40px; height: 40px; border-radius: 11px; }
  .func-card .fc-title { font-size: 14.5px; }
  .func-card .fc-desc { font-size: 12px; }
  .card-group { margin-bottom: 18px; }
  .group-title { font-size: 12.5px; margin-left: 2px; }
  .main-content { padding: 16px 14px 32px; }
}

/* 深色模式微调 */
html[data-theme="dark"] .func-card {
  background: var(--surface);
  border-color: var(--border);
}
html[data-theme="dark"] .func-card.logout {
  background: transparent;
}

/* ============================================
   v2.5.2 UI 美化 — 首页问候卡与卡片增强
   ============================================ */

/* ---------- 顶部问候卡 ---------- */
.hero-card {
  background: linear-gradient(135deg, #1C1C1E 0%, #3A3A3C 100%);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  margin-bottom: 22px;
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(28,28,30,0.16);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}
.hero-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.3;
}
.hero-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,0.62);
  margin-top: 5px;
  line-height: 1.5;
}

/* 统计行 */
.hero-stats {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.hero-stat {
  flex: 1;
  text-align: center;
  position: relative;
}
.hero-stat + .hero-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: rgba(255,255,255,0.12);
}
.hs-num {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
.hs-label {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* 深色模式下的问候卡 */
html[data-theme="dark"] .hero-card {
  background: linear-gradient(135deg, #2C2C2E 0%, #48484A 100%);
  box-shadow: 0 6px 20px rgba(0,0,0,0.32);
}

/* ---------- 分组标题增强 ---------- */
.group-title {
  position: relative;
  padding-left: 11px;
  margin-bottom: 11px;
}
.group-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--blue);
}
.group-title span {
  margin-right: 2px;
}
/* 第二组用绿色、第三组用橙色区分 */
.card-group:nth-of-type(2) .group-title::before { background: var(--success); }
.card-group:nth-of-type(3) .group-title::before { background: #FF9500; }

/* ---------- 卡片微调 ---------- */
.func-card {
  position: relative;
  overflow: hidden;
}
/* 左侧细色条（hover 时出现） */
.func-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blue);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.func-card:hover::before {
  opacity: 1;
}

/* 图标微调：更柔和的底色 */
.func-card .fc-icon {
  box-shadow: none;
  font-size: 0;
}
.func-card .fc-icon svg {
  stroke-width: 1.9;
}

/* 描述文字颜色再淡一点 */
.func-card .fc-desc {
  color: var(--text-secondary);
  opacity: 0.92;
}

/* ---------- 退出卡片 ---------- */
.logout-group {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.func-card.logout {
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--border);
  min-height: 56px;
  padding: 12px 14px;
}
.func-card.logout:hover {
  background: var(--danger-bg);
  border-color: #FFCDD2;
}
.func-card.logout::before {
  background: var(--danger);
}

/* ---------- 小屏 ---------- */
@media (max-width: 480px) {
  .hero-card {
    padding: 16px 15px 14px;
    margin-bottom: 18px;
    border-radius: var(--radius);
  }
  .hero-title { font-size: 17.5px; }
  .hero-sub { font-size: 12px; }
  .hero-stats { margin-top: 13px; padding-top: 12px; gap: 6px; }
  .hs-num { font-size: 18px; }
  .hs-label { font-size: 10.5px; }
  .group-title { font-size: 12.5px; padding-left: 10px; }
  .group-title::before { height: 12px; width: 3px; }
  .logout-group { margin-top: 22px; padding-top: 15px; }
}

/* ---------- 卡片入场动画 ---------- */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.func-card {
  animation: cardIn 0.26s ease both;
}
/* 同组内依次延迟，形成瀑布效果 */
.func-cards .func-card:nth-child(1) { animation-delay: 0.00s; }
.func-cards .func-card:nth-child(2) { animation-delay: 0.03s; }
.func-cards .func-card:nth-child(3) { animation-delay: 0.06s; }
.func-cards .func-card:nth-child(4) { animation-delay: 0.09s; }
.func-cards .func-card:nth-child(5) { animation-delay: 0.12s; }
.func-cards .func-card:nth-child(6) { animation-delay: 0.15s; }
.func-cards .func-card:nth-child(7) { animation-delay: 0.18s; }
.func-cards .func-card:nth-child(n+8) { animation-delay: 0.20s; }

/* 问候卡也淡入 */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-card {
  animation: heroIn 0.24s ease both;
}

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  .hero-card, .func-card {
    animation: none !important;
  }
  .func-card:hover { transform: none; }
}

/* ============================================
   v2.6 全局微交互与响应式布局
   ============================================ */

/* ---------- 1. 按钮统一按压反馈 ---------- */
.btn,
.btn-block,
button.btn,
.top-nav .back-btn,
.func-card,
.admin-sub-card {
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled),
button.btn:active:not(:disabled) {
  transform: scale(0.97);
}

/* ---------- 2. 安全区适配（iPhone 底部横条） ---------- */
.main-content {
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}
.bottom-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- 3. 底部浮动 Toast ---------- */
/* v2.6.6: 旧的黑底 toast 已移除，见文件末尾的主题色版本 */
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.toast-success::before {
  content: "";
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #34C759;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
}
.toast.toast-error::before {
  content: "";
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #FF3B30;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  background-size: 9px;
  background-position: center;
  background-repeat: no-repeat;
}
html[data-theme="dark"] .toast {
  background: rgba(72,72,74,0.96);
  border: 1px solid rgba(255,255,255,.1);
}

/* ---------- 4. 骨架屏 ---------- */
@keyframes skelShine {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg,
    var(--border-light) 25%,
    var(--border) 37%,
    var(--border-light) 63%);
  background-size: 200% 100%;
  animation: skelShine 1.3s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton-card {
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 68px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.skeleton-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
}
.skeleton-lines { flex: 1; }
.skeleton-line {
  height: 11px;
  border-radius: 4px;
  margin-bottom: 7px;
}
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; height: 9px; }

/* ---------- 5. 下拉刷新手势（可视提示） ---------- */
.ptr-indicator {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translate(-50%, -60px);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, opacity .2s;
  opacity: 0;
  z-index: 90;
  pointer-events: none;
}
.ptr-indicator.show {
  transform: translate(-50%, 8px);
  opacity: 1;
}
.ptr-indicator.loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 6. 统一卡片悬停（电脑端） ---------- */
@media (hover: hover) and (pointer: fine) {
  .func-card:hover,
  .admin-sub-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.09);
  }
  .card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.07);
  }
}

/* ---------- 7. 支持减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   电脑版布局（>= 1024px 激活）
   ============================================ */
@media (min-width: 1024px) {
  /* 主内容更宽 */
  .main-content {
    max-width: 1080px;
    padding: 32px 32px 56px;
  }
  .page-header h1 { font-size: 26px; }
  .page-header p  { font-size: 14px; }

  /* 顶部导航加高 */
  .top-nav {
    height: 60px;
    padding: 0 32px;
  }
  .top-nav .nav-title { font-size: 17px; }

  /* 功能卡片：电脑端两列 */
  .func-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .logout-group .func-cards {
    grid-template-columns: 1fr;
    max-width: 320px;
  }
  .func-card { min-height: 78px; padding: 18px 20px; }
  .func-card .fc-icon { width: 46px; height: 46px; }
  .func-card .fc-title { font-size: 15.5px; }

  /* 概览卡更宽松 */
  .hero-card {
    padding: 26px 28px 22px;
    margin-bottom: 28px;
  }
  .hero-title { font-size: 24px; }
  .hero-sub { font-size: 13.5px; margin-top: 7px; }
  .hero-stats { margin-top: 22px; padding-top: 18px; gap: 0; }
  .hs-num { font-size: 26px; }
  .hs-label { font-size: 12px; }

  /* 分组间距 */
  .card-group { margin-bottom: 30px; }
  .group-title { font-size: 14px; margin-bottom: 14px; }
}

/* 超宽屏：功能卡片三列 */
@media (min-width: 1400px) {
  .main-content { max-width: 1280px; }
  .func-cards { grid-template-columns: repeat(3, 1fr); }
}

/* 平板：介于手机与电脑之间 */
@media (min-width: 768px) and (max-width: 1023px) {
  .main-content {
    max-width: 720px;
    padding: 24px 24px 40px;
  }
  .hero-title { font-size: 21px; }
  .hs-num { font-size: 22px; }
}

/* ============================================
   v2.6.1 子页面统一 UI
   统一卡片 / 按钮 / 表单 / 表格 / 空状态
   ============================================ */

/* ---------- 1. 新增主题色变量 ---------- */
:root {
  --brand-1: #4F7CFF;
  --brand-2: #7B5CFF;
  --brand-3: #B15CFF;
  --brand-grad: linear-gradient(135deg, #4F7CFF 0%, #7B5CFF 48%, #B15CFF 100%);
  --brand-soft: rgba(79,124,255,0.08);
}
html[data-theme="dark"] {
  --brand-1: #6B8FFF;
  --brand-2: #9179FF;
  --brand-3: #C77BFF;
  --brand-grad: linear-gradient(135deg, #3B5BDB 0%, #6741D9 48%, #9C36B5 100%);
  --brand-soft: rgba(107,143,255,0.12);
}

/* ---------- 2. 子页面顶部导航统一 ---------- */
.top-nav {
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
html[data-theme="dark"] .top-nav {
  background: rgba(28,28,30,0.86);
}
.top-nav .nav-title {
  font-weight: 700;
  letter-spacing: -0.2px;
}
.top-nav .back-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: all .18s;
}
.top-nav .back-btn:active {
  transform: scale(0.92);
  background: var(--border-light);
}

/* ---------- 3. 卡片统一 ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: none;
  padding: 18px;
  margin-bottom: 14px;
}
html[data-theme="dark"] .card {
  border-color: var(--border);
}
.card-header {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.card-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.45;
}

/* ---------- 4. 按钮统一 ---------- */
.btn {
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 16px;
  border: 1px solid transparent;
  transition: all .18s ease;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-primary,
.btn-blue {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(79,124,255,.22);
}
.btn-primary:active,
.btn-blue:active {
  box-shadow: 0 1px 4px rgba(79,124,255,.18);
  transform: scale(0.97);
}
.btn-light {
  background: var(--border-light);
  color: var(--text-primary);
  border-color: transparent;
}
.btn-light:active { background: var(--border); }
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-outline:active { background: var(--border-light); }
.btn-danger,
.btn-red {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(255,59,48,.2);
}
.btn-danger:active,
.btn-red:active { background: rgba(255,59,48,.16); }
.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(52,199,89,.22);
}
.btn-xs {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

/* 深色模式按钮适配 */
html[data-theme="dark"] .btn-light {
  background: #2C2C2E;
}
html[data-theme="dark"] .btn-outline {
  border-color: #3A3A3C;
}

/* ---------- 5. 表单统一 ---------- */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.1px;
}
.form-group input,
.form-group select,
.form-group textarea,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 11px 13px;
  font-size: 14.5px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text-primary);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-group input::placeholder,
textarea::placeholder {
  color: var(--text-tertiary);
}

/* ---------- 6. 列表项统一 ---------- */
.list-item,
.user-item,
.key-item {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 9px;
  transition: border-color .18s, background .18s;
}
.list-item:active,
.user-item:active {
  background: var(--border-light);
}

/* ---------- 7. 表格统一 ---------- */
table {
  border-collapse: collapse;
  width: 100%;
}
table th {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0.2px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
table td {
  font-size: 13.5px;
  padding: 11px 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
table tr:last-child td {
  border-bottom: none;
}

/* ---------- 8. 徽章统一 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  line-height: 1.6;
  letter-spacing: 0.2px;
}
.badge-active {
  background: var(--success-bg);
  color: var(--success);
}
.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge-blue {
  background: var(--blue-bg);
  color: var(--blue);
}
html[data-theme="dark"] .badge-active { background: rgba(48,209,88,.15); }
html[data-theme="dark"] .badge-danger { background: rgba(255,105,97,.15); }
html[data-theme="dark"] .badge-blue { background: rgba(10,132,255,.15); }

/* ---------- 9. 空状态统一 ---------- */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

/* ---------- 10. 弹窗统一 ---------- */
.modal {
  border-radius: 18px 18px 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  max-height: 86vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}
.modal .close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--border-light);
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.modal .close:active { background: var(--border); }
.modal-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 18px;
  flex-wrap: wrap;
}
.modal-actions .btn { flex: 0 0 auto; }

/* 电脑端弹窗居中 */
@media (min-width: 768px) {
  .modal-overlay { align-items: center !important; }
  .modal {
    border-radius: 18px;
    border-bottom: 1px solid var(--border);
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
  }
}

/* ---------- 11. 工具栏统一 ---------- */
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}
.toolbar input[type="text"],
.toolbar select {
  width: auto;
  flex: 1 1 130px;
  min-width: 0;
  font-size: 13.5px;
  padding: 9px 12px;
  border-radius: 10px;
}

/* ---------- 12. 分页统一 ---------- */
.pager-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 0 6px;
  flex-wrap: wrap;
}
.pager-bar button,
.pager-bar a {
  min-width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  transition: all .16s;
  font-family: inherit;
}
.pager-bar button.active,
.pager-bar a.active {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
}
.pager-bar button:disabled {
  opacity: .4;
  cursor: default;
}

/* ---------- 13. 子页面标题区统一 ---------- */
.page-header {
  margin-bottom: 18px;
}
.page-header h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-primary);
  line-height: 1.3;
}
.page-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 5px;
  line-height: 1.5;
}

/* ---------- 14. 电脑端子页面增强 ---------- */
@media (min-width: 1024px) {
  .card { padding: 22px; margin-bottom: 18px; }
  .card-title { font-size: 16.5px; }
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 14px;
  }
  .toolbar input[type="text"],
  .toolbar select {
    flex: 0 1 180px;
  }
  .page-header h1 { font-size: 24px; }
  .page-header p { font-size: 13.5px; }
  .list-item:hover,
  .user-item:hover {
    border-color: var(--border);
  }
}

/* ---------- 15. 深色模式细节 ---------- */
html[data-theme="dark"] .card {
  background: var(--surface);
}
html[data-theme="dark"] .modal {
  background: var(--surface);
}
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #242426;
  border-color: #3A3A3C;
}

/* ===== 登录页配色配置（settings） ===== */
.lt-preview {
  border-radius: 14px;
  padding: 22px 18px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #4F7CFF 0%, #7B5CFF 48%, #B15CFF 100%);
  transition: background .25s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.lt-preview-inner { display: flex; align-items: center; gap: 12px; }
.lt-preview-logo {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: rgba(255,255,255,.22);
  color: #fff;
  font-size: 19px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.lt-preview-title { color: #fff; font-size: 15px; font-weight: 650; letter-spacing: .2px; }
.lt-preview-sub { color: rgba(255,255,255,.82); font-size: 11.5px; margin-top: 3px; }

.lt-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  margin: 16px 0 9px;
  letter-spacing: .3px;
}
.lt-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 9px;
}
.lt-preset {
  height: 46px;
  border-radius: 10px;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.lt-preset span {
  font-size: 11px; font-weight: 600; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.lt-preset:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.lt-preset.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(79,124,255,.18);
}

.lt-colors { display: flex; flex-direction: column; gap: 10px; }
.lt-color-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-secondary, #f5f5f7);
  border: 1px solid var(--border, #e5e5ea);
}
.lt-dot {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.lt-cname { flex: 0 0 auto; width: 58px; font-size: 12.5px; color: var(--text-secondary); }
.lt-color-row input[type="color"] {
  flex: 0 0 auto;
  width: 34px; height: 30px;
  padding: 0; border: none; border-radius: 7px;
  background: none; cursor: pointer;
}
.lt-color-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.lt-color-row input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.12); border-radius: 7px; }
.lt-hex {
  flex: 1 1 auto; min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; letter-spacing: .5px;
  height: 32px;
  margin: 0;
}

.lt-angle-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-secondary, #f5f5f7);
  border: 1px solid var(--border, #e5e5ea);
}
.lt-angle-row input[type="range"] {
  flex: 1 1 auto; min-width: 0;
  accent-color: #4F7CFF;
  height: 4px;
}
.lt-angle-val {
  flex: 0 0 auto; width: 44px;
  text-align: right;
  font-size: 12.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.lt-actions { display: flex; gap: 10px; margin-top: 18px; }
.lt-actions .btn { flex: 1; }

html[data-theme="dark"] .lt-color-row,
html[data-theme="dark"] .lt-angle-row {
  background: #242426;
  border-color: #3A3A3C;
}

@media (max-width: 480px) {
  .lt-presets { grid-template-columns: repeat(4, 1fr); }
  .lt-preview { padding: 18px 14px; }
  .lt-actions { flex-direction: column; }
}

/* ===== 操作日志卡片（v2.6.4） ===== */
.it {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 9px;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.it:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.07);
  border-color: rgba(79,124,255,.28);
  transform: translateY(-1px);
}
.itH {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}
.itIco {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.itL {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 620;
  color: var(--text-primary);
  letter-spacing: .1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.itR {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--text-tertiary, #8E8E93);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.itB {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.itB b {
  font-weight: 600;
  color: var(--text-primary);
}
.itWho {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(142,142,147,.12);
  color: var(--text-secondary);
  font-size: 11px;
}
.itD {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
}

html[data-theme="dark"] .itWho {
  background: rgba(255,255,255,.09);
}
html[data-theme="dark"] .it:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.32);
}

@media (max-width: 480px) {
  .it { padding: 11px 12px; }
  .itL { font-size: 13.5px; }
  .itR { font-size: 11px; }
  .itIco { width: 26px; height: 26px; border-radius: 8px; }
}

/* ===== 动效模式选择器（v2.6.4） ===== */
.lt-anim-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.lt-anim-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px 10px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
  font-family: inherit;
}
.lt-anim-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(79,124,255,.4);
}
.lt-anim-btn.active {
  border-color: #4F7CFF;
  background: rgba(79,124,255,.07);
  box-shadow: 0 0 0 3px rgba(79,124,255,.13);
}
.lt-anim-dot {
  width: 34px;
  height: 20px;
  border-radius: 6px;
  display: block;
}
/* 静止：纯色块 */
.lt-anim-none {
  background: linear-gradient(135deg, #4F7CFF, #B15CFF);
}
/* 流光：色块循环流动 */
.lt-anim-flow {
  background: linear-gradient(90deg, #4F7CFF, #7B5CFF, #B15CFF, #4F7CFF);
  background-size: 300% 100%;
  animation: ltwMiniFlow 3s linear infinite;
}
/* 呼吸：明暗起伏 */
.lt-anim-pulse {
  background: linear-gradient(135deg, #4F7CFF, #B15CFF);
  animation: ltwMiniPulse 1.8s ease-in-out infinite;
}
@keyframes ltwMiniFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
@keyframes ltwMiniPulse {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}
.lt-anim-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.lt-anim-hint {
  font-size: 10.5px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}

/* 预览块同步动效 */
.lt-preview.ltw-flow {
  background-size: 300% 300% !important;
  animation: ltFlowPreview 8s ease-in-out infinite;
}
.lt-preview.ltw-pulse {
  animation: ltPulsePreview 3.2s ease-in-out infinite;
}
@keyframes ltFlowPreview {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes ltPulsePreview {
  0%, 100% { filter: brightness(1) saturate(1); }
  50%      { filter: brightness(1.22) saturate(1.12); }
}

html[data-theme="dark"] .lt-anim-btn { background: #242426; }
html[data-theme="dark"] .lt-anim-btn.active { background: rgba(79,124,255,.14); }

@media (max-width: 480px) {
  .lt-anim-row { grid-template-columns: 1fr; gap: 8px; }
  .lt-anim-btn {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    text-align: left;
  }
  .lt-anim-dot { flex: 0 0 auto; }
  .lt-anim-name { flex: 0 0 auto; }
  .lt-anim-hint { flex: 1 1 auto; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  .lt-anim-flow, .lt-anim-pulse,
  .lt-preview.ltw-flow, .lt-preview.ltw-pulse { animation: none !important; }
}

/* ===== v2.6.5 动效选择器修复（文字不再截断） ===== */
.lt-anim-btn {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  padding: 11px 11px !important;
  text-align: left;
  min-width: 0;
  overflow: hidden;
}
.lt-anim-dot {
  flex: 0 0 auto !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 8px !important;
}
.lt-anim-name {
  flex: 0 0 auto;
  font-size: 13px !important;
  white-space: nowrap;
}
.lt-anim-hint {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 10.5px !important;
  text-align: right;
  line-height: 1.3;
  white-space: normal;
  word-break: break-all;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 窄屏：三列变一列，横排展示 */
@media (max-width: 560px) {
  .lt-anim-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .lt-anim-btn {
    padding: 12px 13px !important;
    gap: 11px !important;
  }
  .lt-anim-dot {
    width: 32px !important;
    height: 24px !important;
  }
  .lt-anim-name {
    font-size: 13.5px !important;
    min-width: 42px;
  }
  .lt-anim-hint {
    font-size: 11.5px !important;
    text-align: left;
    -webkit-line-clamp: 1;
  }
}

/* 中等宽度：两列 */
@media (min-width: 561px) and (max-width: 900px) {
  .lt-anim-row {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ===== 远程公告与更新配置（v2.6.5） ===== */
.rc-pick {
  padding: 16px;
}
.rc-pick-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}
.rc-pick-ico {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4F7CFF, #B15CFF);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(79,124,255,.26);
}
.rc-pick-txt { flex: 1 1 auto; min-width: 0; }
.rc-pick-t {
  font-size: 15px; font-weight: 640;
  color: var(--text-primary);
  line-height: 1.3;
}
.rc-pick-s {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.5;
}
.rc-select {
  width: 100%;
  height: 46px;
  font-size: 14.5px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.rc-select:focus {
  outline: none;
  border-color: #4F7CFF;
  box-shadow: 0 0 0 3px rgba(79,124,255,.13);
}

/* 分区卡片 */
.rc-sec {
  padding: 0;
  overflow: hidden;
}
.rc-sec-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 15px 13px;
  background: var(--bg-secondary, #f7f7f9);
  border-bottom: 1px solid var(--border);
}
.rc-ico {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.rc-ico.orange { background: rgba(255,149,0,.14); color: #FF9500; }
.rc-ico.blue   { background: rgba(79,124,255,.13); color: #4F7CFF; }
.rc-sec-txt { flex: 1 1 auto; min-width: 0; }
.rc-sec-t {
  font-size: 14.5px; font-weight: 650;
  color: var(--text-primary);
  line-height: 1.3;
}
.rc-sec-s {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.45;
}
.rc-sec-body {
  padding: 15px 15px 4px;
}

/* 字段 */
.rc-fld {
  margin-bottom: 15px;
}
.rc-lb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 560;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.rc-hint-inline {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-tertiary, #8E8E93);
  background: rgba(142,142,147,.12);
  padding: 1px 7px;
  border-radius: 5px;
}
.rc-fld input[type="text"],
.rc-fld input[type="number"],
.rc-fld textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.rc-fld input:focus,
.rc-fld textarea:focus {
  outline: none;
  border-color: #4F7CFF;
  box-shadow: 0 0 0 3px rgba(79,124,255,.13);
}
.rc-fld textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}
.rc-tip-inline {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 6px;
  padding-left: 2px;
}

/* 强制更新行 */
.rc-force {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  margin: 4px 0 15px;
  border-radius: 11px;
  background: rgba(255,59,48,.055);
  border: 1px solid rgba(255,59,48,.16);
}
.rc-force-txt { flex: 1 1 auto; min-width: 0; }
.rc-force-t {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.rc-force-s {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.45;
}

/* 底部按钮 */
.rc-actions {
  display: flex;
  gap: 10px;
}
.rc-actions .btn {
  flex: 1;
  min-height: 46px;
  font-size: 14.5px;
  font-weight: 600;
}

html[data-theme="dark"] .rc-sec-head { background: #232325; }
html[data-theme="dark"] .rc-select,
html[data-theme="dark"] .rc-fld input[type="text"],
html[data-theme="dark"] .rc-fld input[type="number"],
html[data-theme="dark"] .rc-fld textarea {
  background: #242426;
  border-color: #3A3A3C;
}
html[data-theme="dark"] .rc-hint-inline { background: rgba(255,255,255,.1); }

@media (max-width: 480px) {
  .rc-pick { padding: 14px; }
  .rc-pick-ico { width: 36px; height: 36px; border-radius: 11px; }
  .rc-sec-head { padding: 13px 13px 11px; gap: 10px; }
  .rc-sec-body { padding: 13px 13px 2px; }
  .rc-select { height: 44px; font-size: 14px; }
  .rc-fld input[type="text"],
  .rc-fld input[type="number"],
  .rc-fld textarea { padding: 10px 12px; font-size: 15px; }
  .rc-actions { flex-direction: column; }
  .rc-actions .btn { min-height: 48px; }
}

/* ===== v2.6.6 Toast 改为主题色卡片（不再纯黑） ===== */
.toast {
  background: var(--surface, #fff) !important;
  color: var(--text-primary, #1C1C1E) !important;
  border: 1px solid var(--border, #E5E5EA) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06) !important;
  padding: 12px 20px 12px 16px !important;
  border-radius: 14px !important;
  font-size: 13.5px !important;
  font-weight: 560 !important;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 40px);
  box-sizing: border-box;
  backdrop-filter: blur(12px);
}
/* 左侧状态色条 */
.toast::before {
  content: '';
  flex: 0 0 auto;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--primary, #4F7CFF);
}
.toast.toast-success::before { background: #10B981; }
.toast.toast-error::before { background: #FF3B30; }

.toast.toast-success {
  background: var(--surface, #fff) !important;
  color: var(--text-primary, #1C1C1E) !important;
  border-color: rgba(16,185,129,.35) !important;
}
.toast.toast-error {
  background: var(--surface, #fff) !important;
  color: var(--text-primary, #1C1C1E) !important;
  border-color: rgba(255,59,48,.35) !important;
}

/* 深色模式（用户手动开启时才生效） */
html[data-theme="dark"] .toast,
html[data-theme="dark"] .toast.toast-success,
html[data-theme="dark"] .toast.toast-error {
  background: #2C2C2E !important;
  color: #F2F2F7 !important;
  border-color: #3A3A3C !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.5) !important;
}

@media (max-width: 480px) {
  .toast {
    padding: 11px 16px 11px 14px !important;
    font-size: 13px !important;
    border-radius: 13px !important;
    max-width: calc(100vw - 32px);
  }
}

/* ═══════════════════════════════════════
   重复账号弹窗（v2.6.7 彻底重写）
   只保留这一套规则，不再叠加补丁
   ═══════════════════════════════════════ */

/* 遮罩：手机上从底部弹出 */
#dupModal.modal-overlay {
  padding: 0;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 600px) {
  #dupModal.modal-overlay { align-items: center; padding: 20px; }
}

/* 弹窗主体：弹性纵向，头尾固定、中间滚动 */
#dupModal .dup-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  max-height: 88dvh;            /* 移动端地址栏收起时更准 */
  padding: 0;
  margin: 0;
  background: var(--surface, #fff);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  box-shadow: 0 -4px 40px rgba(0,0,0,.18);
  animation: dupSlideUp .26s cubic-bezier(.32,.72,0,1);
}
@keyframes dupSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@media (min-width: 600px) {
  #dupModal .dup-modal {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.24);
    animation: dupFadeIn .2s ease;
  }
  @keyframes dupFadeIn {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: scale(1); }
  }
}

/* 头部 */
#dupModal .dup-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border, #E5E5EA);
}
#dupModal .dup-head-ico {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,149,0,.16), rgba(255,59,48,.16));
  color: #FF9500;
  display: flex; align-items: center; justify-content: center;
}
#dupModal .dup-head-txt { flex: 1 1 auto; min-width: 0; }
#dupModal .dup-title {
  font-size: 16px;
  font-weight: 680;
  color: var(--text-primary, #1C1C1E);
  line-height: 1.25;
}
#dupModal .dup-sub {
  font-size: 11.5px;
  color: var(--text-secondary, #8E8E93);
  margin-top: 3px;
  line-height: 1.4;
}
#dupModal .dup-close {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border: none;
  background: rgba(142,142,147,.13);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--text-secondary, #8E8E93);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
#dupModal .dup-close:active { background: rgba(142,142,147,.28); }

/* 滚动内容区 */
#dupModal .dup-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 18px 10px;
}

/* 概要卡 */
#dupModal .dup-sum {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 16px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,149,0,.08), rgba(255,59,48,.08));
  border: 1px solid rgba(255,59,48,.18);
  margin-bottom: 13px;
}
#dupModal .dup-sum-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
#dupModal .dup-sum-item b {
  font-size: 26px;
  font-weight: 750;
  line-height: 1;
  color: var(--text-primary, #1C1C1E);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.8px;
}
#dupModal .dup-sum-item.red b { color: #FF3B30; }
#dupModal .dup-sum-item span {
  font-size: 11.5px;
  color: var(--text-secondary, #8E8E93);
  font-weight: 500;
}
#dupModal .dup-sum-line {
  width: 1px;
  height: 32px;
  background: rgba(255,59,48,.22);
  flex: 0 0 auto;
}

/* 提示条 */
#dupModal .dup-tip {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-secondary, #8E8E93);
  background: rgba(79,124,255,.07);
  border-left: 3px solid #4F7CFF;
  border-radius: 0 9px 9px 0;
  padding: 11px 13px;
  margin-bottom: 15px;
}

/* 分组卡 */
#dupModal .dup-group {
  border: 1px solid var(--border, #E5E5EA);
  border-radius: 14px;
  padding: 13px 14px;
  margin-bottom: 12px;
  background: var(--surface, #fff);
}
#dupModal .dup-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
#dupModal .dup-badge {
  font-size: 11.5px;
  font-weight: 650;
  color: #4F7CFF;
  background: rgba(79,124,255,.13);
  padding: 3px 10px;
  border-radius: 7px;
  white-space: nowrap;
}
#dupModal .dup-count {
  font-size: 11.5px;
  color: var(--text-secondary, #8E8E93);
  margin-left: auto;
  white-space: nowrap;
}
#dupModal .dup-token {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--text-tertiary, #8E8E93);
  background: var(--bg-secondary, #F2F2F7);
  border-radius: 7px;
  padding: 6px 9px;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .2px;
}

/* 单条记录 */
#dupModal .dup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed var(--border, #E5E5EA);
}
#dupModal .dup-row:first-of-type { border-top: none; padding-top: 2px; }
#dupModal .dup-id {
  flex: 0 0 auto;
  min-width: 42px;
  font-size: 11px;
  color: var(--text-tertiary, #8E8E93);
  font-family: ui-monospace, monospace;
  opacity: .8;
}
#dupModal .dup-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}
#dupModal .dup-info b {
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text-primary, #1C1C1E);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
#dupModal .dup-info i {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 10.5px;
  color: var(--text-secondary, #8E8E93);
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(142,142,147,.12);
  white-space: nowrap;
}
#dupModal .dup-keep {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 600;
  color: #10B981;
  background: rgba(16,185,129,.14);
  padding: 6px 12px;
  border-radius: 8px;
  min-width: 56px;
  text-align: center;
}
#dupModal .dup-del {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 600;
  color: #FF3B30;
  background: rgba(255,59,48,.09);
  border: 1px solid rgba(255,59,48,.32);
  padding: 6px 14px;
  border-radius: 8px;
  min-width: 56px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, transform .1s ease;
}
#dupModal .dup-del:active {
  background: rgba(255,59,48,.2);
  transform: scale(.95);
}

/* 状态：加载 / 空 */
#dupModal .dup-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary, #8E8E93);
  font-size: 13px;
}
#dupModal .dup-loading::after {
  content: '';
  display: block;
  width: 24px; height: 24px;
  margin: 14px auto 0;
  border: 2.5px solid rgba(79,124,255,.2);
  border-top-color: #4F7CFF;
  border-radius: 50%;
  animation: dupSpin .7s linear infinite;
}
@keyframes dupSpin { to { transform: rotate(360deg); } }

#dupModal .dup-empty {
  text-align: center;
  padding: 40px 20px;
}
#dupModal .dup-empty-ico {
  width: 56px; height: 56px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: rgba(16,185,129,.14);
  color: #10B981;
  font-size: 28px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  animation: dupPop .42s cubic-bezier(.34,1.56,.64,1);
}
@keyframes dupPop {
  from { transform: scale(.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
#dupModal .dup-empty-t {
  font-size: 15px;
  font-weight: 620;
  color: var(--text-primary, #1C1C1E);
}
#dupModal .dup-empty-s {
  font-size: 12px;
  color: var(--text-secondary, #8E8E93);
  margin-top: 6px;
}

/* 底部按钮：固定不被裁 */
#dupModal .dup-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 13px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border, #E5E5EA);
  background: var(--surface, #fff);
}
#dupModal .dup-actions .btn {
  flex: 1;
  min-height: 46px;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 12px;
}

/* 深色模式 */
html[data-theme="dark"] #dupModal .dup-modal { background: #1C1C1E; }
html[data-theme="dark"] #dupModal .dup-token { background: #2C2C2E; }
html[data-theme="dark"] #dupModal .dup-info i { background: rgba(255,255,255,.1); }
html[data-theme="dark"] #dupModal .dup-close { background: rgba(255,255,255,.12); }
html[data-theme="dark"] #dupModal .dup-actions { background: #1C1C1E; }

/* 小屏微调 */
@media (max-width: 400px) {
  #dupModal .dup-body { padding: 14px 14px 8px; }
  #dupModal .dup-head { padding: 16px 14px 12px; }
  #dupModal .dup-actions { padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
  #dupModal .dup-sum-item b { font-size: 23px; }
  #dupModal .dup-group { padding: 12px 12px; }
}


/* ═══════════════════════════════════════
   重复账号结果卡（v2.6.8）
   让「发现多少条重复」成为视觉中心
   ═══════════════════════════════════════ */
#dupModal .dup-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 20px 18px 18px;
  margin-bottom: 14px;
  text-align: center;
  background: linear-gradient(150deg, #FFF4E6 0%, #FFEBE9 55%, #FFE3E0 100%);
  border: 1px solid rgba(255,120,60,.22);
}
/* 右上角装饰光斑 */
#dupModal .dup-hero::before {
  content: '';
  position: absolute;
  top: -46px; right: -34px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,149,0,.22), transparent 70%);
  pointer-events: none;
}
#dupModal .dup-hero::after {
  content: '';
  position: absolute;
  bottom: -50px; left: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,59,48,.14), transparent 70%);
  pointer-events: none;
}

/* 「检测完成」小徽章 */
#dupModal .dup-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255,149,0,.16);
  color: #D97706;
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: .2px;
  margin-bottom: 11px;
  position: relative;
  z-index: 1;
}

#dupModal .dup-hero-title {
  font-size: 14px;
  font-weight: 600;
  color: #9A3412;
  letter-spacing: .3px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

/* 大数字行 */
#dupModal .dup-hero-nums {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
#dupModal .dup-hero-num {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
#dupModal .dup-hero-num b {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: #EA580C;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1.6px;
  text-shadow: 0 2px 8px rgba(234,88,12,.18);
}
#dupModal .dup-hero-num:last-child b {
  color: #DC2626;
  text-shadow: 0 2px 8px rgba(220,38,38,.18);
}
#dupModal .dup-hero-num span {
  font-size: 12px;
  font-weight: 560;
  color: #B45309;
}
#dupModal .dup-hero-num:last-child span {
  color: #B91C1C;
}
#dupModal .dup-hero-x {
  font-size: 20px;
  font-weight: 700;
  color: rgba(234,88,12,.42);
  margin-bottom: 14px;
}

#dupModal .dup-hero-desc {
  font-size: 12.5px;
  color: #92400E;
  line-height: 1.55;
  position: relative;
  z-index: 1;
}

/* 操作建议条 */
#dupModal .dup-advice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(79,124,255,.07);
  border: 1px solid rgba(79,124,255,.16);
  margin-bottom: 16px;
}
#dupModal .dup-advice-ico {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: rgba(79,124,255,.15);
  color: #4F7CFF;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
#dupModal .dup-advice-txt {
  flex: 1 1 auto;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-secondary, #6B6B70);
}
#dupModal .dup-advice-hl {
  color: #4F7CFF;
  font-weight: 620;
}

/* 明细小标题 */
#dupModal .dup-list-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px 9px;
  border-bottom: 1px solid var(--border, #E5E5EA);
  margin-bottom: 12px;
}
#dupModal .dup-list-t {
  font-size: 13px;
  font-weight: 650;
  color: var(--text-primary, #1C1C1E);
  letter-spacing: .2px;
}
#dupModal .dup-list-c {
  font-size: 11.5px;
  color: var(--text-secondary, #8E8E93);
}

/* 深色模式 */
html[data-theme="dark"] #dupModal .dup-hero {
  background: linear-gradient(150deg, #3A2A1E 0%, #3B2422 55%, #3A2020 100%);
  border-color: rgba(255,120,60,.28);
}
html[data-theme="dark"] #dupModal .dup-hero-title { color: #FDBA74; }
html[data-theme="dark"] #dupModal .dup-hero-num b { color: #FB923C; }
html[data-theme="dark"] #dupModal .dup-hero-num:last-child b { color: #F87171; }
html[data-theme="dark"] #dupModal .dup-hero-num span { color: #D6A97A; }
html[data-theme="dark"] #dupModal .dup-hero-num:last-child span { color: #FCA5A5; }
html[data-theme="dark"] #dupModal .dup-hero-desc { color: #C9A882; }
html[data-theme="dark"] #dupModal .dup-hero-badge {
  background: rgba(251,146,60,.18);
  color: #FDBA74;
}
html[data-theme="dark"] #dupModal .dup-advice {
  background: rgba(79,124,255,.1);
  border-color: rgba(79,124,255,.24);
}

/* 小屏 */
@media (max-width: 400px) {
  #dupModal .dup-hero { padding: 17px 14px 15px; border-radius: 14px; }
  #dupModal .dup-hero-num b { font-size: 34px; letter-spacing: -1.2px; }
  #dupModal .dup-hero-nums { gap: 12px; }
  #dupModal .dup-hero-title { font-size: 13px; margin-bottom: 10px; }
  #dupModal .dup-advice-txt { font-size: 12px; }
}


/* ===== v2.7.6 hero 统计卡片可点击 ===== */
a.hero-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 10px;
  padding: 6px 2px;
  margin: -6px -2px;
  transition: background .18s ease, transform .18s ease;
}
a.hero-link:active {
  background: rgba(255,255,255,.14);
  transform: scale(.97);
}
a.hero-link .hs-num,
a.hero-link .hs-label {
  color: inherit;
}

/* ===== v2.7.6 四个统计卡片：手机端 2x2 ===== */
@media (max-width: 560px) {
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 0;
    row-gap: 12px;
  }
  .hero-stat { flex: none; }
  /* 2x2 时隐藏竖分隔线，改用横向分隔 */
  .hero-stat + .hero-stat::before { display: none; }
  .hero-stat:nth-child(n+3)::after {
    content: "";
    position: absolute;
    top: -6px; left: 8%; right: 8%;
    height: 1px;
    background: rgba(255,255,255,.10);
  }
  .hs-num { font-size: 20px; }
  .hs-label { font-size: 10.5px; margin-top: 1px; }
}

/* ===== v2.7.8 统计卡片重做 ===== */
.hero-stats {
  display: grid !important;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.14);
}

.hs-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 11px 6px 10px;
  border-radius: 13px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.13);
  text-decoration: none;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
  min-width: 0;
}
.hs-card:active {
  background: rgba(255,255,255,.22);
  transform: scale(.965);
}

.hs-card .hs-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255,255,255,.16);
  color: #fff;
  margin-bottom: 1px;
}

.hs-card .hs-num {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  color: #fff;
  transition: color .2s ease;
}
/* 数字为 0 时淡一点，有数据时更亮 */
.hs-card .hs-num.is-zero {
  color: rgba(255,255,255,.45);
  font-weight: 700;
}

.hs-card .hs-label {
  font-size: 10.5px;
  line-height: 1.2;
  color: rgba(255,255,255,.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 深色模式 */
html[data-theme="dark"] .hs-card {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.09);
}
html[data-theme="dark"] .hs-card .hs-num.is-zero {
  color: rgba(255,255,255,.35);
}

/* ===== v2.7.26 统一优化：卡片配色 + 布局 ===== */
/* 图标容器微调，支持渐变 */
.hs-card .hs-ico{
  width: 26px; height: 26px; border-radius: 9px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.hs-card:hover .hs-ico{ transform: translateY(-1px); }

/* ---- 十种配色（tone-*）---- */
.hs-card.tone-blue   .hs-ico{ background:linear-gradient(135deg,#4F7CFF,#6A8DFF); box-shadow:0 3px 10px rgba(79,124,255,.38); }
.hs-card.tone-teal   .hs-ico{ background:linear-gradient(135deg,#14B8A6,#2DD4BF); box-shadow:0 3px 10px rgba(20,184,166,.38); }
.hs-card.tone-violet .hs-ico{ background:linear-gradient(135deg,#8B5CF6,#A78BFA); box-shadow:0 3px 10px rgba(139,92,246,.38); }
.hs-card.tone-indigo .hs-ico{ background:linear-gradient(135deg,#6366F1,#818CF8); box-shadow:0 3px 10px rgba(99,102,241,.38); }
.hs-card.tone-green  .hs-ico{ background:linear-gradient(135deg,#22C55E,#4ADE80); box-shadow:0 3px 10px rgba(34,197,94,.38); }
.hs-card.tone-amber  .hs-ico{ background:linear-gradient(135deg,#F59E0B,#FBBF24); box-shadow:0 3px 10px rgba(245,158,11,.38); }
.hs-card.tone-orange .hs-ico{ background:linear-gradient(135deg,#FB7A32,#FF9A5A); box-shadow:0 3px 10px rgba(251,122,50,.38); }
.hs-card.tone-pink   .hs-ico{ background:linear-gradient(135deg,#EC4899,#F472B6); box-shadow:0 3px 10px rgba(236,72,153,.38); }
.hs-card.tone-cyan   .hs-ico{ background:linear-gradient(135deg,#06B6D4,#22D3EE); box-shadow:0 3px 10px rgba(6,182,212,.38); }
.hs-card.tone-rose   .hs-ico{ background:linear-gradient(135deg,#F43F5E,#FB7185); box-shadow:0 3px 10px rgba(244,63,94,.38); }

/* 空数据时图标降饱和 */
.hs-card:has(.hs-num.is-zero) .hs-ico{
  filter: grayscale(.55) opacity(.75);
  box-shadow: none;
}

/* ---- 自适应列数：卡片多时自动变小 ---- */
@media (max-width: 420px){
  .hero-stats{ gap: 7px; margin-top: 12px; padding-top: 12px; }
  .hs-card{ padding: 10px 4px 9px; border-radius: 12px; gap: 2px; }
  .hs-card .hs-ico{ width: 24px; height: 24px; border-radius: 8px; }
  .hs-card .hs-ico svg{ width: 13px; height: 13px; }
  .hs-card .hs-num{ font-size: 19px; letter-spacing: -.4px; }
  .hs-card .hs-label{ font-size: 10px; }
}

/* 列数 >= 5 时进一步紧凑 */
.hero-stats[style*="--cols: 5"] .hs-card,
.hero-stats[style*="--cols: 6"] .hs-card,
.hero-stats[style*="--cols: 7"] .hs-card,
.hero-stats[style*="--cols: 8"] .hs-card,
.hero-stats[style*="--cols: 9"] .hs-card,
.hero-stats[style*="--cols: 10"] .hs-card{
  padding: 9px 4px 8px;
  gap: 2px;
}
.hero-stats[style*="--cols: 5"] .hs-card .hs-num,
.hero-stats[style*="--cols: 6"] .hs-card .hs-num,
.hero-stats[style*="--cols: 7"] .hs-card .hs-num,
.hero-stats[style*="--cols: 8"] .hs-card .hs-num,
.hero-stats[style*="--cols: 9"] .hs-card .hs-num,
.hero-stats[style*="--cols: 10"] .hs-card .hs-num{
  font-size: 18px;
}
.hero-stats[style*="--cols: 5"] .hs-card .hs-label,
.hero-stats[style*="--cols: 6"] .hs-card .hs-label,
.hero-stats[style*="--cols: 7"] .hs-card .hs-label,
.hero-stats[style*="--cols: 8"] .hs-card .hs-label,
.hero-stats[style*="--cols: 9"] .hs-card .hs-label,
.hero-stats[style*="--cols: 10"] .hs-card .hs-label{
  font-size: 9.5px;
  letter-spacing: -.1px;
}

/* 深色模式下图标保持\u9c9c艳 */
html[data-theme="dark"] .hs-card:has(.hs-num.is-zero) .hs-ico{
  filter: grayscale(.5) opacity(.6);
}

/* ===== v2.7.9 首页卡片自定义 ===== */
.hero-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.hero-cfg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease, transform .14s ease;
}
.hero-cfg:active {
  background: rgba(255,255,255,.24);
  transform: scale(.95);
}


/* ---- 自定义弹窗 ---- */
.cfg-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,.42);
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
@media (min-width: 600px) {
  .cfg-mask { align-items: center; padding: 24px; }
}
.cfg-box {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px rgba(0,0,0,.18);
  animation: cfgUp .26s cubic-bezier(.22,.9,.3,1);
}
@media (min-width: 600px) {
  .cfg-box { border-radius: 20px; padding-bottom: 16px; }
}
@keyframes cfgUp {
  from { transform: translateY(28px); opacity: .6; }
  to   { transform: translateY(0);    opacity: 1; }
}
.cfg-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.cfg-title {
  font-size: 16px;
  font-weight: 700;
  color: #1C1C1E;
  letter-spacing: -.2px;
}
.cfg-sub {
  font-size: 11.5px;
  color: #8E8E93;
  margin-top: 3px;
  line-height: 1.5;
}
.cfg-x {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: #F2F2F7;
  color: #8E8E93;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.cfg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cfg-loading {
  padding: 24px 0;
  text-align: center;
  color: #8E8E93;
  font-size: 12.5px;
}
.cfg-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 13px;
  border: 1.5px solid #EFEFF4;
  background: #FAFAFC;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .16s ease, background .16s ease;
}
.cfg-item.on {
  border-color: #4F7CFF;
  background: rgba(79,124,255,.055);
}
.cfg-check {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid #D1D1D6;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background .16s ease, border-color .16s ease;
}
.cfg-item.on .cfg-check {
  background: #4F7CFF;
  border-color: #4F7CFF;
}
.cfg-name {
  flex: 1 1 auto;
  font-size: 13.5px;
  font-weight: 600;
  color: #1C1C1E;
}
.cfg-pos {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #4F7CFF;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cfg-foot {
  display: flex;
  gap: 9px;
  margin-top: 15px;
}
.cfg-btn {
  flex: 1;
  height: 44px;
  border-radius: 13px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .16s ease, transform .14s ease;
}
.cfg-btn:active { transform: scale(.975); }
.cfg-btn.ghost {
  background: #F2F2F7;
  color: #1C1C1E;
}
.cfg-btn.primary {
  background: linear-gradient(135deg, #4F7CFF 0%, #7B5CFF 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,124,255,.28);
}

/* 深色 */
html[data-theme="dark"] .cfg-box { background: #1C1C1E; }
html[data-theme="dark"] .cfg-title { color: #F2F2F7; }
html[data-theme="dark"] .cfg-x { background: #2C2C2E; }
html[data-theme="dark"] .cfg-item { background: #242426; border-color: #2C2C2E; }
html[data-theme="dark"] .cfg-item.on { border-color: #5B85FF; background: rgba(79,124,255,.14); }
html[data-theme="dark"] .cfg-check { background: #1C1C1E; border-color: #3A3A3C; }
html[data-theme="dark"] .cfg-item.on .cfg-check { background: #4F7CFF; border-color: #4F7CFF; }
html[data-theme="dark"] .cfg-name { color: #F2F2F7; }
html[data-theme="dark"] .cfg-btn.ghost { background: #2C2C2E; color: #F2F2F7; }

/* ===== v2.7.9 首页功能区视觉升级 ===== */
.func-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-group .group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #8E8E93;
  letter-spacing: .5px;
  margin: 0 0 11px 2px;
  text-transform: none;
}
.card-group .group-title::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4F7CFF, #7B5CFF);
  flex: 0 0 auto;
}
.card-group .group-title span {
  order: 2;
  font-size: 12px;
  opacity: .85;
}

/* 卡片本体 */
.card-group .func-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  border-radius: 15px;
  background: #FFFFFF;
  border: 1px solid #EFEFF4;
  box-shadow: 0 1px 3px rgba(0,0,0,.035);
  text-decoration: none;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.card-group .func-card:active {
  transform: scale(.985);
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  border-color: #DDE3FF;
}

/* 图标容器 */
.card-group .func-card .fc-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.card-group .func-card .fc-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

/* 文字区 */
.card-group .func-card .fc-body {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.card-group .func-card .fc-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 650;
  color: #1C1C1E;
  line-height: 1.3;
  letter-spacing: -.1px;
}
.card-group .func-card .fc-desc {
  font-size: 11.5px;
  color: #8E8E93;
  line-height: 1.45;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 右侧箭头 */
.card-group .func-card > svg:last-child {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  stroke: #C7C7CC;
  transition: transform .16s ease, stroke .16s ease;
}
.card-group .func-card:active > svg:last-child {
  transform: translateX(2px);
  stroke: #4F7CFF;
}

/* 数字徽标 */
.card-group .func-card .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}

/* 深色 */
html[data-theme="dark"] .card-group .func-card {
  background: #1C1C1E;
  border-color: #2C2C2E;
}
html[data-theme="dark"] .card-group .func-card .fc-title { color: #F2F2F7; }
html[data-theme="dark"] .card-group .func-card .fc-desc { color: #98989D; }
html[data-theme="dark"] .card-group .func-card > svg:last-child { stroke: #48484A; }

/* 宽屏双列 */
@media (min-width: 720px) {
  .func-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* ===== v2.7.9 子界面统一优化 ===== */
.card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.035);
  border: 1px solid #EFEFF4;
}
html[data-theme=dark] .card {
  background: #1C1C1E;
  border-color: #2C2C2E;
  box-shadow: none;
}
.card-header, .card .card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1C1C1E;
  margin-bottom: 13px;
  border-bottom: none;
}
html[data-theme=dark] .card-header, html[data-theme=dark] .card .card-title { color: #F2F2F7; }

/* 输入框 */
.card input[type=text], .card input[type=password], .card input[type=number], .card input[type=search], .card select, .card textarea {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1.5px solid #E5E5EA;
  background: #FAFAFC;
  font-size: 13.5px;
  font-family: inherit;
  color: #1C1C1E;
  outline: none;
  -webkit-appearance: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.card textarea { height: auto; min-height: 84px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.card input:focus, .card select:focus, .card textarea:focus {
  border-color: #4F7CFF;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(79,124,255,.10);
}
.card input::placeholder, .card textarea::placeholder { color: #C7C7CC; }
html[data-theme=dark] .card input, html[data-theme=dark] .card select, html[data-theme=dark] .card textarea { background: #242426; border-color: #333335; color: #F2F2F7; }
html[data-theme=dark] .card input:focus, html[data-theme=dark] .card select:focus, html[data-theme=dark] .card textarea:focus { background: #1C1C1E; border-color: #5B85FF; }

/* 表格 */
.card table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.card table th { text-align: left; font-size: 11.5px; font-weight: 700; color: #8E8E93; padding: 9px 10px; background: #FAFAFC; border-bottom: 1px solid #EFEFF4; }
.card table th:first-child { border-radius: 9px 0 0 9px; }
.card table th:last-child { border-radius: 0 9px 9px 0; }
.card table td { padding: 11px 10px; border-bottom: 1px solid #F5F5F7; color: #1C1C1E; vertical-align: middle; }
.card table tr:last-child td { border-bottom: none; }
html[data-theme=dark] .card table th { background: #242426; border-color: #2C2C2E; color: #98989D; }
html[data-theme=dark] .card table td { border-color: #2C2C2E; color: #F2F2F7; }

/* 表单标签 */
.card label, .card .field-label { display: block; font-size: 12px; font-weight: 600; color: #6B6B70; margin-bottom: 6px; }
html[data-theme=dark] .card label, html[data-theme=dark] .card .field-label { color: #98989D; }

/* 移动端 */
@media (max-width: 480px) {
  .card { padding: 15px 13px; border-radius: 14px; }
  .main-content { padding-left: 12px; padding-right: 12px; }
}

/* ============================================================
   v2.7.11 首页统计卡片 UI 精修
   列数由 JS 写入 --cols 控制，1~4 张均匀撑满，不会 2+1 残缺
   ============================================================ */
.hero-stats {
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)) !important;
}

/* ---------- 卡片本体 ---------- */
.hs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 11px 12px 10px;
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.06) 52%, rgba(255,255,255,.09) 100%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.10);
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s cubic-bezier(.34,1.4,.64,1), background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.hs-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.55) 28%, rgba(255,255,255,.75) 50%, rgba(255,255,255,.55) 72%, transparent 100%);
  opacity: .85;
  pointer-events: none;
}
.hs-card::after {
  content: "";
  position: absolute;
  right: -22px; bottom: -26px;
  width: 66px; height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.13) 0%, transparent 70%);
  pointer-events: none;
}
.hs-card:active {
  transform: scale(.955);
  background: linear-gradient(160deg, rgba(255,255,255,.26) 0%, rgba(255,255,255,.13) 100%);
  border-color: rgba(255,255,255,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 4px rgba(0,0,0,.14);
}

/* ---------- 图标彩底 ---------- */
.hs-card .hs-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  margin-bottom: 7px;
  color: #fff;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30), 0 2px 6px rgba(0,0,0,.16);
  transition: transform .18s ease;
}
.hs-card:active .hs-ico { transform: scale(.9); }
.hs-card .hs-ico svg { width: 14px; height: 14px; }
.hs-card[data-k="registered_users"] .hs-ico { background: linear-gradient(135deg, #4F7CFF 0%, #6E8BFF 100%); }
.hs-card[data-k="launcher_users"] .hs-ico { background: linear-gradient(135deg, #A855F7 0%, #C77DFF 100%); }
.hs-card[data-k="launchers"] .hs-ico { background: linear-gradient(135deg, #EC4899 0%, #F472B6 100%); }
.hs-card[data-k="accounts"] .hs-ico { background: linear-gradient(135deg, #10B981 0%, #34D399 100%); }

/* ---------- 数字 ---------- */
.hs-card .hs-num {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.14);
  transition: color .2s ease;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-card .hs-num.is-zero {
  color: rgba(255,255,255,.42);
  font-weight: 700;
  text-shadow: none;
}
.hs-card .hs-label {
  font-size: 10.5px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: .2px;
  color: rgba(255,255,255,.66);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------- 入场动画 ---------- */
@keyframes hsIn {
  from { opacity: 0; transform: translateY(7px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hs-card { animation: hsIn .34s cubic-bezier(.22,1,.36,1) both; }
.hs-card:nth-child(1) { animation-delay: 0s; }
.hs-card:nth-child(2) { animation-delay: .05s; }
.hs-card:nth-child(3) { animation-delay: .10s; }
.hs-card:nth-child(4) { animation-delay: .15s; }

/* ---------- 自定义按钮移到右上角 ---------- */
.hero-bar {
  position: absolute;
  top: 15px;
  right: 16px;
  margin-top: 0;
  z-index: 2;
}
.hero-cfg {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 5px 10px 5px 8px;
  border-radius: 20px;
  font-size: 11px;
  letter-spacing: .2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.hero-cfg svg { width: 12px; height: 12px; }
.hero-card .hero-left { padding-right: 84px; }

/* ---------- 窄屏 ---------- */
@media (max-width: 420px) {
  .hero-stats { gap: 6px; }
  .hs-card { padding: 9px 9px 8px; border-radius: 13px; }
  .hs-card .hs-ico { width: 23px; height: 23px; border-radius: 8px; margin-bottom: 5px; }
  .hs-card .hs-ico svg { width: 12px; height: 12px; }
  .hs-card .hs-num { font-size: 20px; letter-spacing: -.8px; }
  .hs-card .hs-label { font-size: 9.5px; margin-top: 2px; }
  .hero-card .hero-left { padding-right: 76px; }
}
@media (max-width: 340px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ---------- 深色模式 ---------- */
html[data-theme="dark"] .hs-card {
  background: linear-gradient(160deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,.04) 55%, rgba(255,255,255,.06) 100%);
  border-color: rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 2px 8px rgba(0,0,0,.28);
}
html[data-theme="dark"] .hs-card::before {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.24) 50%, transparent 100%);
}
html[data-theme="dark"] .hs-card .hs-num.is-zero { color: rgba(255,255,255,.30); }

@media (prefers-reduced-motion: reduce) {
  .hs-card { animation: none !important; }
  .hs-card:nth-child(n) { animation-delay: 0s !important; }
}
