:root {
  --primary: #7b5fc4;
  --primary-dark: #6b52b8;
  --bg: #f7f4fc;
  --card: #fff;
  --text: #3d3555;
  --muted: #9b93ad;
  --border: rgba(139, 111, 212, 0.15);
  --success: #5cb87a;
  --danger: #e87b7b;
  --sidebar-w: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #6b52b8 0%, #8b6fd4 100%);
  color: #fff;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.sidebar-brand-icon { font-size: 22px; }
.sidebar-footer {
  padding: 16px 20px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 11px;
  opacity: 0.65;
}
.sidebar { display: flex; flex-direction: column; }
.sidebar-version { display: block; }
.sidebar-nav { padding: 16px 12px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: rgba(255,255,255,0.85);
  border-radius: 10px;
  margin-bottom: 4px;
}
.nav-icon { font-size: 16px; line-height: 1; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-item:hover, .nav-item.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
  text-decoration: none;
}
.nav-group { font-size: 11px; text-transform: uppercase; opacity: 0.6; padding: 16px 16px 8px; }

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: var(--card);
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.content { padding: 28px; flex: 1; }

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(107, 82, 184, 0.06);
  border: 1px solid var(--border);
}
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 20px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(107, 82, 184, 0.05);
}
.stat-card.highlight {
  background: linear-gradient(135deg, #9b7ede, #e8a4c8);
  color: #fff;
  border: none;
}
.stat-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.stat-card.highlight .stat-label { color: rgba(255,255,255,0.85); }
.stat-value { font-size: 28px; font-weight: 700; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat-card.highlight .stat-sub { color: rgba(255,255,255,0.8); }

.dashboard-chart-card { margin-bottom: 24px; }
.chart-today-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.chart-today-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
}
.chart-today-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.chart-today-item strong { font-size: 22px; font-weight: 700; color: var(--text); }
.chart-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: -8px 0 16px;
  font-size: 13px;
  color: var(--muted);
}
.chart-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-active { background: var(--primary); }
.dot-users { background: #e8a4c8; }
.dot-recharge { background: var(--success); }
.chart-wrap {
  position: relative;
  height: 320px;
  width: 100%;
}

.orders-stats-grid { margin-bottom: 24px; }
.orders-filter-form { margin-bottom: 12px; }
.orders-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.orders-select-all-label { margin: 0; font-size: 13px; }
.orders-list-meta { margin-bottom: 12px; }
.table-scroll { overflow-x: auto; }
.table-orders { min-width: 1100px; }
.table-orders .col-check { width: 40px; text-align: center; }
.table-orders .col-check input { width: auto; cursor: pointer; }
.order-paid-cell { min-width: 160px; }
.order-paid-time { display: block; font-weight: 500; color: var(--text); }
.order-wx-id { display: block; font-size: 11px; margin-top: 4px; word-break: break-all; }
.order-no { font-size: 12px; }

.toolbar-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}
.toolbar-form .form-control { max-width: none; flex: 1; min-width: 160px; }

.text-muted { color: var(--muted); }
.inline-form { display: inline; }

/* 高光时刻列表：固定缩略图比例，不撑开行高 */
.table-highlights td {
  vertical-align: middle;
}
.table-highlights .col-photos {
  width: 252px;
  max-width: 252px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.thumb-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  max-width: 252px;
}

.thumb-link {
  display: block;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f0edf5;
  box-shadow: 0 2px 8px rgba(107, 82, 184, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.thumb-link:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 14px rgba(107, 82, 184, 0.18);
  text-decoration: none;
}

.thumb-img {
  display: block;
  width: 72px;
  height: 72px;
  max-width: 72px;
  max-height: 72px;
  object-fit: cover;
  object-position: center;
}

.cell-remark { max-width: 200px; word-break: break-all; }

/* 双击缩略图放大预览 */
.img-preview-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 10, 40, 0.82);
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.img-preview-mask.show {
  display: flex;
}
.img-preview-box {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.img-preview-img {
  display: block;
  max-width: 88vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  background: #fff;
}
.img-preview-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.img-preview-tip {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}

.badge-warning { background: #fff5e0; color: #b8860b; }

.alert-warning { background: #fff8e6; color: #8a6d00; border: 1px solid #f0e0b0; }

.user-links { margin-top: 8px; }
.user-links a { font-weight: 500; }

.breadcrumb { margin-bottom: 0; }
.breadcrumb a { font-weight: 500; }

.user-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.user-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.user-profile-card { padding: 28px; }
.user-profile-head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.user-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.user-title-row h2 { margin: 0; }
.user-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 20px;
  margin: 0;
}
.user-meta-grid dt {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}
.user-meta-grid dd { margin: 0; font-size: 14px; }
.user-vip-panel {
  margin-left: auto;
  min-width: 140px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f7f4fc, #fff);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
}
.user-vip-panel-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.user-vip-panel-status { font-size: 15px; font-weight: 600; color: var(--primary); }
.user-vip-panel-expire { margin: 8px 0 4px; font-size: 14px; }
.user-vip-panel-date { font-size: 12px; }
.user-vip-panel-paid { font-size: 12px; color: var(--success); margin-top: 8px; }
.user-prefs-row { font-size: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  flex-shrink: 0;
}
.user-avatar-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: #f0edf5;
}
.user-profile-meta h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.user-profile-meta p { margin-bottom: 6px; }

.user-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.user-stat-chips .chip {
  background: #f7f4fc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 88px;
}
.user-stat-chips .chip-label { font-size: 11px; margin-bottom: 4px; }
.user-stat-chips .chip b {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.user-overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.user-overview-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.user-overview-stat:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(107, 82, 184, 0.12);
  text-decoration: none;
}
.user-overview-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.user-overview-stat-label { font-size: 13px; color: var(--muted); margin-top: 6px; }

.vip-quick-days { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btn-danger-outline { color: var(--danger); border-color: rgba(232, 123, 123, 0.5); }
.btn-danger-outline:hover { background: #fdeaea; }
.openid-code { font-size: 12px; word-break: break-all; }

.user-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.user-tab {
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}
.user-tab:hover {
  border-color: var(--primary);
  text-decoration: none;
}
.user-tab.active {
  background: linear-gradient(135deg, #9b7ede, #7b5fc4);
  color: #fff;
  border-color: transparent;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.table-compact td:first-child {
  color: var(--muted);
  width: 140px;
}
.card-title a {
  font-size: 13px;
  font-weight: normal;
  margin-left: 12px;
}

.players-cell { max-width: 320px; }
.player-chip {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 4px 10px;
  background: #f7f4fc;
  border-radius: 8px;
  font-size: 12px;
}
.player-chip em {
  font-style: normal;
  font-weight: 600;
  margin-left: 4px;
}

code {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  background: #f5f3fa;
  padding: 2px 8px;
  border-radius: 6px;
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; }
tr:hover td { background: #faf9fc; }

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, #9b7ede, #7b5fc4); color: #fff; }
.btn-primary:hover { opacity: 0.9; text-decoration: none; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-control {
  width: 100%;
  max-width: 400px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
}
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { min-height: 72px; resize: vertical; max-width: 100%; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}
.badge-success { background: #e8f8ee; color: var(--success); }
.badge-danger { background: #fdeaea; color: var(--danger); }
.badge-muted { background: #f0edf5; color: var(--muted); }

.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; }
.alert-error { background: #fdeaea; color: #c44; }
.alert-danger { background: #fdeaea; color: #c44; }
.alert-success { background: #e8f8ee; color: #3a8; }

.user-danger-card {
  border: 1px solid rgba(232, 123, 123, 0.45);
  background: #fffafa;
  margin-top: 8px;
}
.user-danger-card-compact .user-danger-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.user-danger-card-compact .card-title { color: var(--danger); margin-bottom: 6px; }
.user-danger-card .card-title { color: var(--danger); }
.user-danger-desc { font-size: 13px; margin: 0; line-height: 1.6; max-width: 520px; }
.user-danger-list {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
}
.user-delete-form { max-width: 360px; }
.hidden { display: none !important; }
body.admin-modal-open { overflow: hidden; }

/* 居中确认弹窗 */
.admin-modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(24, 16, 48, 0.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.admin-modal-mask.show {
  display: flex;
}
.admin-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 64px rgba(40, 20, 80, 0.28);
  animation: adminModalIn 0.22s ease-out;
}
@keyframes adminModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.admin-modal-danger {
  border: 1px solid rgba(232, 123, 123, 0.35);
}
.admin-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
}
.admin-modal-close:hover { background: #f5f2f8; color: var(--text); }
.admin-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fdeaea;
  color: var(--danger);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.admin-modal-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: var(--danger);
}
.admin-modal-user-line {
  text-align: center;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
}
.admin-modal-user-line strong { display: block; font-size: 16px; margin-bottom: 4px; }
.admin-modal-warn {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  text-align: center;
}
.admin-modal-data-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: #faf8fc;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.admin-modal-data-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.admin-modal-data-list li:last-child { border-bottom: none; }
.admin-modal-data-list b { color: var(--text); font-weight: 600; }
.admin-modal-confirm-box {
  margin-bottom: 20px;
  padding: 14px;
  background: #fff8f8;
  border: 1px solid rgba(232, 123, 123, 0.4);
  border-radius: 10px;
}
.admin-modal-confirm-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}
.admin-modal-id-hint {
  font-size: 18px;
  color: var(--danger);
  letter-spacing: 0.02em;
}
.admin-modal-input {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.08em;
  border-color: rgba(232, 123, 123, 0.5);
}
.admin-modal-input:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(232, 123, 123, 0.2);
}
.admin-modal-error {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--danger);
  text-align: center;
}
.admin-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.admin-modal-actions .btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pagination { margin-top: 20px; display: flex; gap: 8px; align-items: center; }
.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6b52b8 0%, #e8a4c8 100%);
  position: relative;
}
.login-box {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.15);
  position: relative;
  z-index: 10;
  pointer-events: auto;
}
.login-box input,
.login-box button,
.login-box select,
.login-box textarea {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.form-static {
  padding: 10px 14px;
  background: #f5f3fa;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
}
.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 12px;
}
.login-box .form-control {
  max-width: none;
}
.login-logo { font-size: 48px; text-align: center; margin-bottom: 8px; }
.login-box h1 { text-align: center; margin-bottom: 8px; color: var(--primary-dark); }
.login-box .sub { text-align: center; color: var(--muted); margin-bottom: 32px; font-size: 13px; }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.perm-item { display: flex; align-items: center; gap: 8px; padding: 8px; background: #faf9fc; border-radius: 8px; }

.score-pos { color: var(--success); font-weight: 600; }
.score-neg { color: var(--danger); font-weight: 600; }

/* 配置页双栏布局 */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
.settings-aside { display: flex; flex-direction: column; gap: 0; }
.card-compact { padding: 18px; margin-bottom: 16px; }
.card-compact .card-title { font-size: 14px; margin-bottom: 12px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.settings-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 8px;
}
.settings-upload-fields {
  flex: 1;
  min-width: 0;
}
.settings-upload-fields .form-control {
  margin-bottom: 8px;
}
.settings-clear-check {
  margin: 4px 0 8px;
}
.settings-upload-row .settings-img-thumb {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #f8f7fc;
  border-radius: 8px;
  border: 1px solid var(--border, #e8e4f0);
  text-decoration: none;
  overflow: hidden;
  box-sizing: border-box;
}
.settings-img-thumb--empty {
  color: #9b93ad;
  font-size: 12px;
}
/* 公众号二维码等方形预览 */
.settings-upload-row .settings-img-thumb--square {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  height: 120px;
  max-height: 120px;
}
.settings-upload-row .settings-img-thumb--square img {
  display: block;
  max-width: 104px;
  max-height: 104px;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* 搜一搜横幅等横向预览 */
.settings-upload-row .settings-img-thumb--wide {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  height: 64px;
  max-height: 64px;
}
.settings-upload-row .settings-img-thumb--wide img {
  display: block;
  max-width: 184px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.feedback-detail-card { margin-bottom: 24px; }
.feedback-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.feedback-detail-title { margin: 0; font-size: 18px; }
.feedback-detail-meta {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 16px;
  margin: 0 0 16px;
  font-size: 14px;
}
.feedback-detail-meta dt { margin: 0; color: var(--text-muted, #6b6580); }
.feedback-detail-meta dd { margin: 0; }
.feedback-detail-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #6b6580);
  margin-bottom: 8px;
}
.feedback-detail-text {
  margin: 0;
  padding: 12px 14px;
  background: #f8f7fc;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
}
.feedback-detail-photos { margin-top: 16px; }
.feedback-detail-actions { margin-top: 20px; }
.cell-feedback-content { max-width: 280px; }
.cell-feedback-content a {
  color: inherit;
  text-decoration: none;
}
.cell-feedback-content a:hover { color: var(--primary, #7c5cbf); }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}
.checkbox-label input { width: auto; }

.info-list { list-style: none; }
.info-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.info-list li:last-child { border-bottom: none; }
.info-list span:first-child { color: var(--muted); flex-shrink: 0; }
.code-break { word-break: break-all; font-size: 12px; }

.quick-links { display: flex; flex-direction: column; gap: 8px; }
.quick-link {
  display: block;
  padding: 10px 12px;
  background: #faf9fc;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
.quick-link:hover { background: #f0ebfa; text-decoration: none; }

.quick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-user { color: var(--muted); margin-right: 8px; }

.badge-gold {
  background: linear-gradient(135deg, #e8c547, #d4a017);
  color: #4a3200;
}

.plan-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}
.plan-admin-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #faf9fc;
}
.plan-admin-card h4 { margin-bottom: 12px; font-size: 15px; }
.plan-admin-card.plan-featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, #faf8ff 0%, #fff 100%);
}
.plan-admin-card.plan-lifetime {
  border-color: #e8c547;
  background: linear-gradient(180deg, #fffdf5 0%, #fff 100%);
}
.plan-preview { font-size: 12px; color: var(--muted); margin-top: 8px; }

.api-list code { font-size: 11px; display: block; margin-bottom: 2px; }

@media (max-width: 1100px) {
  .settings-layout { grid-template-columns: 1fr; }
  .plan-admin-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { width: 100%; position: relative; }
  .main { margin-left: 0; }
  .layout { flex-direction: column; }
}

/* ========== 正式版：仪表盘与通用 UI ========== */
.dashboard-welcome {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #9b7ede 0%, #7b5fc4 50%, #e8a4c8 100%);
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 8px 32px rgba(107, 82, 184, 0.25);
}
.dashboard-welcome .text-muted { color: rgba(255,255,255,0.85) !important; }
.dashboard-greeting { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.dashboard-welcome-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dashboard-welcome .badge-muted { background: rgba(255,255,255,0.2); color: #fff; }
.dashboard-welcome .badge-warning { background: #fff; color: #b8860b; text-decoration: none; }

.dashboard-section { margin-bottom: 28px; }
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.stats-grid-core { margin-bottom: 0; }
.stats-grid-sub .stat-card { padding: 18px 20px; }
.stats-grid-sub .stat-value { font-size: 22px; }
.stat-card-link { text-decoration: none; color: inherit; display: block; transition: transform 0.15s, box-shadow 0.15s; }
.stat-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(107, 82, 184, 0.12);
  text-decoration: none;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.quick-link-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(107, 82, 184, 0.1);
  text-decoration: none;
}
.quick-link-icon { font-size: 24px; margin-bottom: 8px; }
.quick-link-text { font-weight: 600; font-size: 14px; }
.quick-link-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }

.dashboard-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.card-title-sub { font-size: 12px; font-weight: normal; color: var(--muted); margin-left: 8px; }

.page-intro { margin-bottom: 20px; }
.page-desc { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.page-meta { font-size: 13px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: #faf9fc; }
.data-table-compact td, .data-table-compact th { padding: 8px 10px; font-size: 13px; }

.empty-state { text-align: center; padding: 40px 20px; }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.6; }
.empty-state-msg { font-size: 15px; color: var(--text); }
.empty-state-hint { font-size: 13px; margin-top: 8px; }

.pagination-ellipsis { padding: 8px 4px; color: var(--muted); }

.admin-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
}

table:not(.data-table) { width: 100%; border-collapse: collapse; }
table:not(.data-table) th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
}
table:not(.data-table) td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
table:not(.data-table) tbody tr:hover { background: #faf9fc; }

@media (max-width: 960px) {
  .dashboard-two-col { grid-template-columns: 1fr; }
  .chart-today-row { grid-template-columns: 1fr; }
}

.launch-checklist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.launch-checklist-progress {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.launch-checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.launch-checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.launch-checklist-item:last-child { border-bottom: none; }
.launch-checklist-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.launch-checklist-item.is-ok .launch-checklist-icon {
  background: #e8f5e9;
  color: #2e7d32;
}
.launch-checklist-item.is-pending .launch-checklist-icon {
  background: #fff3e0;
  color: #ef6c00;
}
.launch-checklist-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.launch-checklist-body strong { font-size: 14px; }
.launch-checklist-body .text-muted { font-size: 12px; }
.launch-checklist-compact .launch-checklist-item { padding: 10px 0; }
.feedback-status-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.feedback-admin-note {
  width: 100%;
  min-height: 88px;
  margin-top: 8px;
}
.admin-reset-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-action-stack { display: flex; flex-direction: column; gap: 8px; min-width: 180px; }
.admin-action-stack .inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-reset-input { max-width: 120px; }
.admin-delete-details { margin-top: 4px; }
.admin-delete-summary { cursor: pointer; list-style: none; display: inline-block; }
.admin-delete-summary::-webkit-details-marker { display: none; }
.admin-delete-form { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-delete-form .form-control { max-width: 160px; }
.admin-own-pwd-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-security-list li { align-items: flex-start; }
.admin-actions-cell { min-width: 200px; }
@media (max-width: 768px) {
  .admin-own-pwd-form .form-row { grid-template-columns: 1fr; }
}
