/* ============================================================
   二维互通 · 管理后台设计系统 v2
   ============================================================ */
:root {
  --bg-app: #eef1f6;
  --bg-sidebar: #0c1222;
  --bg-sidebar-hover: rgba(255, 255, 255, 0.06);
  --bg-card: #ffffff;
  --bg-muted: #f8fafc;
  --border: #e2e8f0;
  --border-light: #eef2f7;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --primary: #0066ff;
  --primary-dark: #0052cc;
  --primary-soft: #e8f1ff;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.08);
  --sidebar-width: 260px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg-app);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ========== 登录页 ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0, 102, 255, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(16, 185, 129, 0.12), transparent 50%),
    linear-gradient(160deg, #0c1222 0%, #111827 40%, #1e293b 100%);
}

.login-shell {
  width: 100%;
  max-width: 440px;
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
  color: #fff;
}

.login-brand-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, #0066ff, #00a3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 102, 255, 0.35);
}

.login-brand h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-brand p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.login-box {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 36px 32px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-box h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}

.login-box label {
  display: block;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.login-box input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  background: var(--bg-muted);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.12);
}

.login-box button[type="submit"] {
  width: 100%;
  padding: 14px;
  margin-top: 6px;
  background: linear-gradient(135deg, var(--primary), #0080ff);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.28);
}

.login-box button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 102, 255, 0.32);
}

.login-box .hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
  text-align: center;
  line-height: 1.7;
}

/* ========== 布局 ========== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand {
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0066ff, #00a3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-text span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

.sidebar nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-label {
  padding: 8px 14px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
}

.sidebar nav a .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 15px;
  opacity: 0.85;
}

.sidebar nav a:hover {
  background: var(--bg-sidebar-hover);
  color: #fff;
}

.sidebar nav a.active {
  background: rgba(0, 102, 255, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 102, 255, 0.25);
}

.sidebar .logout {
  margin: 8px 12px 20px;
  padding: 11px 14px !important;
  background: rgba(239, 68, 68, 0.12) !important;
  color: #fca5a5 !important;
  border-radius: var(--radius-sm);
  justify-content: center;
}

.sidebar .logout:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #fecaca !important;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 48px;
  overflow: auto;
}

.content-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ========== 统计卡片 ========== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #00a3ff);
  opacity: 0.85;
}

.stat-card span {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ========== 卡片容器 ========== */
.card-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
}

.card-toolbar input[type=text],
.card-toolbar input[type=number],
.card-toolbar select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  min-width: 220px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card-toolbar input:focus,
.card-toolbar select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.card-toolbar input[type=number].input-xs {
  min-width: 80px;
  width: 80px;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.panel h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 18px;
  color: var(--text);
}

/* ========== 表格 ========== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

.table th, .table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  vertical-align: middle;
}

.table th {
  background: var(--bg-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f8fbff; }

.table code {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.card-box .table { border: none; box-shadow: none; }

/* ========== 用户单元格 ========== */
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
}

.user-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.user-avatar-wrap .user-avatar,
.user-avatar-wrap .user-avatar-fallback {
  position: absolute;
  inset: 0;
}

.user-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0066ff, #00a3ff);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.user-cell-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-cell-meta strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.user-cell-id {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.text-muted { color: var(--text-muted); }

/* ========== 按钮 ========== */
button, .btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}

button:hover, .btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn.secondary { background: #64748b; }
.btn.danger { background: var(--danger); }

.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-sm.primary { background: var(--primary); color: #fff; }
.btn-sm.success { background: var(--success); color: #fff; }
.btn-sm.warning { background: var(--warning); color: #fff; }
.btn-sm.danger  { background: var(--danger); color: #fff; }
.btn-sm.ghost   { background: var(--bg-muted); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-sm.outline { background: #fff; color: var(--primary); border: 1px solid #bfdbfe; }

.btn-sm:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 102, 255, 0.18); }
.btn-sm.ghost:hover, .btn-sm.outline:hover { box-shadow: none; transform: none; background: var(--primary-soft); }

.action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.action-group form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

button.link, .link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 500;
}

.link.danger { color: var(--danger); }
form.inline { display: inline; }

/* ========== 标签 / 提示 ========== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.tag-ok, .tag.ok { background: var(--success-soft); color: #059669; }
.tag-danger, .tag.danger { background: var(--danger-soft); color: #dc2626; }
.tag-warn { background: var(--warning-soft); color: #b45309; }
.tag-info { background: var(--primary-soft); color: var(--primary); }
.tag-default { background: #f1f5f9; color: #64748b; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.alert.success { background: var(--success-soft); color: #065f46; border: 1px solid #a7f3d0; }
.alert.error { background: var(--danger-soft); color: #991b1b; border: 1px solid #fecaca; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: var(--bg-card);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.tabs a:hover {
  border-color: #bfdbfe;
  color: var(--primary);
}

.tabs a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.28);
}

.hint { color: var(--text-secondary); margin-bottom: 16px; font-size: 14px; }

.hint-block {
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 16px 22px 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.empty-hint {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 20px !important;
  font-size: 14px;
}

.wrap { max-width: 320px; word-break: break-all; }

.inline-form, .form-block {
  background: transparent;
  padding: 0;
  margin-bottom: 16px;
}

.inline-form label, .form-block label {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.inline-form input, .form-block input,
.form-block textarea, .form-block select {
  width: 100%;
  max-width: 600px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 6px;
  font-size: 14px;
}

.full-width input { max-width: 100%; }

h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--text);
}

.link-scan {
  color: var(--primary);
  font-size: 12px;
  word-break: break-all;
  max-width: 260px;
  display: inline-block;
}

/* ========== 分页（底部横条） ========== */
.pagination-wrap {
  padding: 0;
  background: linear-gradient(180deg, #f1f5f9 0%, #e8edf4 100%);
  border-top: 1px solid var(--border);
}

.pagination-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  padding: 16px 22px;
  min-height: 64px;
}

.pagination-total,
.pagination-meta {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.pagination-total strong {
  color: var(--text);
  font-weight: 700;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.page-btn:hover:not(.disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.32);
  cursor: default;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.page-size-form label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
}

.page-size-form select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.pager-bar { display: none; }

/* ========== 弹窗 ========== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.is-open { display: flex !important; }

.modal[hidden]:not(.is-open) { display: none !important; }

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  width: min(520px, 92vw);
  box-shadow: var(--shadow-lg);
}

.modal-box h4 { margin: 0 0 12px; font-size: 18px; }
.modal-box p { white-space: pre-wrap; line-height: 1.7; color: var(--text-secondary); margin-bottom: 20px; }

.ann-table .ann-actions form { display: inline-block; margin-right: 8px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border-light);
}

.detail-item span {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.detail-item strong {
  font-size: 15px;
  color: var(--text);
}

.panel-inner { padding: 20px 22px 24px; }
.panel-inner h3 { margin-bottom: 16px; }

.content-preview-list { display: flex; flex-direction: column; gap: 16px; }

.content-preview-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-muted);
}

.content-preview-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.content-preview-text { line-height: 1.7; color: var(--text); white-space: pre-wrap; }

.content-preview-img {
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--radius-sm);
}

.content-preview-video {
  width: 100%;
  max-height: 320px;
  border-radius: var(--radius-sm);
}

.module-edit-list { display: flex; flex-direction: column; gap: 16px; margin: 16px 0; }

.module-edit-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  background: #fff;
}

.module-edit-head {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.module-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 12px;
}

.module-edit-row label { flex: 1; min-width: 120px; margin-bottom: 0; }

.media-edit-preview {
  margin: 10px 0 4px;
  padding: 12px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  min-height: 48px;
}

.media-edit-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
}

.media-edit-preview video {
  width: 100%;
  max-height: 220px;
  border-radius: var(--radius-sm);
}

.media-edit-preview audio { width: 100%; }

.hint-inline {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 8px;
}

.form-actions { margin-top: 20px; }

.json-dump {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  background: var(--bg-muted);
  padding: 14px;
  border-radius: var(--radius-sm);
  overflow: auto;
  max-height: 360px;
  margin-top: 12px;
}

.code-edit-form textarea {
  min-height: 120px;
  line-height: 1.6;
  resize: vertical;
}

.advanced-box {
  margin-top: 20px;
  cursor: pointer;
}

.advanced-box summary {
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 0;
}

.tag-btn {
  border: none;
  cursor: pointer;
  font: inherit;
}

.modal-wide { width: min(640px, 94vw); }

.report-detail-block {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.report-detail-row span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

.report-detail-section { margin-bottom: 16px; }

.report-detail-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.report-detail-text {
  white-space: pre-wrap;
  line-height: 1.7;
  color: var(--text);
}

.reply-box {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

@media (max-width: 960px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px;
  }
  .sidebar nav a { flex: 1 1 auto; justify-content: center; }
  .content { padding: 20px 16px 32px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 16px;
  font-size: 14px;
}

/* —— 紧凑管理 / 预览 —— */
.page-compact .content-header { margin-bottom: 8px; }
.page-compact .page-subtitle { font-size: 13px; }
.page-compact .card-box { margin-bottom: 12px; }
.page-compact .card-toolbar { padding: 10px 16px; }
.page-compact .detail-grid.compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border-light);
}
.page-compact .detail-grid.compact-meta .detail-item {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 0;
  border: none;
  background: none;
}
.page-compact .detail-grid.compact-meta .detail-item span { font-size: 12px; }
.page-compact .detail-grid.compact-meta .detail-item strong { font-size: 13px; }

.table-compact th, .table-compact td { padding: 8px 10px; font-size: 13px; }
.table-compact code { font-size: 12px; }
.cell-summary { max-width: 200px; font-size: 12px; line-height: 1.4; }

.qr-thumb { width: 36px; height: 36px; border-radius: 4px; border: 1px solid #e2e8f0; vertical-align: middle; }
.copy-path { cursor: pointer; font-size: 11px; word-break: break-all; }
.batch-link-result { display: block; font-size: 11px; margin-top: 4px; max-width: 140px; word-break: break-all; }

.page-compact .panel { padding: 12px 16px; margin-bottom: 12px; }
.page-compact .panel h3 { font-size: 15px; margin-bottom: 8px; }
.page-compact .hint-block { font-size: 12px; margin-bottom: 8px; }
.page-compact .form-block label { margin-bottom: 10px; font-size: 13px; }
.page-compact .form-block input,
.page-compact .form-block select,
.page-compact .form-block textarea { padding: 6px 10px; font-size: 13px; }
.page-compact .module-edit-list { gap: 10px; margin: 10px 0; }
.page-compact .module-edit-card { padding: 10px 12px; }
.page-compact .module-edit-head { font-size: 12px; margin-bottom: 8px; padding-bottom: 6px; }
.page-compact .module-edit-row label { min-width: 100px; font-size: 12px; }
.page-compact .media-edit-preview { padding: 8px; min-height: 36px; }
.page-compact .media-edit-preview img { max-height: 100px; }
.page-compact .media-edit-preview video { max-height: 120px; }
.page-compact .code-edit-form textarea { min-height: 72px; font-size: 13px; }
.page-compact .advanced-box { margin-top: 10px; }

.compact-preview .content-preview-list { gap: 10px; }
.compact-preview .content-preview-item { padding: 10px; }
.compact-preview .content-preview-head { font-size: 12px; margin-bottom: 6px; }
.compact-preview .content-preview-text { font-size: 13px; line-height: 1.5; }
.compact-preview .content-preview-img { max-height: 120px; }
.compact-preview .content-preview-video { max-height: 140px; }

.modal-box-wide { max-width: 720px; width: 92%; max-height: 88vh; overflow: auto; }
.audit-preview-body { max-height: 55vh; overflow: auto; border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 12px; background: #fff; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
.text-ok { color: #16a34a; font-weight: 600; }
.text-danger { color: #dc2626; }

.credit-adjust-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.credit-delta-label { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); margin: 0; }
.credit-delta-label input { width: 88px; }
