/* Admin v54 · 模块界面补全（HTML class 与 CSS 对齐） */

/* ── 页面头 / 表单栅格 ── */
.page-header { margin-bottom: 20px; }
.page-header h2 { font-size: 1.25rem; font-weight: 700; color: var(--t1); margin-bottom: 6px; }
.page-header p { font-size: .875rem; color: var(--t2); line-height: 1.65; max-width: 720px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 4px; }
.form-row.cols-1 { grid-template-columns: 1fr; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-s);
  font-size: .875rem; font-weight: 600; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--t1);
  transition: all var(--t); white-space: nowrap;
}
.btn-secondary:hover { background: var(--bg-3); border-color: var(--blue); color: var(--blue); }

.edit-card-save {
  margin-left: auto; padding: 6px 14px; border-radius: var(--r-s);
  background: var(--blue); color: var(--on-accent); border: none;
  font-size: .78rem; font-weight: 700; cursor: pointer;
}
.edit-card-save:hover { background: var(--blue-l); }

.quick-actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.qa-label { font-size: .85rem; font-weight: 700; color: var(--t1); }
.qa-sub { font-size: .72rem; color: var(--t3); margin-top: 2px; }

/* ── 客资模块 ── */
.leads-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 14px 16px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r);
}
.leads-search-wrap { flex: 1; min-width: 200px; }
.leads-search {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--r-s); color: var(--t1); padding: 9px 13px; font-size: .9rem;
}
.leads-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-d); }
.leads-filter-sel {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-s);
  color: var(--t1); padding: 9px 12px; font-size: .875rem; min-width: 120px;
}
.leads-stat-card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 14px 12px; text-align: center;
}
.leads-stat-num { font-size: 1.5rem; font-weight: 800; color: var(--t1); line-height: 1.2; }
.leads-stat-label { font-size: .78rem; color: var(--t2); margin-top: 4px; }
.leads-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.leads-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.leads-table th {
  padding: 11px 12px; text-align: left; font-size: .8rem; font-weight: 600;
  color: var(--t1); background: var(--bg-2); border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.leads-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--t1); vertical-align: middle; }
.leads-table tr:last-child td { border-bottom: none; }
.leads-table tr:hover td { background: var(--bg-hover); }
.btn-export {
  display: inline-flex; align-items: center; padding: 8px 14px;
  border-radius: var(--r-s); font-size: .875rem; font-weight: 600;
  border: 1px solid var(--line-2); color: var(--t2); background: var(--bg-2);
}
.btn-export:hover { color: var(--blue); border-color: var(--blue); }

/* ── 案例 / 评价列表 ── */
.case-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; margin-bottom: 10px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r);
}
.case-row-color { width: 4px; align-self: stretch; border-radius: 2px; background: var(--blue); flex-shrink: 0; }
.case-row-info { flex: 1; min-width: 0; }
.case-row-title { font-size: .92rem; font-weight: 700; color: var(--t1); margin-bottom: 4px; }
.case-row-meta { font-size: .78rem; color: var(--t2); }
.case-row-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.case-tag {
  font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 4px;
  background: var(--blue-d); color: var(--blue);
}
.case-row-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

.testimonial-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; margin-bottom: 12px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r);
}
.testimonial-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue-d); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}

/* ── 企业资讯 · 文章列表 ── */
.news-article-list { display: flex; flex-direction: column; gap: 12px; }
.news-article-row {
  display: grid; grid-template-columns: 112px 1fr auto;
  gap: 16px; align-items: stretch;
  padding: 16px; background: var(--bg-1);
  border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .2s, background .2s;
}
.news-article-row:hover { border-color: rgba(91,115,183,.35); background: var(--bg-hover); }
.news-cover-thumb {
  width: 112px; min-height: 84px; border-radius: var(--r-s);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.news-row-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.news-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-category-tag {
  font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 4px;
  background: rgba(91,115,183,.12); color: var(--gd);
}
.news-row-title { font-size: .95rem; font-weight: 700; color: var(--t1); line-height: 1.45; }
.news-row-summary { font-size: .82rem; color: var(--t2); line-height: 1.55; }
.news-row-meta { font-size: .75rem; color: var(--t3); }
.news-row-actions {
  display: flex; flex-direction: column; gap: 8px;
  justify-content: center; align-items: stretch; min-width: 108px;
}
.news-views { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; color: var(--t3); }
.news-views svg { width: 12px; height: 12px; stroke: currentColor; }
.news-status-tag.pub {
  background: rgba(61,155,114,.14); color: #2d8a5e; border: 1px solid rgba(61,155,114,.32);
}
.news-status-tag.sched {
  background: rgba(250,140,22,.12); color: #d46b08; border: 1px solid rgba(250,140,22,.35);
}
.news-status-tag.draft {
  background: rgba(91,115,183,.1); color: var(--t2); border: 1px solid var(--line);
}

@media (max-width: 860px) {
  .news-article-row { grid-template-columns: 1fr; }
  .news-cover-thumb { width: 100%; min-height: 120px; }
  .news-row-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .form-row, .form-row.cols-3, .form-row.cols-4 { grid-template-columns: 1fr; }
  .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .leads-stats { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── 企业资讯 · 全屏编辑器 (ne-*) ── */
#newsModal.modal-overlay {
  z-index: 500; padding: 0; background: var(--bg-1);
  backdrop-filter: none; align-items: stretch; justify-content: stretch;
}
#newsModal.modal-overlay.show { display: flex; }
#newsModal .ne-editor {
  flex: 1; width: 100%; height: 100%; min-height: 0;
  display: flex; flex-direction: column; background: var(--bg-1);
}

.ne-topbar {
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 16px; flex-shrink: 0;
  background: var(--bg-1); border-bottom: 1px solid var(--line);
}
.ne-topbar-left, .ne-topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ne-topbar-center { flex: 1; min-width: 0; }
.ne-close-btn {
  width: 32px; height: 32px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--bg-2);
  color: var(--t2); font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.ne-close-btn:hover { color: var(--t1); border-color: var(--line-2); }
.ne-title-label { font-size: .82rem; font-weight: 700; color: var(--t1); white-space: nowrap; }
.ne-title-input {
  width: 100%; border: none; outline: none; background: transparent;
  font-size: 1rem; font-weight: 700; color: var(--t1);
}
.ne-title-input::placeholder { color: var(--t3); font-weight: 500; }
.ne-btn-draft {
  padding: 6px 14px; border-radius: var(--r-s); font-size: .8rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--t1); cursor: pointer;
}
.ne-btn-draft:hover { border-color: var(--line-2); background: var(--bg-3); }
.ne-btn-publish {
  padding: 6px 16px; border-radius: var(--r-s); font-size: .8rem; font-weight: 700;
  border: none; background: var(--blue); color: #fff; cursor: pointer;
  box-shadow: 0 2px 8px rgba(91,115,183,.25);
}
.ne-btn-publish:hover { background: var(--blue-l); }

.ne-body { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.ne-left {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: var(--bg-2);
}
.ne-meta-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--bg-1); border-bottom: 1px solid var(--line);
}
.ne-sel {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-s);
  color: var(--t1); padding: 6px 10px; font-size: .78rem; min-height: 34px;
}
.ne-sel:focus { outline: none; border-color: var(--blue); }
.ne-cover-wrap { display: flex; align-items: center; gap: 6px; }
.ne-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 10px; min-height: 34px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--t2);
  font-size: .75rem; cursor: pointer;
}
.ne-icon-btn:hover { color: var(--t1); border-color: var(--line-2); }
.ne-icon-btn svg { width: 14px; height: 14px; }

.ne-toolbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--bg-1); border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.ne-toolbar-group { display: flex; align-items: center; gap: 2px; }
.ne-toolbar-divider { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.ne-tb-btn, .ne-tpl-sel {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 30px; padding: 4px 8px; border-radius: 5px;
  border: none; background: transparent; color: var(--t2);
  font-size: .75rem; cursor: pointer;
}
.ne-tb-btn:hover { background: var(--bg-2); color: var(--t1); }
.ne-tpl-sel {
  border: 1px solid var(--line); background: var(--bg-2); padding: 4px 10px;
}

.ne-textarea {
  flex: 1; min-height: 200px; width: 100%; resize: none;
  border: none; outline: none; padding: 20px 22px;
  background: #fff; color: var(--t1);
  font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace;
  font-size: .88rem; line-height: 1.75;
}
.ne-bottom-meta {
  display: flex; gap: 12px; padding: 12px 14px;
  background: var(--bg-1); border-top: 1px solid var(--line); flex-shrink: 0;
}
.ne-bottom-field { flex: 1; min-width: 0; }
.ne-bottom-field label {
  display: block; font-size: .72rem; font-weight: 600; color: var(--t3);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em;
}
.ne-bottom-field textarea, .ne-bottom-field input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-s); color: var(--t1); padding: 8px 10px; font-size: .82rem;
  font-family: inherit; resize: vertical;
}

.ne-right {
  width: 42%; max-width: 520px; flex-shrink: 0;
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg-1); border-left: 1px solid var(--line);
}
.ne-preview-head {
  padding: 12px 16px; font-size: .78rem; font-weight: 700; color: var(--t2);
  border-bottom: 1px solid var(--line); flex-shrink: 0;
  text-transform: uppercase; letter-spacing: .06em;
}
#ne-preview-content {
  flex: 1; overflow-y: auto; padding: 20px 24px 32px;
  font-size: .92rem; line-height: 1.8; color: var(--t2);
}
#ne-preview-content h1, #ne-preview-content h2, #ne-preview-content h3 { color: var(--t1); margin: 1em 0 .5em; }
#ne-preview-content p { margin-bottom: .85em; }
#ne-preview-content blockquote {
  border-left: 3px solid var(--blue); padding: 8px 14px; margin: 12px 0;
  background: rgba(91,115,183,.08); border-radius: 0 6px 6px 0;
}
#ne-preview-content img { max-width: 100%; border-radius: 6px; }

/* ── 模块工具栏（案例 / 评价）── */
.module-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 14px 16px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r);
}
.module-toolbar-meta { font-size: .82rem; color: var(--t2); margin-left: 4px; }
.module-toolbar-meta strong { color: var(--t1); font-weight: 700; }
.module-toolbar .edit-card-save { margin-left: auto; }

.cases-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 14px 16px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r);
}

.add-case-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--r-s);
  font-size: .875rem; font-weight: 700; cursor: pointer;
  background: var(--blue); color: var(--on-accent); border: none;
  transition: background var(--t);
}
.add-case-btn:hover { background: var(--blue-l); }

.module-empty, .images-empty {
  grid-column: 1 / -1; text-align: center; padding: 48px 24px;
  color: var(--t3); font-size: .875rem; line-height: 1.65;
  background: var(--bg-1); border: 1px dashed var(--line-2); border-radius: var(--r);
}

.testimonial-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.testimonial-row-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.testimonial-row-label { font-size: .78rem; font-weight: 700; color: var(--t2); }

/* ── 图片库 ── */
.images-page {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px;
}
.images-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.images-filter { flex: 1; min-width: 200px; }
.images-filter input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--r-s); color: var(--t1); padding: 9px 13px; font-size: .875rem;
}
.images-filter input:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-d);
}
.images-count {
  font-size: .82rem; color: var(--t2); white-space: nowrap; margin-left: auto;
}
.upload-zone {
  border: 2px dashed var(--line-2); border-radius: var(--r);
  padding: 28px 20px; text-align: center; cursor: pointer;
  transition: border-color var(--t), background var(--t); margin-bottom: 14px;
  background: var(--bg-2);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--blue); background: rgba(91,115,183,.06);
}
.upload-zone-icon {
  display: flex; justify-content: center; margin-bottom: 10px; color: var(--t3);
}
.upload-zone-icon svg { width: 36px; height: 36px; stroke: var(--blue); opacity: .85; }
.upload-zone-title { font-size: .9rem; font-weight: 600; color: var(--t1); margin-bottom: 4px; }
.upload-zone-sub { font-size: .78rem; color: var(--t3); line-height: 1.5; }

.upload-progress-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.upload-progress-item {
  display: grid; grid-template-columns: 1fr 120px auto; gap: 10px; align-items: center;
  padding: 8px 12px; background: var(--bg-2); border-radius: var(--r-s); border: 1px solid var(--line);
}
.upload-progress-name {
  font-size: .78rem; color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.upload-progress-bar {
  height: 6px; background: var(--line); border-radius: 99px; overflow: hidden;
}
.upload-progress-fill {
  height: 100%; width: 0; background: var(--blue); border-radius: 99px; transition: width .3s;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
}
.image-item {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-s); overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t);
}
.image-item:hover, .image-item.selected {
  border-color: rgba(91,115,183,.45);
  box-shadow: 0 4px 16px rgba(91,115,183,.12);
}
.image-item-thumb {
  position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer;
  background: var(--bg-3);
}
.image-item-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .25s ease;
}
.image-item:hover .image-item-thumb img { transform: scale(1.03); }
.image-item-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: rgba(5, 15, 36, .72); opacity: 0; transition: opacity var(--t);
}
.image-item-thumb:hover .image-item-overlay { opacity: 1; }
.image-item-meta { padding: 8px 10px 10px; }
.image-item-name {
  font-size: .72rem; font-weight: 600; color: var(--t1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.image-item-size { font-size: .68rem; color: var(--t3); margin-top: 2px; }

.img-btn {
  padding: 6px 12px; border-radius: 6px; font-size: .72rem; font-weight: 700;
  cursor: pointer; border: none; white-space: nowrap;
}
.img-btn-copy { background: #fff; color: var(--t1); }
.img-btn-copy:hover { background: var(--blue-d); color: var(--blue); }
.img-btn-del { background: rgba(229,62,62,.15); color: #c53030; border: 1px solid rgba(229,62,62,.25); }
.img-btn-del:hover { background: rgba(229,62,62,.25); }

@media (max-width: 720px) {
  .images-count { margin-left: 0; width: 100%; }
  .image-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .module-toolbar .edit-card-save { margin-left: 0; width: 100%; }
}
