/* ========================================
   虞你生活 管理后台 - 全局样式
   ======================================== */

/* ===== 变量 ===== */
:root {
  --primary: #2478f2;
  --primary-hover: #1768db;
  --primary-active: #1257bc;
  --primary-light: #eaf3ff;
  --primary-lighter: #f3f8ff;
  --danger: #e53e3e;
  --danger-hover: #c53030;
  --success: #38a169;
  --success-light: #f0fff4;
  --warning: #d69e2e;
  --warning-light: #fffff0;
  --info: #3182ce;
  --info-light: #ebf8ff;

  --text-primary: #2d3748;
  --text-secondary: rgba(45, 55, 72, 0.78);
  --text-tertiary: rgba(45, 55, 72, 0.45);
  --text-inverse: #ffffff;

  --bg-page: #eef4fb;
  --bg-card: #ffffff;
  --bg-sidebar: #083b8f;
  --bg-sidebar-hover: rgba(255,255,255,0.1);
  --bg-sidebar-active: var(--primary);

  --border-color: #e2e8f0;
  --border-light: #edf2f7;
  --shadow-sm: 0 3px 12px rgba(27, 76, 139, 0.06);
  --shadow-md: 0 10px 28px rgba(27, 76, 139, 0.1);
  --shadow-lg: 0 22px 52px rgba(16, 61, 124, 0.16);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --sidebar-width: 240px;
  --topbar-height: 56px;

  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

  --transition: all 0.2s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== 登录页 ===== */
.login-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background-color: #dff7fb;
  background-image: url('../assets/login-background.png');
  background-position: center;
  background-size: cover;
}
.login-page::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 48%, rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(224, 248, 255, 0.14));
}
.login-page::after {
  position: absolute;
  top: 12%;
  right: 11%;
  z-index: -1;
  width: 260px;
  height: 260px;
  content: '';
  border-radius: 50%;
  background: rgba(255, 206, 112, 0.16);
  filter: blur(48px);
}
.login-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(41, 111, 137, 0.24), 0 4px 16px rgba(61, 131, 150, 0.12);
  backdrop-filter: blur(18px);
  padding: 48px 40px;
  width: 400px;
  max-width: 90vw;
  text-align: center;
}
.login-header { margin-bottom: 32px; }
.login-logo {
  display: inline-flex;
  width: 88px;
  height: 88px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  filter: drop-shadow(0 14px 18px rgba(36, 104, 222, 0.28));
}
.login-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.login-header h1 { font-size: 24px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.login-header p { color: var(--text-tertiary); font-size: 14px; }
.login-form .form-group { margin-bottom: 20px; text-align: left; }
.login-form label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.login-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}
.login-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.12); }
.login-error { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 20px; }
.login-footer { margin-top: 24px; color: var(--text-tertiary); font-size: 12px; }

@media (max-width: 560px) {
  .login-page { padding: 16px; background-position: 56% center; }
  .login-card { padding: 38px 24px; }
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-sm); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { opacity: 0.9; }
.btn-warning { background: var(--warning); color: white; }
.btn-default { background: var(--bg-page); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-accent { background: #d97706; color: white; }
.btn-default:hover { background: var(--border-light); }
.btn-text { background: none; color: var(--text-secondary); padding: 6px 12px; }
.btn-text:hover { color: var(--primary); background: var(--primary-light); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== 主布局 ===== */
.main-app { display: flex; height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background:
    radial-gradient(circle at 90% 3%, rgba(93, 221, 255, 0.25), transparent 28%),
    linear-gradient(180deg, #0b55c7 0%, #0b3e91 48%, #072d6c 100%);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  z-index: 100;
  overflow-y: auto;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  color: #1667d4;
  font-size: 19px;
  font-weight: 800;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #dff7ff);
  box-shadow: 0 8px 20px rgba(0, 24, 73, 0.22);
}
.sidebar-title h2 { color: white; font-size: 16px; font-weight: 600; }
.sidebar-title span { color: rgba(255,255,255,0.5); font-size: 11px; }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-group { margin-bottom: 4px; }
.nav-group-title {
  padding: 16px 20px 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  border-left: 3px solid transparent;
  margin: 1px 0;
}
.nav-item:hover { background: var(--bg-sidebar-hover); color: white; }
.nav-item.active {
  background: rgba(43, 108, 176, 0.2);
  color: var(--primary-lighter);
  border-left-color: var(--primary);
}
.nav-icon { font-size: 16px; width: 22px; text-align: center; }

.nav-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #dff6ff;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.11);
}

.nav-item.active .nav-icon {
  color: #155fc9;
  background: #ffffff;
  border-color: #ffffff;
}

.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-footer .btn-text { color: rgba(255,255,255,0.5); width: 100%; }
.sidebar-footer .btn-text:hover { color: var(--danger); background: rgba(229, 62, 62, 0.1); }

/* ===== 顶栏 ===== */
.topbar {
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  background: white;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 50;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.menu-toggle:hover { background: var(--bg-page); }
.topbar-title { font-size: 16px; font-weight: 600; flex: 1; }
.env-badge {
  background: var(--success-light);
  color: var(--success);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* ===== 内容区 ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ===== 新版六大服务运营台 ===== */
.dashboard-hero,
.settings-intro,
.content-management-note {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 26px 28px;
  border-radius: 20px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 8%, rgba(99, 228, 255, 0.36), transparent 30%),
    linear-gradient(135deg, #0c53c7 0%, #247ff0 68%, #53bff2 100%);
  box-shadow: 0 18px 42px rgba(22, 102, 207, 0.2);
}

.dashboard-hero::after,
.settings-intro::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: -72px;
  bottom: -112px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
}

.dashboard-kicker,
.settings-kicker {
  color: #a9efff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
}

.dashboard-hero h2,
.settings-intro h2 {
  margin: 7px 0 4px;
  color: #ffffff;
  font-size: 24px;
}

.dashboard-hero p,
.settings-intro p {
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}

.dashboard-badge {
  position: relative;
  z-index: 2;
  padding: 7px 13px;
  border-radius: 999px;
  color: #ecfbff;
  font-size: 12px;
  background: rgba(4, 47, 119, 0.24);
  border: 1px solid rgba(168, 237, 255, 0.35);
}

.settings-intro .btn {
  position: relative;
  z-index: 2;
  color: #1765cf;
  background: #ffffff;
}

.settings-card .card-header {
  align-items: flex-start;
}

.settings-subtitle {
  margin-top: 3px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 400;
}

.policy-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-radius: 13px;
  color: #2f5f9d;
  background: #edf5ff;
  border: 1px solid #d9eaff;
}

.policy-preview span {
  color: #75869d;
  font-size: 12px;
}

.settings-switch {
  justify-content: flex-start;
}

.settings-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 15px 15px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(38, 99, 174, 0.1);
  box-shadow: 0 -8px 28px rgba(28, 77, 139, 0.08);
  backdrop-filter: blur(14px);
}

.content-management-note {
  padding: 18px 20px;
  color: var(--text-primary);
  background: linear-gradient(135deg, #ffffff, #f1f7ff);
  border: 1px solid #dceaff;
  box-shadow: var(--shadow-sm);
}

.content-management-note div {
  display: flex;
  flex-direction: column;
}

.content-management-note span:not(.tag) {
  margin-top: 3px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.posts-toolbar .filter-bar {
  margin-bottom: 0;
}

.content-detail h3 {
  margin: 14px 0 9px;
}

.content-detail p {
  margin-bottom: 14px;
  line-height: 1.7;
}

/* ===== 仪表盘 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-icon { font-size: 28px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text-primary); }
.stat-card .stat-label { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }
.stat-card .stat-trend { font-size: 12px; margin-top: 4px; }
.stat-card .stat-trend.up { color: var(--success); }
.stat-card .stat-trend.down { color: var(--danger); }

/* ===== 通用卡片 ===== */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); }

/* ===== 表格 ===== */
.table-wrapper { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--primary-lighter); }
.data-table .cell-nowrap { white-space: nowrap; }
.data-table .cell-ellipsis {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 状态标签 ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.tag-success { background: var(--success-light); color: var(--success); }
.tag-danger { background: #fff5f5; color: var(--danger); }
.tag-warning { background: var(--warning-light); color: var(--warning); }
.tag-info { background: var(--info-light); color: var(--info); }
.tag-default { background: var(--bg-page); color: var(--text-secondary); }
.tag-primary { background: var(--primary-light); color: var(--primary); }
.tag-accent { background: #fef3c7; color: #d97706; }

/* ===== 表单 ===== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
  background: white;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { appearance: auto; }
.form-help { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.form-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.form-switch input[type="checkbox"] {
  width: 40px;
  height: 22px;
  appearance: none;
  background: #cbd5e0;
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}
.form-switch input[type="checkbox"]::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.form-switch input[type="checkbox"]:checked { background: var(--primary); }
.form-switch input[type="checkbox"]:checked::after { left: 20px; }

/* ===== 图片上传 ===== */
.image-upload {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-page);
}
.image-upload:hover { border-color: var(--primary); background: var(--primary-lighter); }
.image-upload .upload-icon { font-size: 32px; margin-bottom: 8px; }
.image-upload .upload-text { font-size: 13px; color: var(--text-secondary); }
.image-upload .upload-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }
.image-preview {
  position: relative;
  display: inline-block;
  margin-top: 12px;
}
.image-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.image-preview .remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
}

/* ===== 缩略图 ===== */
.thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.thumb-sm {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
}

/* ===== 操作按钮组 ===== */
.action-btns { display: flex; gap: 6px; flex-wrap: nowrap; }

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-container {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 600px;
  max-width: 92vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-container.wide { width: 800px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-tertiary);
  padding: 0 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--border-light);
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.25s ease;
  min-width: 200px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.success { background: var(--success); color: white; }
.toast.error { background: var(--danger); color: white; }
.toast.warning { background: var(--warning); color: white; }
.toast.info { background: var(--info); color: white; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 14px; }

/* ===== 加载状态 ===== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-tertiary);
  gap: 8px;
}
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 筛选栏 ===== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-bar .search-input {
  flex: 1;
  min-width: 200px;
  padding: 7px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}
.filter-bar .search-input:focus { border-color: var(--primary); }

/* ===== 分页 ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 0;
}
.pagination .page-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.pagination .page-btn:hover { background: var(--bg-page); }
.pagination .page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== 富文本编辑器 ===== */
.editor-container {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.editor-container .ql-toolbar {
  border: none !important;
  border-bottom: 1px solid var(--border-color) !important;
  background: var(--bg-page);
  padding: 8px !important;
}
.editor-container .ql-toolbar .ql-formats {
  margin-right: 8px !important;
}
.editor-container .ql-toolbar button {
  width: 28px;
  height: 28px;
  padding: 3px !important;
  border-radius: 4px;
  transition: all 0.15s;
}
.editor-container .ql-toolbar button:hover {
  background: var(--primary-light) !important;
}
.editor-container .ql-toolbar button.ql-active {
  background: var(--primary) !important;
  color: white !important;
}
.editor-container .ql-toolbar button.ql-active .ql-stroke {
  stroke: white !important;
}
.editor-container .ql-toolbar button.ql-active .ql-fill {
  fill: white !important;
}
.editor-container .ql-container {
  border: none !important;
  min-height: 200px;
  font-size: 14px;
}
.editor-container:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1); }
.editor-container .ql-editor { min-height: 220px; }
.editor-container .ql-editor img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.editor-container .ql-editor iframe { max-width: 100%; border-radius: 8px; }
.editor-container .ql-editor video { width: 100%; max-width: 100%; max-height: 440px; display: block; margin: 12px 0; border-radius: 8px; background: #0f172a; }
.editor-container .ql-editor a { color: var(--primary); text-decoration: underline; }

/* Quill 默认只认识 small/large/huge，后台改用可直接持久化的 px 字号。 */
.ql-snow .ql-picker.ql-size { width: 76px; }
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before { content: '正文'; }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="13px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="13px"]::before { content: '小号'; }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="16px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="16px"]::before { content: '正文'; }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="20px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="20px"]::before { content: '大号'; }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="28px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="28px"]::before { content: '特大'; }
.ql-snow .ql-picker.ql-header .ql-picker-label:not([data-value])::before,
.ql-snow .ql-picker.ql-header .ql-picker-item:not([data-value])::before { content: '正文'; }
.ql-toolbar button.ql-video.is-uploading { position: relative; width: 52px !important; cursor: wait; }
.ql-toolbar button.ql-video.is-uploading svg { opacity: 0; }
.ql-toolbar button.ql-video.is-uploading::after {
  content: attr(data-progress);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}

/* Quill 模板按钮 */
.ql-template { font-size: 16px !important; width: 32px !important; }

/* 模板选择器 */
.template-selector { padding: 4px 0; }
.template-hint { color: var(--text-tertiary); font-size: 13px; margin-bottom: 16px; text-align: center; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.template-card {
  background: var(--bg-page);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.template-card:hover {
  border-color: var(--primary);
  background: var(--primary-lighter);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.template-card-icon { font-size: 32px; margin-bottom: 8px; }
.template-card-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }

/* 视频容器 */
.ql-video-wrapper { margin: 12px 0; }

/* ===== 确认对话框 ===== */
.confirm-content { text-align: center; padding: 12px 0; }
.confirm-content .confirm-icon { font-size: 48px; margin-bottom: 12px; }
.confirm-content .confirm-text { font-size: 15px; color: var(--text-primary); margin-bottom: 4px; }
.confirm-content .confirm-sub { font-size: 13px; color: var(--text-tertiary); }

/* ===== 详情面板 ===== */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.detail-item { }
.detail-item label { font-size: 12px; color: var(--text-tertiary); display: block; margin-bottom: 2px; }
.detail-item span { font-size: 14px; color: var(--text-primary); font-weight: 500; }

/* ===== 用户搜索 ===== */
.user-search-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}
.user-search-toolbar .form-control {
  flex: 1;
  max-width: 430px;
  margin: 0;
}

/* ===== 广播预览 ===== */
.broadcast-preview {
  padding: 16px;
  background: var(--primary-lighter);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}
.broadcast-status { text-align: right; }
.broadcast-content-preview {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-height: 200px;
  overflow-y: auto;
}
.broadcast-content-preview img { max-width: 100%; border-radius: 8px; margin: 8px 0; }

/* ===== 帖子详情 ===== */
.post-detail {
  max-height: 60vh;
  overflow-y: auto;
}
.post-detail img { max-width: 100%; border-radius: 8px; }

/* ===== 轮播图缩略图 ===== */
.banner-thumb {
  width: 80px;
  height: 42px;
  object-fit: cover;
}

/* ===== Quill 编辑器适配 ===== */
.ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; }
.ql-container.ql-snow { border-radius: 0 0 8px 8px; min-height: 150px; font-size: 14px; }
.modal-container .ql-editor { min-height: 120px; }

/* ===== 表单控件尺寸 ===== */
.form-control-sm { font-size: 13px; padding: 4px 10px; height: 30px; }

/* ===== Tab 标签页 ===== */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  gap: 0;
  margin-bottom: 16px;
}
.tab-item {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}
.tab-item:hover { color: var(--primary); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    z-index: 200;
  }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: block; }
  .content-area { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .modal-container { max-width: 96vw; margin: 8px; }
  .user-search-toolbar { align-items: stretch; flex-wrap: wrap; padding: 12px; }
  .user-search-toolbar .form-control { width: 100%; max-width: none; flex-basis: 100%; }
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-tertiary); }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.fw-bold { font-weight: 600; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }
.identity-admin-header{display:flex;align-items:center;justify-content:space-between;gap:24px}.identity-summary{min-width:120px;padding:14px 18px;display:flex;flex-direction:column;align-items:center;border-radius:16px;color:#1e63bd;background:#eaf3ff}.identity-summary strong{font-size:28px}.identity-summary span{margin-top:2px;font-size:12px;color:#71859e}.identity-admin-tabs{display:flex;gap:8px;margin:18px 0}.identity-admin-tabs button,.identity-filter-row button{padding:10px 18px;border:0;border-radius:10px;color:#6b7a8e;background:#eef3f8;cursor:pointer}.identity-admin-tabs button.active,.identity-filter-row button.active{color:#fff;background:#2674d8}.identity-filter-row{display:flex;gap:8px;margin-bottom:14px}.identity-application-card{margin-bottom:14px;padding:20px;border-radius:16px;background:#fff;border:1px solid #e5ebf2;box-shadow:0 5px 18px rgba(27,62,108,.06)}.identity-app-head{display:flex;align-items:center;gap:14px}.identity-app-user{min-width:0;flex:1;display:flex;align-items:center;gap:11px}.identity-app-user img,.identity-app-user>span{width:46px;height:46px;display:flex;align-items:center;justify-content:center;border-radius:13px;color:#fff;background:#3a82df;object-fit:cover}.identity-app-user div{display:flex;flex-direction:column}.identity-app-user small,.identity-tag-card small{margin-top:4px;color:#8a98aa}.identity-label{display:inline-flex;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:700;border:1px solid currentColor}.identity-blue{color:#286dc9;background:#eaf3ff}.identity-cyan{color:#168698;background:#e5f8fa}.identity-gold{color:#a26a14;background:#fff3d8}.identity-green{color:#21805a;background:#e7f7ee}.identity-violet{color:#704fb8;background:#f0eaff}.identity-red{color:#b64351;background:#ffedf0}.identity-slate{color:#5e6d80;background:#eef2f6}.identity-review-status{padding:6px 10px;border-radius:999px;font-size:12px}.identity-review-status.status-pending{color:#986411;background:#fff1d3}.identity-review-status.status-approved{color:#247d58;background:#e5f6ec}.identity-review-status.status-rejected{color:#b54553;background:#ffedf0}.identity-app-info{margin-top:14px;padding:13px 15px;display:grid;grid-template-columns:1fr 1fr 2fr;gap:12px;border-radius:12px;background:#f6f8fb}.identity-app-info span{display:flex;flex-direction:column;color:#52647b;font-size:13px}.identity-app-info b{margin-bottom:4px;color:#8b98a9;font-size:11px}.identity-evidence{display:flex;gap:8px;margin-top:13px}.identity-evidence img{width:76px;height:76px;border-radius:10px;object-fit:cover}.identity-review-note{margin-top:12px;color:#697a90;font-size:13px}.identity-review-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:14px}.identity-tag-toolbar{margin-bottom:14px}.identity-tag-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.identity-tag-card{padding:18px;display:flex;align-items:center;gap:13px;border-radius:15px;background:#fff;border:1px solid #e5ebf2;cursor:pointer}.identity-tag-card>div{min-width:0;flex:1;display:flex;flex-direction:column}.identity-switch{display:flex;align-items:center;gap:8px;color:#53647a}@media(max-width:800px){.identity-app-info{grid-template-columns:1fr}.identity-tag-list{grid-template-columns:1fr}.identity-admin-header{align-items:flex-start}.identity-summary{min-width:90px}}
.identity-labels,.user-identity-labels{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}.identity-review-textarea{min-height:130px!important;height:auto!important;line-height:1.55;resize:vertical}.form-static{padding:10px 12px;border-radius:8px;color:var(--text-primary);background:var(--bg-secondary)}.deletion-preview,.deletion-actor{display:block;margin-top:5px;color:var(--text-tertiary);font-size:12px;max-width:360px;white-space:normal;line-height:1.45}
.identity-review-requested{margin-bottom:14px;padding:11px 13px;border-radius:10px;color:#245fae;background:#edf5ff}
