/* ========== 后台管理样式 ========== */
:root {
  --admin-primary: #1a2b4a;
  --admin-accent: #c8a35c;
  --admin-bg: #f0f2f5;
  --admin-sidebar: #1a2b4a;
  --admin-sidebar-hover: #2a3f6a;
  --admin-white: #ffffff;
  --admin-text: #2d3748;
  --admin-text-light: #718096;
  --admin-border: #e2e8f0;
  --admin-success: #48bb78;
  --admin-danger: #f56565;
  --admin-warning: #ed8936;
}

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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--admin-bg);
  color: var(--admin-text);
  font-size: 14px;
}

/* ========== 登录页 ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f1d33, #1a2b4a, #2a3f6a);
}

.login-box {
  background: var(--admin-white);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box .logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-box .logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--admin-primary), #2a3f6a);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-accent);
  font-size: 32px;
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
  margin-bottom: 16px;
}

.login-box h1 {
  font-size: 22px;
  color: var(--admin-primary);
  margin-bottom: 8px;
}

.login-box .subtitle {
  font-size: 14px;
  color: var(--admin-text-light);
  margin-bottom: 24px;
}

.login-form .form-group {
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  font-size: 13px;
  color: var(--admin-text);
  margin-bottom: 6px;
  font-weight: 500;
}

.login-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
}

.login-form input:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(200,163,92,0.1);
}

.login-form button {
  width: 100%;
  padding: 12px;
  background: var(--admin-primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.login-form button:hover {
  background: #2a3f6a;
}

.login-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-hint {
  margin-top: 16px;
  padding: 12px;
  background: #f8f9fb;
  border-radius: 6px;
  font-size: 12px;
  color: var(--admin-text-light);
  text-align: center;
}

/* ========== 后台布局 ========== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 240px;
  background: var(--admin-sidebar);
  color: rgba(255,255,255,0.7);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header .logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-accent);
  font-size: 18px;
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
}

.sidebar-header .logo-text {
  font-size: 15px;
  color: white;
  font-weight: 600;
}

.sidebar-header .logo-text small {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.05);
  color: white;
}

.sidebar-nav a.active {
  background: rgba(200,163,92,0.1);
  color: var(--admin-accent);
  border-left-color: var(--admin-accent);
}

.sidebar-nav a .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-nav a .badge {
  margin-left: auto;
  background: var(--admin-danger);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer a {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-footer a:hover {
  color: white;
}

/* 主内容区 */
.admin-main {
  flex: 1;
  margin-left: 240px;
  padding: 24px;
}

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

.admin-header h1 {
  font-size: 22px;
  color: var(--admin-primary);
}

.admin-header .breadcrumb {
  font-size: 13px;
  color: var(--admin-text-light);
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-card .stat-icon.blue { background: #ebf4ff; color: #3182ce; }
.stat-card .stat-icon.green { background: #e6fffa; color: #319795; }
.stat-card .stat-icon.orange { background: #fffaf0; color: #dd6b20; }
.stat-card .stat-icon.red { background: #fff5f5; color: #e53e3e; }

.stat-card .stat-info h3 {
  font-size: 24px;
  color: var(--admin-primary);
  margin-bottom: 2px;
}

.stat-card .stat-info p {
  font-size: 13px;
  color: var(--admin-text-light);
}

/* 内容卡片 */
.content-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
}

.content-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.content-card-header h2 {
  font-size: 16px;
  color: var(--admin-primary);
}

.content-card-body {
  padding: 24px;
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--admin-text-light);
  font-weight: 500;
  border-bottom: 2px solid var(--admin-border);
  background: #f8f9fb;
}

.data-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--admin-border);
}

.data-table tr:hover {
  background: #f8f9fb;
}

.data-table .actions {
  display: flex;
  gap: 8px;
}

.data-table .actions button {
  padding: 4px 12px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit {
  background: #ebf4ff;
  color: #3182ce;
}

.btn-edit:hover { background: #bee3f8; }

.btn-delete {
  background: #fff5f5;
  color: #e53e3e;
}

.btn-delete:hover { background: #fed7d7; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-primary {
  background: var(--admin-primary);
  color: white;
}

.btn-primary:hover { background: #2a3f6a; }

.btn-accent {
  background: var(--admin-accent);
  color: white;
}

.btn-accent:hover { background: #a8853f; }

.btn-outline {
  background: white;
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
}

.btn-outline:hover { background: #f8f9fb; }

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

/* 表单 */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--admin-text);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(200,163,92,0.1);
}

.form-group textarea {
  min-height: 300px;
  resize: vertical;
  line-height: 1.8;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border);
}

/* 编辑器工具栏 */
.editor-toolbar {
  padding: 8px;
  border: 1px solid var(--admin-border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  background: #f8f9fb;
}

.editor-toolbar button {
  padding: 4px 10px;
  border: 1px solid var(--admin-border);
  background: white;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.editor-toolbar button:hover {
  background: var(--admin-primary);
  color: white;
  border-color: var(--admin-primary);
}

.editor-toolbar + textarea {
  border-radius: 0 0 6px 6px;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.tag-blue { background: #ebf4ff; color: #3182ce; }
.tag-green { background: #e6fffa; color: #319795; }
.tag-orange { background: #fffaf0; color: #dd6b20; }
.tag-red { background: #fff5f5; color: #e53e3e; }
.tag-gray { background: #f0f2f5; color: #718096; }

/* 消息列表 */
.message-item {
  padding: 16px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  gap: 16px;
}

.message-item.unread {
  background: #fffbe6;
}

.message-item .msg-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.message-item.unread .msg-icon {
  background: var(--admin-accent);
  color: white;
}

.message-item .msg-content {
  flex: 1;
}

.message-item .msg-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.message-item .msg-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--admin-text);
}

.message-item .msg-time {
  font-size: 12px;
  color: var(--admin-text-light);
}

.message-item .msg-subject {
  font-size: 13px;
  color: var(--admin-accent);
  margin-bottom: 4px;
  font-weight: 500;
}

.message-item .msg-text {
  font-size: 13px;
  color: var(--admin-text-light);
  line-height: 1.6;
}

.message-item .msg-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* 开关 */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { display: none; }

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #cbd5e0;
  border-radius: 24px;
  transition: 0.3s;
}

.switch-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.switch input:checked + .switch-slider {
  background: var(--admin-accent);
}

.switch input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--admin-text-light);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* 响应式 */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
    box-shadow: 2px 0 12px rgba(0,0,0,0.3);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
    padding: 16px 12px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .admin-header h1 {
    font-size: 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 14px;
    gap: 12px;
  }

  .stat-card .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .stat-card .stat-info h3 {
    font-size: 18px;
  }

  .stat-card .stat-info p {
    font-size: 11px;
  }

  .content-card-body {
    padding: 14px;
  }

  .content-card-header {
    padding: 12px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* 表格横向滚动 */
  .data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 600px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* 编辑器工具栏 */
  .editor-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .editor-toolbar button {
    padding: 4px 8px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .form-group textarea {
    min-height: 200px;
  }

  /* 消息列表 */
  .message-item {
    padding: 14px;
    gap: 12px;
  }

  .message-item .msg-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .message-item .msg-header {
    flex-direction: column;
    gap: 2px;
  }

  .message-item .msg-actions {
    flex-wrap: wrap;
  }

  .form-actions {
    flex-direction: column;
  }

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

  .login-box {
    padding: 24px 20px;
    max-width: 100%;
    margin: 16px;
  }

  .login-box .logo-icon {
    width: 52px;
    height: 52px;
    font-size: 26px;
  }

  .login-box h1 {
    font-size: 19px;
  }
}

/* 超小屏幕（480px以下） */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card .stat-info h3 {
    font-size: 16px;
  }

  .admin-main {
    padding: 12px 10px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .data-table .actions button {
    padding: 3px 8px;
    font-size: 11px;
  }
}

/* 移动端遮罩层 */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}

.sidebar-overlay.visible {
  display: block;
}

/* 移动端菜单切换按钮 */
.admin-mobile-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 101;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: var(--admin-primary);
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .admin-mobile-toggle {
    display: flex;
  }

  .admin-main {
    padding-top: 56px;
  }
}

/* ========== 后台大屏桌面自适应 ========== */

/* 1440px+ 大屏桌面 */
@media (min-width: 1440px) {
  body { font-size: 15px; }
  .sidebar { width: 260px; }
  .admin-main { margin-left: 260px; padding: 28px; }
  .admin-header h1 { font-size: 24px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .stat-card { padding: 24px; }
  .stat-card .stat-icon { width: 52px; height: 52px; font-size: 24px; }
  .stat-card .stat-info h3 { font-size: 28px; }
  .stat-card .stat-info p { font-size: 14px; }
  .content-card-body { padding: 28px; }
  .content-card-header { padding: 18px 28px; }
  .content-card-header h2 { font-size: 17px; }
  .data-table th { padding: 14px 20px; font-size: 14px; }
  .data-table td { padding: 14px 20px; font-size: 15px; }
  .sidebar-nav a { padding: 14px 28px; font-size: 15px; }
  .sidebar-header { padding: 24px 28px; }
  .sidebar-header .logo-icon { width: 40px; height: 40px; font-size: 20px; }
  .sidebar-header .logo-text { font-size: 16px; }
  .form-group input, .form-group textarea, .form-group select { padding: 12px 16px; font-size: 15px; }
  .form-group label { font-size: 14px; }
  .btn { padding: 10px 20px; font-size: 15px; }
  .login-box { max-width: 440px; padding: 48px; }
  .login-box h1 { font-size: 24px; }
  .login-box .logo-icon { width: 72px; height: 72px; font-size: 36px; }
}

/* 1680px+ 全高清显示器 */
@media (min-width: 1680px) {
  body { font-size: 16px; }
  .sidebar { width: 280px; }
  .admin-main { margin-left: 280px; padding: 32px; }
  .admin-header h1 { font-size: 26px; }
  .stats-grid { gap: 28px; }
  .stat-card { padding: 28px; gap: 20px; }
  .stat-card .stat-icon { width: 56px; height: 56px; font-size: 26px; border-radius: 12px; }
  .stat-card .stat-info h3 { font-size: 32px; }
  .stat-card .stat-info p { font-size: 15px; }
  .content-card-body { padding: 32px; }
  .content-card-header { padding: 20px 32px; }
  .content-card-header h2 { font-size: 18px; }
  .data-table th { padding: 16px 24px; font-size: 15px; }
  .data-table td { padding: 16px 24px; font-size: 16px; }
  .sidebar-nav a { padding: 16px 32px; font-size: 16px; gap: 14px; }
  .sidebar-nav a .icon { font-size: 20px; width: 26px; }
  .sidebar-header { padding: 28px 32px; }
  .sidebar-header .logo-icon { width: 44px; height: 44px; font-size: 22px; border-radius: 10px; }
  .sidebar-header .logo-text { font-size: 17px; }
  .sidebar-header .logo-text small { font-size: 12px; }
  .form-group input, .form-group textarea, .form-group select { padding: 14px 18px; font-size: 16px; }
  .form-group label { font-size: 15px; }
  .btn { padding: 12px 24px; font-size: 16px; }
  .login-box { max-width: 480px; padding: 52px; border-radius: 16px; }
  .login-box h1 { font-size: 26px; }
  .login-box .logo-icon { width: 80px; height: 80px; font-size: 40px; border-radius: 16px; }
  .login-form input { padding: 14px 16px; font-size: 16px; }
  .login-form button { padding: 14px; font-size: 17px; }
  .message-item { padding: 20px 32px; gap: 20px; }
  .message-item .msg-icon { width: 48px; height: 48px; font-size: 22px; }
  .message-item .msg-name { font-size: 16px; }
  .message-item .msg-text { font-size: 14px; }
  .editor-toolbar button { padding: 6px 14px; font-size: 14px; }
}

/* 1920px+ FHD/2K显示器 */
@media (min-width: 1920px) {
  body { font-size: 17px; }
  .sidebar { width: 300px; }
  .admin-main { margin-left: 300px; padding: 36px 40px; }
  .admin-header h1 { font-size: 28px; }
  .stats-grid { gap: 32px; }
  .stat-card { padding: 32px; gap: 24px; border-radius: 12px; }
  .stat-card .stat-icon { width: 64px; height: 64px; font-size: 30px; border-radius: 14px; }
  .stat-card .stat-info h3 { font-size: 36px; }
  .stat-card .stat-info p { font-size: 16px; }
  .content-card { border-radius: 12px; }
  .content-card-body { padding: 36px; }
  .content-card-header { padding: 24px 36px; }
  .content-card-header h2 { font-size: 20px; }
  .data-table th { padding: 18px 28px; font-size: 16px; }
  .data-table td { padding: 18px 28px; font-size: 17px; }
  .sidebar-nav a { padding: 18px 36px; font-size: 17px; gap: 16px; }
  .sidebar-nav a .icon { font-size: 22px; width: 28px; }
  .sidebar-header { padding: 32px 36px; }
  .sidebar-header .logo-icon { width: 48px; height: 48px; font-size: 24px; border-radius: 12px; }
  .sidebar-header .logo-text { font-size: 18px; }
  .sidebar-header .logo-text small { font-size: 13px; }
  .form-group input, .form-group textarea, .form-group select { padding: 16px 20px; font-size: 17px; border-radius: 8px; }
  .form-group label { font-size: 16px; }
  .btn { padding: 14px 28px; font-size: 17px; border-radius: 8px; }
  .login-box { max-width: 520px; padding: 56px; border-radius: 20px; }
  .login-box h1 { font-size: 28px; }
  .login-box .logo-icon { width: 88px; height: 88px; font-size: 44px; border-radius: 20px; }
  .login-form input { padding: 16px 18px; font-size: 17px; border-radius: 8px; }
  .login-form button { padding: 16px; font-size: 18px; border-radius: 8px; }
  .message-item { padding: 24px 36px; gap: 24px; }
  .message-item .msg-icon { width: 56px; height: 56px; font-size: 26px; }
  .message-item .msg-name { font-size: 18px; }
  .message-item .msg-text { font-size: 15px; line-height: 1.7; }
  .editor-toolbar button { padding: 8px 16px; font-size: 15px; }
  .data-table .actions button { padding: 6px 16px; font-size: 14px; }
}

/* 2560px+ 4K/超宽屏 */
@media (min-width: 2560px) {
  body { font-size: 19px; }
  .sidebar { width: 340px; }
  .admin-main { margin-left: 340px; padding: 44px 56px; }
  .admin-header h1 { font-size: 32px; }
  .stats-grid { gap: 36px; }
  .stat-card { padding: 40px; gap: 28px; border-radius: 16px; }
  .stat-card .stat-icon { width: 76px; height: 76px; font-size: 36px; border-radius: 18px; }
  .stat-card .stat-info h3 { font-size: 44px; }
  .stat-card .stat-info p { font-size: 18px; }
  .content-card { border-radius: 16px; }
  .content-card-body { padding: 44px; }
  .content-card-header { padding: 28px 44px; }
  .content-card-header h2 { font-size: 22px; }
  .data-table th { padding: 22px 36px; font-size: 18px; }
  .data-table td { padding: 22px 36px; font-size: 19px; }
  .sidebar-nav a { padding: 22px 44px; font-size: 19px; gap: 18px; }
  .sidebar-nav a .icon { font-size: 24px; width: 32px; }
  .sidebar-header { padding: 36px 44px; }
  .sidebar-header .logo-icon { width: 56px; height: 56px; font-size: 28px; border-radius: 14px; }
  .sidebar-header .logo-text { font-size: 20px; }
  .sidebar-header .logo-text small { font-size: 14px; }
  .form-group input, .form-group textarea, .form-group select { padding: 18px 24px; font-size: 19px; border-radius: 10px; }
  .form-group label { font-size: 18px; }
  .btn { padding: 16px 32px; font-size: 19px; border-radius: 10px; }
  .login-box { max-width: 600px; padding: 64px; border-radius: 24px; }
  .login-box h1 { font-size: 32px; }
  .login-box .logo-icon { width: 100px; height: 100px; font-size: 52px; border-radius: 24px; }
  .login-form input { padding: 18px 22px; font-size: 19px; border-radius: 10px; }
  .login-form button { padding: 18px; font-size: 20px; border-radius: 10px; }
  .message-item { padding: 28px 44px; gap: 28px; }
  .message-item .msg-icon { width: 64px; height: 64px; font-size: 30px; }
  .message-item .msg-name { font-size: 20px; }
  .message-item .msg-text { font-size: 17px; line-height: 1.8; }
  .editor-toolbar button { padding: 10px 20px; font-size: 17px; }
  .data-table .actions button { padding: 8px 20px; font-size: 16px; }
}

/* ========== Quill 编辑器样式 ========== */
.ql-toolbar {
  border-radius: 4px 4px 0 0;
  border-color: #ddd !important;
  background: #f8f9fa;
}
.ql-container {
  border-radius: 0 0 4px 4px;
  border-color: #ddd !important;
  font-size: 15px;
  font-family: 'Noto Sans SC', -apple-system, sans-serif;
}
.ql-editor {
  min-height: 280px;
  line-height: 1.8;
}
.ql-editor p {
  margin-bottom: 0.5em;
}
.ql-snow .ql-picker {
  font-size: 13px;
}
.ql-snow .ql-tooltip {
  z-index: 2000;
}
/* 弹窗内编辑器适配 */
.modal-body .ql-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* ========== Quill 字体与字号配置 ========== */

/* 字体 CSS 类定义（Quill 使用 ql-font-{id}） */
.ql-font-Default { font-family: -apple-system, sans-serif; }
.ql-font-SimSun { font-family: 'SimSun', '宋体', serif; }
.ql-font-SimHei { font-family: 'SimHei', '黑体', sans-serif; }
.ql-font-MicrosoftYaHei { font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; }
.ql-font-KaiTi { font-family: 'KaiTi', '楷体', serif; }
.ql-font-FangSong { font-family: 'FangSong', '仿宋', serif; }
.ql-font-PingFangSC { font-family: 'PingFang SC', '苹方', sans-serif; }
.ql-font-NotoSerifSC { font-family: 'Noto Serif SC', serif; }
.ql-font-Georgia { font-family: 'Georgia', serif; }

/* 字体选择器默认显示文本 */
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
  content: '默认';
}

/* 各字体的显示文本和预览字体 */
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="Default"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Default"]::before {
  content: '默认';
  font-family: -apple-system, sans-serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="SimSun"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="SimSun"]::before {
  content: '宋体';
  font-family: 'SimSun', '宋体', serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="SimHei"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="SimHei"]::before {
  content: '黑体';
  font-family: 'SimHei', '黑体', sans-serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="MicrosoftYaHei"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="MicrosoftYaHei"]::before {
  content: '微软雅黑';
  font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="KaiTi"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="KaiTi"]::before {
  content: '楷体';
  font-family: 'KaiTi', '楷体', serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="FangSong"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="FangSong"]::before {
  content: '仿宋';
  font-family: 'FangSong', '仿宋', serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="PingFangSC"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="PingFangSC"]::before {
  content: '苹方';
  font-family: 'PingFang SC', '苹方', sans-serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="NotoSerifSC"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="NotoSerifSC"]::before {
  content: 'Noto Serif SC';
  font-family: 'Noto Serif SC', serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="Georgia"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Georgia"]::before {
  content: 'Georgia';
  font-family: 'Georgia', serif;
}

/* 字号下拉框：覆盖 Quill 默认的 "Normal" 显示 */
.ql-snow .ql-picker.ql-size { width: 72px; }
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
  content: attr(data-value) !important;
}

/* ========== 附件区域样式 ========== */
.attachment-section { margin-top: 20px; padding: 16px; border: 1px dashed #d0d5dd; border-radius: 8px; background: #fafbfc; }
.attachment-section h4 { font-size: 14px; font-weight: 600; color: #333; margin: 0 0 8px 0; display: flex; align-items: center; gap: 6px; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.attachment-item { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 13px; color: #333; transition: all 0.15s; }
.attachment-item:hover { border-color: #1a56db; box-shadow: 0 1px 4px rgba(26,86,219,0.1); }
.attachment-item .file-icon { font-size: 20px; flex-shrink: 0; }
.attachment-item .file-info { min-width: 0; }
.attachment-item .file-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.attachment-item .file-size { font-size: 11px; color: #999; }
.attachment-item .file-remove { flex-shrink: 0; width: 22px; height: 22px; border: none; background: #fee2e2; color: #dc2626; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; transition: all 0.15s; padding: 0; }
.attachment-item .file-remove:hover { background: #fca5a5; }
.attachment-upload-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; font-size: 13px; background: #eff6ff; color: #1a56db; border: 1px dashed #93c5fd; border-radius: 6px; cursor: pointer; transition: all 0.15s; }
.attachment-upload-btn:hover { background: #dbeafe; border-color: #3b82f6; }
.attachment-hint { font-size: 12px; color: #999; margin-top: 8px; }

/* 前端展现附件（文章详情页） */
.frontend-attachments { margin-top: 32px; padding: 20px; background: #f9fafb; border-radius: 8px; border: 1px solid #e5e7eb; }
.frontend-attachments h3 { font-size: 16px; font-weight: 600; margin: 0 0 12px 0; color: #333; }
.frontend-attachments .fa-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.frontend-attachments .fa-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; text-decoration: none; color: #333; transition: all 0.15s; }
.frontend-attachments .fa-item:hover { border-color: #1a56db; box-shadow: 0 2px 8px rgba(26,86,219,0.1); }
.frontend-attachments .fa-icon { font-size: 24px; flex-shrink: 0; width: 32px; text-align: center; }
.frontend-attachments .fa-info { min-width: 0; }
.frontend-attachments .fa-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frontend-attachments .fa-size { font-size: 12px; color: #999; }
.frontend-attachments .fa-download { flex-shrink: 0; color: #1a56db; font-size: 12px; font-weight: 500; }

@media (max-width: 768px) {
  .frontend-attachments .fa-list { grid-template-columns: 1fr; }
}
