/* ============================
   班级论坛 - 全局样式
   黑灰扁平化风格
   ============================ */

:root {
  --bg-primary:   #0d0d0d;
  --bg-secondary: #141414;
  --bg-card:      #1a1a1a;
  --bg-hover:     #202020;
  --border:       #2a2a2a;
  --border-light: #333;
  --text-primary: #e8e8e8;
  --text-secondary: #999;
  --text-muted:   #555;
  --accent:       #6c63ff;
  --accent-hover: #5a52e0;
  --accent-soft:  rgba(108,99,255,.12);
  --success:      #22c55e;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --info:         #3b82f6;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 2px 12px rgba(0,0,0,.4);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.6);
  --font:         'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: #0d0d0d;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

/* 背景图片层（HTML元素比伪元素z-index更可靠） */
.bg-layer {
  position: fixed; inset: 0; z-index: 0;
  background: url('/assets/img/bg.jpg') center/cover no-repeat fixed;
  opacity: .35;
  pointer-events: none;
}

/* 所有主要内容放在背景图片上层 */
.navbar, .container, .admin-layout, .auth-page {
  position: relative; z-index: 1;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ===== Layout ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.layout { display: flex; gap: 24px; padding: 28px 0; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 280px; flex-shrink: 0; }

/* ===== Navbar ===== */
.navbar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.navbar-inner {
  display: flex; align-items: center; height: 58px; gap: 16px;
}
.navbar-brand {
  font-size: 17px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.navbar-brand span { color: var(--accent); }
.navbar-nav { display: flex; gap: 4px; flex: 1; }
.nav-link {
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all .2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.navbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.avatar-sm {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border-light);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; border: none; cursor: pointer;
  transition: all .2s; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-light); }
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 11px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 20px; }

/* ===== Post List ===== */
.post-list { display: flex; flex-direction: column; gap: 1px; }
.post-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all .2s;
  display: flex; gap: 16px;
}
.post-item:hover { border-color: var(--border-light); background: var(--bg-hover); }
.post-item-main { flex: 1; min-width: 0; }
.post-title {
  font-size: 16px; font-weight: 600; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.post-title:hover { color: var(--accent); }
.post-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 8px; font-size: 13px; color: var(--text-secondary);
}
.post-meta-sep::before { content: '·'; margin: 0 2px; }
.post-excerpt {
  color: var(--text-secondary); font-size: 13px; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-stats { display: flex; gap: 14px; font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.post-stats span { display: flex; align-items: center; gap: 4px; }

/* ===== Badge / Tag ===== */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
}
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-top { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-elite { background: rgba(239,68,68,.15); color: var(--danger); }
.badge-success { background: rgba(34,197,94,.15); color: var(--success); }

/* ===== Forms ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.form-control {
  width: 100%; background: var(--bg-secondary);
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  padding: 10px 14px; color: var(--text-primary); font-size: 14px; font-family: var(--font);
  transition: border-color .2s;
  outline: none;
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-hint { margin-top: 5px; font-size: 12px; color: var(--text-muted); }
.input-group { display: flex; gap: 8px; }
.input-group .form-control { flex: 1; }

/* ===== Auth Pages ===== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(108,99,255,.08), transparent 70%);
  padding: 40px 20px;
}
.auth-box {
  width: 100%; max-width: 440px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
}
.auth-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.auth-subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }
.auth-tabs { display: flex; gap: 2px; margin-bottom: 28px; background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 4px; }
.auth-tab {
  flex: 1; text-align: center; padding: 8px; border-radius: 5px;
  font-size: 14px; cursor: pointer; color: var(--text-secondary); transition: all .2s;
}
.auth-tab.active { background: var(--bg-card); color: var(--text-primary); font-weight: 600; }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 13px; margin: 20px 0; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: calc(50% - 30px);
  height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ===== Post Detail ===== */
.post-detail { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.post-detail-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; line-height: 1.4; }
.post-detail-meta { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.post-content { color: var(--text-primary); line-height: 1.8; word-break: break-word; }
.post-content img { border-radius: var(--radius-sm); max-width: 100%; margin: 8px 0; }
.post-content video { width: 100%; border-radius: var(--radius-sm); margin: 8px 0; background: #000; }
.post-attachments { margin-top: 20px; }
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.attachment-img { aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; transition: opacity .2s; border: 1px solid var(--border); }
.attachment-img:hover { opacity: .85; }

/* ===== Comments ===== */
.comment-section { margin-top: 28px; }
.comment-section h4 { font-size: 15px; font-weight: 600; margin-bottom: 20px; color: var(--text-secondary); }
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-item { display: flex; gap: 12px; }
.comment-body { flex: 1; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-name { font-size: 14px; font-weight: 600; }
.comment-time { font-size: 12px; color: var(--text-muted); }
.comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.comment-actions { margin-top: 6px; display: flex; gap: 12px; }
.comment-action-btn { font-size: 12px; color: var(--text-muted); cursor: pointer; background: none; border: none; padding: 0; }
.comment-action-btn:hover { color: var(--accent); }
.reply-box { margin-top: 12px; padding: 14px; background: var(--bg-secondary); border-radius: var(--radius-sm); display: none; }
.reply-list { margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; }

/* ===== Comment Form ===== */
.comment-form { margin-top: 24px; background: var(--bg-secondary); border-radius: var(--radius); padding: 20px; }

/* ===== Profile ===== */
.profile-header {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; display: flex; gap: 28px; align-items: flex-start;
  background-image: linear-gradient(135deg, var(--bg-card) 0%, rgba(108,99,255,.04) 100%);
}
.profile-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border-light); flex-shrink: 0; }
.profile-info h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.profile-username { color: var(--text-secondary); font-size: 14px; margin-bottom: 10px; }
.profile-bio { color: var(--text-secondary); font-size: 14px; }
.profile-stats { display: flex; gap: 28px; margin-top: 16px; }
.profile-stat { text-align: center; }
.profile-stat-num { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.profile-stat-label { font-size: 12px; color: var(--text-muted); }

/* ===== Settings ===== */
.settings-nav {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px;
  margin-bottom: 16px;
}
.settings-nav a { padding: 9px 14px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-secondary); }
.settings-nav a:hover, .settings-nav a.active { background: var(--bg-hover); color: var(--text-primary); }

/* ===== Avatar Upload ===== */
.avatar-upload { position: relative; display: inline-block; cursor: pointer; }
.avatar-upload-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.5);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.avatar-upload:hover .avatar-upload-overlay { opacity: 1; }
.avatar-upload-overlay span { color: #fff; font-size: 12px; }
.avatar-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-light); }

/* ===== Admin ===== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 230px; background: var(--bg-secondary); border-right: 1px solid var(--border);
  flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-brand {
  padding: 20px; font-size: 16px; font-weight: 700; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.admin-nav { padding: 12px 8px; }
.admin-nav-section { font-size: 11px; color: var(--text-muted); padding: 8px 8px 4px; text-transform: uppercase; letter-spacing: 1px; }
.admin-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14px;
  color: var(--text-secondary); margin-bottom: 2px; transition: all .2s;
}
.admin-nav a:hover, .admin-nav a.active {
  background: var(--bg-hover); color: var(--text-primary);
}
.admin-main { flex: 1; overflow-x: hidden; }
.admin-topbar {
  background: var(--bg-secondary); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.admin-topbar h1 { font-size: 16px; font-weight: 600; }
.admin-content { padding: 24px; }
.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); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.stat-card-label { font-size: 13px; color: var(--text-secondary); }
.stat-card-value { font-size: 28px; font-weight: 700; }
.stat-card-icon { font-size: 24px; margin-bottom: 4px; }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

/* ===== Pagination ===== */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; padding: 24px 0; }
.page-item {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary); transition: all .2s;
}
.page-item:hover { border-color: var(--accent); color: var(--accent); }
.page-item.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-item.disabled { opacity: .4; cursor: default; pointer-events: none; }

/* ===== Alert / Flash ===== */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: var(--success); }
.alert-danger  { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: var(--danger); }
.alert-info    { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.3); color: var(--info); }
.alert-warning { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); color: var(--warning); }

/* ===== Upload Preview ===== */
.upload-zone {
  border: 2px dashed var(--border-light); border-radius: var(--radius); padding: 28px;
  text-align: center; cursor: pointer; transition: all .2s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone p { color: var(--text-muted); font-size: 14px; margin-top: 8px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.preview-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.preview-item img, .preview-item video { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.7); color: #fff; border: none; cursor: pointer;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
}

/* ===== Category Filter ===== */
.cat-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-btn {
  padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border-light); background: var(--bg-card); color: var(--text-secondary);
  cursor: pointer; transition: all .2s;
}
.cat-btn:hover, .cat-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); max-width: 500px; width: 100%; padding: 32px;
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }

/* ===== Lightbox ===== */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 2000;
  display: none; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius-sm); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container { padding: 0 14px; }
  .layout { flex-direction: column; gap: 16px; padding: 16px 0; }
  .sidebar { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .profile-header { flex-direction: column; align-items: center; text-align: center; padding: 20px; gap: 16px; }
  .admin-sidebar { display: none; }
  .admin-content { padding: 16px; }
  .post-item { flex-direction: column; padding: 14px; gap: 10px; }
  .post-stats { flex-direction: row; margin-top: 6px; }
  .post-detail { padding: 18px; }
  .post-detail-title { font-size: 18px; }
  .post-detail-meta { flex-wrap: wrap; gap: 8px; }
  .cat-filter { gap: 4px; }
  .cat-btn { font-size: 12px; padding: 4px 10px; }
  .auth-box { padding: 24px 20px; }
  .auth-title { font-size: 20px; }
  .card-body { padding: 14px; }
  .form-row { flex-direction: column; gap: 0; }
  .settings-nav { width: 100% !important; flex-direction: row; flex-wrap: wrap; }
  .profile-stats { gap: 16px; }
  .attachment-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .comment-item { gap: 8px; }
  .reply-list { padding-left: 10px; }

  /* Mobile menu */
  .navbar-nav { display: none; position: fixed; top: 58px; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border); flex-direction: column; padding: 8px; z-index: 99; max-height: calc(100vh - 58px); overflow-y: auto; }
  .navbar-nav.open { display: flex; }
  .navbar-nav .nav-link { padding: 10px 14px; font-size: 15px; }
  .menu-toggle { display: flex; }
  .navbar-right .user-menu span { display: none; }
  .navbar-right { gap: 6px; }
}

@media (max-width: 480px) {
  .container { padding: 0 10px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 14px; }
  .stat-card-value { font-size: 22px; }
  .stat-card-icon { font-size: 20px; }
  .post-item { padding: 12px; gap: 8px; border-radius: var(--radius-sm); }
  .post-title { font-size: 14px; }
  .post-meta { font-size: 12px; gap: 6px; margin-top: 4px; }
  .pagination { gap: 2px; }
  .page-item { width: 30px; height: 30px; font-size: 12px; }
  .auth-box { padding: 20px 16px; }
  .auth-title { font-size: 18px; }
  .auth-subtitle { font-size: 13px; margin-bottom: 20px; }
  .btn { font-size: 13px; padding: 7px 14px; }
  .btn-lg { padding: 10px 20px; font-size: 15px; }
  .form-control { font-size: 13px; padding: 9px 12px; }
  .form-group { margin-bottom: 14px; }
  .post-detail-title { font-size: 16px; }
  .post-content { font-size: 14px; }
  .profile-avatar { width: 72px; height: 72px; }
  .profile-info h2 { font-size: 18px; }
  .table-wrap table { font-size: 12px; }
  th, td { padding: 8px 10px; font-size: 12px; }
  .attachment-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .comment-text { font-size: 13px; }
  .auth-tab { font-size: 13px; padding: 6px; }
  .upload-zone { padding: 18px; }
  .upload-zone p { font-size: 13px; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .input-group { flex-direction: column; gap: 6px; }
  #toast-container { bottom: 12px; right: 12px; left: 12px; }
  .toast { max-width: 100%; font-size: 13px; padding: 10px 14px; }
}

/* ===== Mobile: Hide menu toggle on desktop ===== */
.menu-toggle {
  display: none; background: none; border: none; color: var(--text-primary);
  font-size: 22px; cursor: pointer; padding: 6px; margin-left: auto;
  line-height: 1;
}

/* ===== Loading Spinner ===== */
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border-light);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Toast ===== */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 12px 18px; font-size: 14px;
  box-shadow: var(--shadow-lg); animation: toastIn .3s ease;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--success); color: var(--success); }
.toast.error   { border-left: 3px solid var(--danger);  color: var(--danger); }
.toast.info    { border-left: 3px solid var(--info);    color: var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ===== Editor Toolbar ===== */
.editor-toolbar {
  background: var(--bg-secondary); border: 1px solid var(--border-light);
  border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 6px 8px; display: flex; gap: 4px;
}
.editor-toolbar .form-control { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.toolbar-btn {
  width: 30px; height: 28px; border: none; background: none; color: var(--text-secondary);
  border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.toolbar-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ===== Misc ===== */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.gap-1 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
