/* =========================================================
   微信公众号多账号发布管理系统 - 高端响应式设计系统 (style.css)
   全场景深度适配：桌面PC (Desktop) / 平板 (Tablet) / 手机 (Mobile)
   视觉规范：深空曜石暗黑背景 + 微信生态绿 (#07c160) + 玻璃拟态 (Glassmorphism)
   ========================================================= */

:root {
  /* 主色调与品牌衍生 */
  --bg-main: #0a0f1d;
  --bg-card: rgba(18, 26, 44, 0.78);
  --bg-card-hover: rgba(26, 37, 62, 0.9);
  --bg-glass: rgba(13, 20, 36, 0.82);
  --bg-input: #0c1427;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(7, 193, 96, 0.4);
  --border-highlight: rgba(7, 193, 96, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* 微信品牌绿主渐变与微光 */
  --color-wechat: #07c160;
  --color-wechat-light: #10b981;
  --color-wechat-dark: #059669;
  --color-wechat-bg: rgba(7, 193, 96, 0.12);
  --accent-gradient: linear-gradient(135deg, #07c160 0%, #10b981 50%, #059669 100%);
  --accent-glow: rgba(7, 193, 96, 0.25);
  --accent-blue-gradient: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);

  /* 辅助状态色 */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;
  --purple: #818cf8;

  /* 圆角规范 */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* 阴影与微光 */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(7, 193, 96, 0.25);

  /* 尺寸常数 */
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 76px;
  --header-height: 66px;
  --mobile-bottom-bar-height: 62px;
}

/* =========================================================
   全局重置与排版规范
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100%;
  display: flex;
  overflow-x: hidden;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 顶部与背景微光氛围层 */
body::before {
  content: "";
  position: fixed;
  top: -150px;
  right: -100px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(7, 193, 96, 0.1) 0%, rgba(56, 189, 248, 0.03) 50%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  bottom: -200px;
  left: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

/* 自定义纤细滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* =========================================================
   侧边栏布局 (PC & Tablet)
   ========================================================= */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-subtle);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  min-height: var(--header-height);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(7, 193, 96, 0.3);
  flex-shrink: 0;
}

.brand-info {
  overflow: hidden;
  white-space: nowrap;
}

.brand-info h1 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.brand-info span {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid transparent;
}

.nav-item .nav-icon {
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
}

.nav-item .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: rgba(7, 193, 96, 0.12);
  color: #34d399;
  border-color: rgba(7, 193, 96, 0.25);
  font-weight: 600;
  box-shadow: inset 3px 0 0 #07c160;
}

.nav-badge {
  background: #07c160;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
  margin-left: auto;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid #07c160;
  object-fit: cover;
  flex-shrink: 0;
}

/* 移动端抽屉背景蒙层 */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
   主内容区与顶部 Header
   ========================================================= */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.top-header {
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.mobile-menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.page-title-box h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
}

.page-title-box p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 通用按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: var(--radius-xs);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 10px rgba(7, 193, 96, 0.25);
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(7, 193, 96, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-wechat {
  background: #07c160 !important;
  border-color: #07c160 !important;
  color: #fff !important;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: rgba(7, 193, 96, 0.4);
  color: #34d399;
  background: rgba(7, 193, 96, 0.08);
}

.btn-success {
  background: #10b981;
  color: #fff;
}
.btn-danger {
  background: #ef4444;
  color: #fff;
}
.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #ef4444;
}

.btn-icon-danger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon-danger:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* =========================================================
   内容容器与 KPI 大盘数据卡片
   ========================================================= */
.content-body {
  padding: 24px;
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-info {
  min-width: 0;
  flex: 1;
}

.stat-info .stat-num {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.5px;
}

.stat-info .stat-label {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 平台标识与胶囊 */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.platform-badge.wechat_oa {
  background: var(--color-wechat-bg);
  color: #34d399;
  border: 1px solid rgba(7, 193, 96, 0.3);
}

.status-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.status-pill.pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-pill.approved { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-pill.rejected { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-pill.published { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.status-pill.failed { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

/* =========================================================
   Tab 1: 图文审核工作台 (双栏 & 仿真机)
   ========================================================= */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 22px;
  align-items: start;
}

.content-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.review-card:hover {
  border-color: rgba(7, 193, 96, 0.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.review-card.active-preview {
  border-color: #07c160;
  box-shadow: 0 0 16px rgba(7, 193, 96, 0.2);
  background: rgba(20, 32, 54, 0.92);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.card-body-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 12px;
}

.card-media-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.card-media-thumb {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 微信真机仿真预览器 (iPhone Chassis) */
.phone-preview-container {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  background: #020617;
  border-radius: 36px;
  padding: 10px;
  border: 3px solid #334155;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.phone-notch {
  width: 110px;
  height: 18px;
  background: #0f172a;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin: 0 auto 6px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.phone-notch::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #1e293b;
  border-radius: 50%;
}

.phone-screen {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 26px;
  height: 560px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
}

.phone-screen::-webkit-scrollbar {
  display: none;
}

.preview-nav-bar {
  padding: 10px 14px;
  background: #f7f7f7;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #333;
  position: sticky;
  top: 0;
  z-index: 10;
}

.preview-content {
  padding: 16px 14px;
  flex: 1;
}

.preview-title {
  font-size: 17px;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
  line-height: 1.45;
}

.preview-author-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #576b95;
}

.preview-body {
  font-size: 14px;
  color: #333;
  line-height: 1.8;
  word-break: break-word;
}
.preview-body p {
  margin-bottom: 14px;
}
.preview-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 8px 0;
}

.preview-img-container {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 14px;
}

.preview-meta-bar {
  padding: 12px 14px;
  background: #fafafa;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #888;
}

/* =========================================================
   Tab 2: 公众号图文管理库 (筛选区 & 响应式表格)
   ========================================================= */
.contents-filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-responsive-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.mobile-table-hint {
  display: none;
  text-align: center;
  padding: 6px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px dashed var(--border-subtle);
}

/* =========================================================
   表单控件与通用输入
   ========================================================= */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 12.5px;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: #07c160;
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.15);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
  line-height: 1.6;
}

/* =========================================================
   模态弹窗系统
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 16px;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #151d30;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  padding: 24px;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.5);
  position: relative;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show .modal-card {
  transform: scale(1) translateY(0);
}

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

.modal-header h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* =========================================================
   手机端底部导航栏 (Mobile <= 640px)
   ========================================================= */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(var(--mobile-bottom-bar-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(10, 15, 29, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  z-index: 90;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10.5px;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  position: relative;
  transition: all 0.2s ease;
  flex: 1;
}

.mobile-nav-btn .icon {
  font-size: 18px;
  line-height: 1;
}

.mobile-nav-btn.active {
  color: #34d399;
  font-weight: 600;
}
.mobile-nav-btn.active .icon {
  transform: scale(1.1);
}

.mobile-badge {
  position: absolute;
  top: 4px;
  right: 25%;
  background: #07c160;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
}

/* Toast 提示 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #182238;
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border-left: 4px solid #07c160;
  font-size: 12.5px;
  animation: toastSlideIn 0.25s ease;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 4px;
}

@keyframes toastSlideIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* =========================================================
   多端深度响应式断点 (Desktop -> Tablet -> Mobile)
   ========================================================= */

/* 1. 平板适配 (641px ~ 1024px, iPad / Tablet) */
@media (min-width: 641px) and (max-width: 1024px) {
  :root {
    --sidebar-width: var(--sidebar-collapsed-width);
  }

  /* 平板紧凑侧边栏：仅保留居中图标与徽章，隐藏文字 */
  .brand-info, .sidebar-footer .user-name {
    display: none;
  }
  .sidebar-brand {
    justify-content: center;
    padding: 16px 0;
  }
  .sidebar-footer {
    justify-content: center;
    padding: 12px 0;
  }
  .nav-item {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
  }
  .nav-item .nav-label {
    display: none;
  }
  .nav-item .nav-icon {
    font-size: 20px;
    margin: 0 auto;
  }
  .nav-item .nav-badge {
    position: absolute;
    top: 6px;
    right: 10px;
    padding: 1px 5px;
    font-size: 9px;
  }

  /* 平板主内容与工作区 */
  .content-body {
    padding: 18px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .phone-preview-container {
    display: none; /* 平板端以全宽卡片阅读为主 */
  }

  /* 平板筛选区紧凑布局 */
  .contents-filter-card {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .filter-controls .search-box {
    grid-column: 1 / -1;
  }
  .filter-sync-btn {
    width: 100%;
    margin-top: 4px;
  }
}

/* 2. 手机端全量深度适配 (<= 640px, Mobile Phones) */
@media (max-width: 640px) {
  :root {
    --header-height: 56px;
  }

  /* 侧边栏转为隐藏式滑出抽屉 */
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    width: 270px;
    z-index: 95;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
  }
  .sidebar.mobile-open {
    transform: translateX(280px);
  }
  .sidebar-backdrop {
    display: block;
  }

  /* 顶部导航移动化适配 */
  .top-header {
    padding: 0 14px;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .page-title-box h2 {
    font-size: 15px;
  }
  .page-title-box p {
    display: none; /* 移动端隐藏过长副标题 */
  }

  /* 顶部操作按钮响应式缩减 */
  .header-actions {
    gap: 6px;
  }
  .header-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
  .header-btn .btn-text {
    display: none; /* 移动端按钮精简显示图标，不撑破顶部导航条 */
  }

  /* 移动端留出底部导航栏高度 */
  .content-body {
    padding: 12px;
    padding-bottom: calc(var(--mobile-bottom-bar-height) + env(safe-area-inset-bottom, 0px) + 24px);
  }

  /* KPI 卡片移动端两列自适应 */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
  }
  .stat-card {
    padding: 12px 10px;
    gap: 8px;
  }
  .stat-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
  .stat-info .stat-num {
    font-size: 18px;
  }
  .stat-info .stat-label {
    font-size: 10.5px;
  }

  /* 审核工作流与真机仿真器 */
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .phone-preview-container {
    display: none;
  }
  .mobile-bottom-nav {
    display: flex;
  }

  /* 图文卡片移动端优化 */
  .review-card {
    padding: 14px;
  }
  .card-title {
    font-size: 14.5px;
  }
  .card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .card-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* 图文库移动端筛选栏 */
  .contents-filter-card {
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  .filter-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .filter-controls .form-control {
    width: 100% !important;
  }
  .search-box {
    width: 100%;
  }
  .search-box input {
    flex: 1;
  }
  .filter-sync-btn {
    width: 100%;
  }

  /* 表格移动端触控滑动指示 */
  .mobile-table-hint {
    display: block;
  }

  /* 模态弹窗移动端转为底部抽屉卡片 */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-card {
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
    padding: 20px 16px;
    width: 100%;
    border-bottom: none;
  }

  /* Toast 居中置顶 */
  .toast-container {
    top: 12px;
    left: 14px;
    right: 14px;
  }
  .toast {
    text-align: center;
  }
}

/* 3. 小屏手机进一步微调 (<= 380px) */
@media (max-width: 380px) {
  .stat-info .stat-num {
    font-size: 16px;
  }
  .stat-card {
    padding: 10px 8px;
  }
  .btn-sm {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* ================= 可视化所见即所得图文编辑器 ================= */
.visual-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  flex-wrap: wrap;
  user-select: none;
}

.toolbar-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.toolbar-btn:hover {
  background: rgba(7, 193, 96, 0.2);
  border-color: #07c160;
  color: #fff;
}

.toolbar-btn:active {
  transform: scale(0.96);
}

.toolbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}

.visual-editor-body {
  min-height: 280px;
  max-height: 460px;
  overflow-y: auto;
  background: #ffffff;
  color: #2c3e50;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 0 8px 8px;
  font-size: 15px;
  line-height: 1.85;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  box-sizing: border-box;
  outline: none;
  user-select: text;
}

.visual-editor-body:focus {
  border-color: #07c160;
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.2);
}

.visual-editor-body p {
  margin: 0 0 14px 0;
  color: #2c3e50;
  line-height: 1.85;
}

.visual-editor-body h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 24px 0 12px 0;
  padding-left: 10px;
  border-left: 4px solid #07c160;
}

.visual-editor-body h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 18px 0 10px 0;
}

.visual-editor-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 12px 0;
  display: block;
}

.visual-editor-body blockquote {
  margin: 14px 0;
  padding: 10px 16px;
  background: #f8fafc;
  border-left: 4px solid #38bdf8;
  color: #475569;
  border-radius: 0 6px 6px 0;
}

.visual-editor-body ul, .visual-editor-body ol {
  margin: 10px 0 14px 20px;
  padding: 0;
}

.visual-editor-body li {
  margin-bottom: 6px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
