/* ===================== CMS 文章系统（老师指导） ===================== */
.art-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.art-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.7; }
.art-badge.pin   { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.art-badge.feat  { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.art-badge.global{ background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.art-badge.home { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.art-badge.cat  { background: #f0fdfa; color: #0f766e; border: 1px solid #ccfbf1; }

/* 学生端：卡片网格 */
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.art-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); transition: .18s; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.art-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(37,99,235,.12); border-color: #bfdbfe; }
.art-cover { height: 132px; background-size: cover; background-position: center; background-color: #eef2ff; }
.art-body { padding: 14px 15px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.art-title { font-size: 15.5px; font-weight: 700; line-height: 1.4; color: #111827; }
.art-sum { font-size: 13px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #9aa3af; margin-top: auto; }
.art-meta-author { color: var(--brand-d); }

/* 学生端：瀑布流（老师指导列表） */
.masonry-grid {
  column-count: 4;
  column-gap: 16px;
}
.masonry-card {
  display: inline-block;
  break-inside: avoid;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 16px;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.masonry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
  border-color: #c7d2fe;
}
.masonry-cover {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: #f0f1f5;
}
.masonry-body {
  padding: 13px 15px 14px;
}
.masonry-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.masonry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.masonry-author {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.masonry-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.masonry-name {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}
.masonry-likes {
  font-size: 13px;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* 管理端：行列表 */
.art-list { display: flex; flex-direction: column; gap: 10px; }
.art-row { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.art-row:hover { border-color: #bfdbfe; }
.art-row-main { flex: 1; min-width: 0; }
.art-row-title { display: block; font-size: 15px; font-weight: 700; color: #111827; text-decoration: none; margin: 2px 0 4px; }
.art-row-title:hover { color: var(--brand-d); }
.art-row-acts { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }

/* ===================== 文章详情页（白底官方公告风 · Bootstrap 对齐） ===================== */
body.article-body {
  background: #f5f7fb; color: #1f2937; min-height: 100vh;
  display: flex; flex-direction: column;
}

/* 顶部导航栏（复用 app-navbar 蓝底） */
.article-topbar { justify-content: space-between; }
.article-top-link { color: #fff; font-size: 13px; padding: 5px 12px; border-radius: 6px; text-decoration: none; }
.article-top-link:hover { background: rgba(255,255,255,.16); color: #fff; text-decoration: none; }

/* 主容器 */
.article-main {
  flex: 1;
  width: 100%; margin: 0 auto;
  padding: 28px 0 40px;
}

/* 文章卡片：白底 + 轻阴影，叠在浅灰背景上更职业 */
.art-page {
  background: #fff; color: #1f2937;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.04);
  padding: 32px 36px 36px;
}

/* 面包屑（Bootstrap breadcrumb 兜底样式，确保无 BS 时仍可读） */
.art-page-crumb { margin-bottom: 18px; font-size: 12px; }
.art-page-crumb .breadcrumb { background: transparent; padding: 0; margin: 0; }

/* 标题区 */
.art-page-header { padding: 4px 0 14px; }
.art-page-title {
  font-size: 26px; font-weight: 700; color: #111827;
  line-height: 1.4; margin: 0 0 14px;
}
.art-page-meta { font-size: 13px; }
.art-page-divider {
  height: 1px; background: #e5e7eb; margin: 0 0 6px;
}

/* 正文容器 */
.art-page-body { padding: 24px 0 8px; }

/* 正文排版 */
.art-page-content { font-size: 15px; line-height: 1.95; color: #374151; word-break: break-word; -webkit-font-smoothing: antialiased; }
.art-page-content p { margin: 0 0 14px; }
.art-page-content h1, .art-page-content h2, .art-page-content h3, .art-page-content h4 { color: #111827; font-weight: 700; line-height: 1.4; margin: 24px 0 12px; }
.art-page-content h1 { font-size: 21px; }
.art-page-content h2 { font-size: 19px; }
.art-page-content h3 { font-size: 17px; }
.art-page-content h4 { font-size: 15.5px; }
.art-page-content img { max-width: 100%; height: auto; margin: 12px 0; display: block; }
.art-page-content ul, .art-page-content ol { padding-left: 24px; margin: 0 0 14px; }
.art-page-content li { margin: 6px 0; }
.art-page-content blockquote { border-left: 3px solid #bfdbfe; background: #f8fafc; padding: 12px 16px; margin: 0 0 14px; color: #475569; }
.art-page-content a { color: #2563eb; text-decoration: underline; }
.art-page-content a:hover { color: #1d4ed8; }
.art-page-content table { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 14px; }
.art-page-content th, .art-page-content td { border: 1px solid #e5e7eb; padding: 8px 10px; }
.art-page-content th { background: #f8fafc; font-weight: 600; }
.art-page-content hr { border: none; border-top: 1px solid #e5e7eb; margin: 20px 0; }
.art-page-content code { background: #f1f5f9; padding: 2px 5px; border-radius: 4px; font-size: 13px; color: #be123c; }
.art-page-content pre { background: #f8fafc; color: #1f2937; padding: 14px 16px; border-radius: 8px; overflow-x: auto; margin: 0 0 14px; border: 1px solid #e5e7eb; }
.art-page-content pre code { background: none; color: inherit; padding: 0; }

/* 空状态 */
.art-empty {
  text-align: center; padding: 60px 20px; color: #6b7280; font-size: 15px;
}

/* 页脚 */
.article-foot {
  background: #1e3a8f; color: #fff;
  text-align: center; font-size: 12px;
  padding: 18px 20px 22px; line-height: 1.8;
}
.article-foot div { opacity: .9; }

/* 响应式 */
@media (max-width: 640px) {
  .article-main { padding: 18px 0 28px; }
  .art-page { padding: 22px 18px 26px; border-radius: 10px; }
  .art-page-title { font-size: 20px; }
  .art-page-body { padding: 18px 0 6px; }
}

/* 编辑器表单 */
.art-form { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; width: 98%; max-width: none; box-sizing: border-box; }
.art-form .field textarea { height: 280px; line-height: 1.7; font-family: inherit; }
.art-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); margin: 4px 0 14px; cursor: pointer; }
.art-check input { width: 16px; height: 16px; }
.field-hint { font-size: 12px; color: var(--muted); margin: 5px 0 0; line-height: 1.5; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* WangEditor 容器（扁平化） */
.we-toolbar { border: 1px solid var(--line); border-bottom: none; border-radius: 10px 10px 0 0; background: #fff; }
.we-editor { border: 1px solid var(--line); border-radius: 0 0 10px 10px; overflow: hidden; background: #fff; }
.we-editor .w-e-toolbar { border: none !important; background: #fff; }
.we-editor .w-e-text-container { height: 380px !important; min-height: 380px; background: #fff; border: none !important; }
.we-editor .w-e-text { background: #fff; }
.we-editor .w-e-text-placeholder { color: var(--muted); }
.we-editor .w-e-bar { background: #fff; }

/* ===================== 教师控制台：论坛风格面板 ===================== */
.cms-dash-board { margin-top: 16px; }

/* 顶栏：标签 + 描述 + 发帖按钮 */
.cms-dash-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 18px;
  gap: 14px; flex-wrap: wrap;
}
.cms-dash-head-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.cms-dash-tag {
  display: inline-block; padding: 4px 13px; border-radius: 6px;
  background: #ffefe8; color: #e05a28; font-size: 13px;
  font-weight: 700; white-space: nowrap; letter-spacing: .3px;
}
.cms-dash-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.cms-dash-post-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 22px; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 14px;
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background .15s; flex-shrink: 0;
}
.cms-dash-post-btn:hover { background: #1d4ed8; }

/* 双栏主体 */
.cms-dash-body {
  display: flex; gap: 18px; margin-top: 14px;
  align-items: flex-start;
}

/* 左栏：文章信息流 */
.cms-dash-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.cms-feed-item {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 15px 17px;
  transition: border-color .15s, box-shadow .15s;
}
.cms-feed-item:hover { border-color: #bfdbfe; box-shadow: 0 2px 10px rgba(37,99,235,.07); }
.cms-feed-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; }
.cms-feed-title {
  display: block; font-size: 16px; font-weight: 700;
  color: #111827; text-decoration: none; line-height: 1.4;
  margin-bottom: 5px;
}
.cms-feed-title:hover { color: var(--brand); }
.cms-feed-sum {
  font-size: 13.5px; color: #6b7280; line-height: 1.65;
  margin: 0 0 8px; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cms-feed-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 12.5px; color: #9ca3af; flex-wrap: wrap;
}
.cms-feed-edit {
  color: var(--brand); text-decoration: none; font-weight: 500;
  margin-left: auto;
}
.cms-feed-edit:hover { text-decoration: underline; }
.cms-feed-empty {
  background: var(--panel); border: 1px dashed var(--line);
  border-radius: 10px; padding: 36px 20px; text-align: center;
}
.cms-feed-empty p { color: var(--muted); font-size: 14px; margin: 0; }

/* 右栏：热门侧栏 */
.cms-dash-side {
  width: 300px; flex-shrink: 0;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 17px;
  box-sizing: border-box;
}
.cms-side-title {
  font-size: 15px; font-weight: 700; color: #111827;
  padding-left: 11px; border-left: 3.5px solid var(--brand);
  margin-bottom: 12px; line-height: 1.3;
}
.cms-hot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cms-hot-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px solid #f1f3f5;
}
.cms-hot-item:last-child { border-bottom: none; padding-bottom: 0; }
.cms-hot-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  font-size: 12.5px; font-weight: 800; flex-shrink: 0;
  background: #f1f3f5; color: #9ca3af; line-height: 1;
}
.cms-hot-rank.top { background: #fff1f2; color: #e05a28; }
.cms-hot-body { flex: 1; min-width: 0; }
.cms-hot-title {
  display: block; font-size: 13.5px; font-weight: 600;
  color: #333; text-decoration: none; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 4px;
}
.cms-hot-title:hover { color: var(--brand); }
.cms-hot-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #9ca3af; gap: 8px;
}
.cms-hot-author { font-weight: 500; color: #6b7280; }
.cms-hot-views { flex-shrink: 0; }
.cms-side-empty { font-size: 13px; color: var(--muted); margin: 0; text-align: center; padding: 16px 0; }

/* 响应式：窄屏时侧栏下沉 */
@media (max-width: 860px) {
  .cms-dash-body { flex-direction: column; }
  .cms-dash-side { width: 100%; box-sizing: border-box; }
}

/* 瀑布流响应式 */
@media (max-width: 1200px) { .masonry-grid { column-count: 3; } }
@media (max-width: 900px)  { .masonry-grid { column-count: 2; } }
@media (max-width: 580px)  { .masonry-grid { column-count: 1; } }

/* ============ 英语词库管理编辑器 ============ */
.dict-admin{ font-size:13px; }
.da-stage{ border:1px solid #e5e7eb; border-radius:10px; padding:10px 12px; margin-bottom:12px; background:#fbfdff; }
.da-grade{ border-left:3px solid #93c5fd; margin:8px 0 8px 10px; padding:6px 0 6px 10px; }
.da-unit{ border:1px dashed #d1d5db; border-radius:8px; padding:8px 10px; margin:8px 0; background:#fff; }
.da-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.da-title{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.da-badge{ font-size:11px; padding:1px 6px; border-radius:6px; color:#fff; }
.da-stage-b{ background:#6366f1; } .da-grade-b{ background:#0ea5e9; } .da-unit-b{ background:#10b981; }
.da-meta{ color:#6b7280; font-size:12px; }
.da-actions{ display:flex; gap:6px; flex-wrap:wrap; }
.da-empty{ color:#9ca3af; font-size:12px; margin:4px 0 0 12px; }
.da-sub{ font-size:12px; color:#374151; font-weight:600; margin:8px 0 4px; }
.da-list{ display:flex; flex-direction:column; gap:4px; }
.da-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; border-bottom:1px dotted #eee; padding:4px 0; }
.da-row-main{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.da-ph{ color:#0ea5e9; font-size:12px; }
.da-pos{ color:#a855f7; font-size:12px; }
.da-mean{ color:#111827; }
.da-col{ color:#6b7280; font-size:12px; }
.da-modal-overlay{ position:fixed; inset:0; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; z-index:9999; }
.da-modal{ background:#fff; border-radius:12px; padding:20px; width:min(460px,92vw); box-shadow:0 10px 40px rgba(0,0,0,.2); }
.da-modal .field{ display:flex; flex-direction:column; gap:4px; }
.da-modal .field label{ font-size:13px; color:#374151; }
/* 对话跟读编辑器 */
.da-modal-lg{ width:min(640px,94vw); max-height:88vh; overflow:auto; }
.da-dlg-list{ display:flex; flex-direction:column; gap:10px; margin:6px 0; }
.da-dlg-card{ border:1px solid #d1d5db; border-radius:10px; padding:10px; background:#f8fafc; }
.da-dlg-head{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.da-dlg-title{ flex:1; padding:6px 8px; border:1px solid #d1d5db; border-radius:8px; box-sizing:border-box; }
.da-dlg-lines{ display:flex; flex-direction:column; gap:6px; margin-bottom:8px; }
.da-dlg-line{ display:flex; align-items:center; gap:6px; }
.da-dlg-role{ padding:6px 4px; border:1px solid #d1d5db; border-radius:8px; }
.da-dlg-en{ flex:2; padding:6px 8px; border:1px solid #d1d5db; border-radius:8px; box-sizing:border-box; }
.da-dlg-zh{ flex:2; padding:6px 8px; border:1px solid #d1d5db; border-radius:8px; box-sizing:border-box; }
