/* ============================================================
   锐码汇科 · 官网 CMS 补充样式
   —— 前台：新闻列表 / 文章详情 / 首页最新动态 / 空态
   —— 后台：/admin 登录 + 文章管理
   主色沿用 css/style.css 的 CSS 变量，保证视觉统一
   ============================================================ */

/* ---------- 1. 前台：空态与占位 ---------- */
.nl-empty {
  max-width: 820px; margin: 0 auto; padding: 56px 24px; text-align: center;
  color: var(--c-text-light); font-size: 15px; background: #fff; border-radius: 8px;
  border: 1px dashed var(--c-border);
}
.nl-empty strong { display: block; font-size: 17px; color: var(--c-title); margin-bottom: 8px; font-weight: 600; }
.nl-skel { height: 152px; border-radius: 6px; background: linear-gradient(90deg, #F2F5F9 25%, #E9EEF6 37%, #F2F5F9 63%); background-size: 400% 100%; animation: nlSkel 1.4s ease infinite; }
@keyframes nlSkel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 2. 前台：文章详情正文（覆盖后台富文本常见标签） ---------- */
.article .a-cover { margin: 0 0 28px; border-radius: 10px; overflow: hidden; background: var(--c-bg); }
.article .a-cover img { width: 100%; display: block; }
.article h1 { font-size: 30px; line-height: 1.45; color: var(--c-title); margin-bottom: 4px; }
.article .a-body { font-size: 15.5px; line-height: 1.95; color: var(--c-text); }
.article .a-body p { margin-bottom: 18px; }
.article .a-body h2 { font-size: 23px; color: var(--c-primary); margin: 34px 0 14px; }
.article .a-body h3 { font-size: 20px; color: var(--c-primary); margin: 28px 0 12px; }
.article .a-body h4 { font-size: 17px; color: var(--c-text); margin: 22px 0 10px; }
.article .a-body ul, .article .a-body ol { margin: 0 0 18px 22px; }
.article .a-body ul { list-style: disc; }
.article .a-body ol { list-style: decimal; }
.article .a-body li { margin-bottom: 8px; }
.article .a-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.article .a-body blockquote {
  margin: 20px 0; padding: 14px 20px; border-left: 3px solid var(--c-primary);
  background: var(--c-accent-soft); color: var(--c-text-muted); border-radius: 0 6px 6px 0;
}
.article .a-body a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.article .a-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.article .a-body th, .article .a-body td { border: 1px solid var(--c-border); padding: 10px 12px; text-align: left; }
.article .a-body th { background: var(--c-bg); font-weight: 600; }
.article .a-foot { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--c-border); display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .article h1 { font-size: 23px; }
  .article .a-body { font-size: 15px; }
  .article .a-body h2 { font-size: 20px; }
}

/* ---------- 3. 后台：布局骨架 ---------- */
.adm-body {
  background: #F4F6FA; min-height: 100vh; color: var(--c-text);
  font-family: var(--font, "Microsoft YaHei", "PingFang SC", Arial, sans-serif);
  line-height: 1.7; font-size: 14px; margin: 0;
}

/* 登录页 */
.adm-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(1200px 420px at 50% -10%, rgba(25,96,168,.16), transparent 70%),
    linear-gradient(180deg, #F7FAFD 0%, #EEF3F9 100%);
}
.adm-login {
  width: 100%; max-width: 400px; background: #fff; border-radius: 14px;
  padding: 40px 36px 34px; box-shadow: 0 18px 50px rgba(17,43,74,.12);
  border: 1px solid #E8EDF4;
}
.adm-login .adm-logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 26px; }
.adm-login .adm-logo img { height: 34px; width: auto; }
.adm-login h1 { font-size: 20px; text-align: center; color: var(--c-title); margin: 0 0 6px; font-weight: 600; }
.adm-login .adm-sub { text-align: center; font-size: 13px; color: var(--c-text-light); margin-bottom: 26px; }
.adm-field { margin-bottom: 18px; }
.adm-field label { display: block; font-size: 13px; font-weight: 600; color: #4A5568; margin-bottom: 8px; }
.adm-input, .adm-textarea, .adm-select {
  width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid #D8DDE6;
  border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--c-text); background: #fff;
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.adm-input:focus, .adm-textarea:focus, .adm-select:focus {
  border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(25,96,168,.12);
}
.adm-textarea { resize: vertical; min-height: 96px; line-height: 1.75; }
.adm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s; white-space: nowrap;
}
.adm-btn--primary { background: var(--c-primary); color: #fff; }
.adm-btn--primary:hover { background: var(--c-primary-2); }
.adm-btn--ghost { background: #fff; color: var(--c-text); border-color: #D8DDE6; }
.adm-btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.adm-btn--danger { background: #fff; color: #D64545; border-color: #F0C9C9; }
.adm-btn--danger:hover { background: #FFF5F5; border-color: #D64545; }
.adm-btn--block { width: 100%; }
.adm-btn:disabled { opacity: .6; cursor: not-allowed; }
.adm-btn--sm { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.adm-msg { font-size: 13px; margin-top: 14px; min-height: 20px; }
.adm-msg.is-error { color: #D64545; }
.adm-msg.is-ok { color: #1E7A46; }
.adm-login .adm-foot { margin-top: 22px; text-align: center; font-size: 12px; color: var(--c-text-light); }
.adm-login .adm-foot a { color: var(--c-text-light); }
.adm-login .adm-switch { text-align: center; font-size: 12.5px; margin: 12px 0 0; }
.adm-login .adm-switch a { color: var(--c-primary); }
.adm-login .adm-switch a:hover { text-decoration: underline; }
.adm-otp-row { display: flex; gap: 10px; align-items: stretch; }
.adm-otp-row .adm-input { flex: 1 1 auto; min-width: 0; letter-spacing: 4px; font-weight: 600; }
.adm-otp-row .adm-btn { flex: 0 0 auto; padding: 0 14px; font-size: 13px; }
.adm-login .adm-hint strong { color: var(--c-text); font-weight: 600; }

/* 顶栏 */
.adm-header {
  position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid #E6EBF2;
  height: 60px; display: flex; align-items: center; padding: 0 28px; gap: 18px;
}
.adm-header .adm-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--c-title); }
.adm-header .adm-brand img { height: 26px; width: auto; }
.adm-header .adm-brand span { font-size: 13px; font-weight: 400; color: var(--c-text-light); padding-left: 10px; border-left: 1px solid #E6EBF2; }
.adm-header .adm-spacer { flex: 1 1 auto; }
.adm-header .adm-user { font-size: 13px; color: var(--c-text-muted); display: flex; align-items: center; gap: 10px; }
.adm-header .adm-user a { color: var(--c-text-muted); }
.adm-header .adm-user a:hover { color: var(--c-primary); }

/* 主体 + 侧栏 */
.adm-main { max-width: 1280px; margin: 0 auto; padding: 26px 28px 60px; }
.adm-panel { background: #fff; border: 1px solid #E6EBF2; border-radius: 12px; }
.adm-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 22px; border-bottom: 1px solid #EDF1F6;
}
.adm-toolbar h2 { font-size: 17px; color: var(--c-title); font-weight: 600; margin: 0; }
.adm-toolbar .adm-spacer { flex: 1 1 auto; }
.adm-tabs { display: inline-flex; background: #F2F5F9; border-radius: 8px; padding: 3px; gap: 2px; }
.adm-tabs button {
  border: 0; background: transparent; padding: 7px 16px; border-radius: 6px; cursor: pointer;
  font-size: 13px; color: var(--c-text-muted); font-family: inherit; transition: .2s;
}
.adm-tabs button.is-active { background: #fff; color: var(--c-primary); font-weight: 600; box-shadow: 0 1px 3px rgba(17,43,74,.10); }
.adm-search { position: relative; }
.adm-search input { width: 220px; padding-left: 34px; }
.adm-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #9AA6B2; }

/* 表格 */
.adm-table { width: 100%; border-collapse: collapse; }
.adm-table th, .adm-table td { padding: 14px 18px; text-align: left; vertical-align: middle; border-bottom: 1px solid #F0F3F8; }
.adm-table th { font-size: 12.5px; font-weight: 600; color: #7B8798; background: #FAFBFD; letter-spacing: .5px; }
.adm-table td { font-size: 14px; color: var(--c-text); }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tr:hover td { background: #FBFCFE; }
.adm-table .t-title { font-weight: 600; color: var(--c-title); max-width: 420px; }
.adm-table .t-title a { color: inherit; }
.adm-table .t-title a:hover { color: var(--c-primary); }
.adm-table .t-date { color: var(--c-text-muted); font-size: 13px; white-space: nowrap; }
.adm-table .t-ops { white-space: nowrap; text-align: right; }
.adm-table .t-ops button { margin-left: 6px; }
.adm-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; line-height: 1.7; }
.adm-badge--pub { background: #E7F6EC; color: #1E7A46; }
.adm-badge--draft { background: #FDF1E3; color: #B9741C; }
.adm-empty { padding: 60px 20px; text-align: center; color: var(--c-text-light); }
.adm-empty strong { display: block; color: var(--c-title); font-size: 15px; margin-bottom: 6px; }

/* 编辑器 */
.adm-editor { padding: 24px 26px 30px; }
.adm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.adm-col-main, .adm-col-side { min-width: 0; }
.adm-card { background: #fff; border: 1px solid #E6EBF2; border-radius: 12px; padding: 20px 22px; margin-bottom: 18px; }
.adm-card h3 { font-size: 14px; font-weight: 600; color: var(--c-title); margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid #F0F3F8; }
.adm-hint { font-size: 12px; color: var(--c-text-light); margin-top: 6px; line-height: 1.6; }
.adm-req { color: #DD3333; }

/* 富文本工具条 */
.rte { border: 1px solid #D8DDE6; border-radius: 8px; overflow: hidden; background: #fff; }
.rte.is-focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(25,96,168,.12); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 10px; background: #FAFBFD; border-bottom: 1px solid #E8EDF4; align-items: center; }
.rte-bar button {
  min-width: 32px; height: 30px; padding: 0 8px; border: 0; background: transparent; border-radius: 6px;
  font-size: 13px; color: #4A5568; cursor: pointer; font-family: inherit; display: inline-flex;
  align-items: center; justify-content: center; transition: .15s;
}
.rte-bar button:hover { background: #EAF1FA; color: var(--c-primary); }
.rte-bar button.is-on { background: var(--c-primary); color: #fff; }
.rte-bar .rte-sep { width: 1px; height: 18px; background: #E1E7EF; margin: 0 6px; }
.rte-area { min-height: 380px; max-height: 70vh; overflow-y: auto; padding: 18px 20px; font-size: 15px; line-height: 1.9; outline: none; }
.rte-area:empty::before { content: attr(data-ph); color: #AAA; pointer-events: none; }
.rte-area h2 { font-size: 22px; color: var(--c-primary); margin: 26px 0 12px; }
.rte-area h3 { font-size: 19px; color: var(--c-primary); margin: 22px 0 10px; }
.rte-area p { margin-bottom: 14px; }
.rte-area ul { list-style: disc; margin: 0 0 14px 22px; }
.rte-area ol { list-style: decimal; margin: 0 0 14px 22px; }
.rte-area img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.rte-area blockquote { margin: 16px 0; padding: 12px 18px; border-left: 3px solid var(--c-primary); background: var(--c-accent-soft); }
.rte-area a { color: var(--c-primary); text-decoration: underline; }

/* 封面上传 */
.cov-drop {
  border: 1px dashed #C9D4E2; border-radius: 10px; background: #FAFBFD; padding: 18px;
  text-align: center; cursor: pointer; transition: .2s; position: relative; overflow: hidden;
}
.cov-drop:hover, .cov-drop.is-over { border-color: var(--c-primary); background: #F4F8FD; }
.cov-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cov-drop .cov-ico { color: #9AA6B2; margin-bottom: 6px; }
.cov-drop .cov-ico svg { width: 26px; height: 26px; margin: 0 auto; }
.cov-drop p { font-size: 13px; color: var(--c-text-muted); margin: 0; }
.cov-drop small { display: block; font-size: 12px; color: var(--c-text-light); margin-top: 4px; }
.cov-preview { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid #E6EBF2; }
.cov-preview img { width: 100%; display: block; }
.cov-preview .cov-remove {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 14px; line-height: 1;
}
.cov-progress { height: 4px; background: #E8EDF4; border-radius: 4px; overflow: hidden; margin-top: 10px; display: none; }
.cov-progress i { display: block; height: 100%; width: 0; background: var(--c-primary); transition: width .2s; }

/* 底部操作条 */
.adm-actions {
  position: sticky; bottom: 0; z-index: 20; background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px); border-top: 1px solid #E6EBF2; margin-top: 4px;
  padding: 14px 26px; display: flex; align-items: center; gap: 10px; border-radius: 0 0 12px 12px;
}
.adm-actions .adm-spacer { flex: 1 1 auto; }
.adm-actions .adm-state { font-size: 13px; color: var(--c-text-light); }

/* 提示条 */
.adm-toast {
  position: fixed; left: 50%; top: 22px; transform: translateX(-50%) translateY(-12px);
  background: #2B3444; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(17,43,74,.24); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 999;
}
.adm-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.adm-toast.is-error { background: #C0392B; }

/* 删除确认弹层 */
.adm-modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(15,34,58,.45); padding: 20px; }
.adm-modal.is-open { display: flex; }
.adm-modal-box { width: 100%; max-width: 400px; background: #fff; border-radius: 12px; padding: 26px 26px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.adm-modal-box h3 { font-size: 16px; color: var(--c-title); margin: 0 0 10px; }
.adm-modal-box p { font-size: 13.5px; color: var(--c-text-muted); margin: 0 0 22px; line-height: 1.8; }
.adm-modal-box .adm-modal-ops { display: flex; justify-content: flex-end; gap: 10px; }

/* 响应式 */
@media (max-width: 1080px) {
  .adm-grid { grid-template-columns: 1fr; }
  .adm-table .t-hide-md { display: none; }
}
@media (max-width: 720px) {
  .adm-header { padding: 0 16px; }
  .adm-header .adm-brand span, .adm-header .adm-user .adm-email { display: none; }
  .adm-main { padding: 16px 14px 50px; }
  .adm-editor { padding: 16px; }
  .adm-toolbar { padding: 14px 16px; }
  .adm-table th, .adm-table td { padding: 12px; }
  .adm-table .t-hide-sm { display: none; }
  .adm-search input { width: 140px; }
  .adm-actions { padding: 12px 16px; }
  .adm-login { padding: 32px 24px 26px; }
}

/* ---------- 4. 首页：最新动态（3 条横向卡片） ---------- */
.section--home-news { background: var(--c-bg); }
.hn-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

.hn-list .hn-item {
  display: block; background: #fff; border: 1px solid var(--c-border); border-radius: 10px;
  padding: 26px 26px 22px; transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative; overflow: hidden;
}
.hn-list .hn-item::before {
  content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 0;
  background: var(--c-primary); transition: height .28s;
}
.hn-list .hn-item:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(17,43,74,.10); border-color: #D5E2F0; }
.hn-list .hn-item:hover::before { height: 100%; }

.hn-list .hn-date {
  display: inline-flex; align-items: baseline; gap: 10px; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid #EEF2F7; width: 100%;
}
.hn-list .hn-date strong { font-size: 30px; line-height: 1; font-weight: 700; color: var(--c-primary); font-family: Arial, sans-serif; }
.hn-list .hn-date span { font-size: 12.5px; color: var(--c-text-light); letter-spacing: .6px; }
.hn-list .hn-body h3 {
  font-size: 17px; line-height: 1.55; color: var(--c-title); font-weight: 600; margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hn-list .hn-body p {
  font-size: 13.5px; line-height: 1.85; color: var(--c-text-muted); margin: 0 0 16px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hn-list .hn-more { font-size: 13px; color: var(--c-primary); font-weight: 600; }
.hn-list .hn-item:hover .hn-more { color: var(--c-primary-2); }
.hn-skel {
  height: 236px; border-radius: 10px; border: 1px solid var(--c-border);
  background: linear-gradient(90deg, #FFFFFF 25%, #F0F4FA 37%, #FFFFFF 63%);
  background-size: 400% 100%; animation: nlSkel 1.4s ease infinite;
}
.hn-empty {
  grid-column: 1 / -1; background: #fff; border: 1px dashed var(--c-border); border-radius: 10px;
  padding: 46px 24px; text-align: center; color: var(--c-text-light); font-size: 14px;
}
@media (max-width: 980px) {
  .hn-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .hn-skel:last-child { display: none; }
}
@media (max-width: 640px) {
  .hn-list { grid-template-columns: 1fr; }
  .hn-skel:last-child { display: block; }
  .hn-list .hn-item { padding: 20px 20px 18px; }
  .hn-list .hn-body h3 { font-size: 16px; }
}

/* ---------- 后台：高级选项（默认折叠） ---------- */
.adm-adv { margin-top: 18px; background: #fff; border: 1px solid #E6EBF2; border-radius: 10px; }
.adm-adv > summary {
  cursor: pointer; padding: 14px 20px; font-size: 14px; font-weight: 600;
  color: var(--c-text-muted); list-style: none; user-select: none;
}
.adm-adv > summary::-webkit-details-marker { display: none; }
.adm-adv > summary::before { content: "▸"; display: inline-block; margin-right: 8px; color: var(--c-primary); }
.adm-adv[open] > summary::before { content: "▾"; }
.adm-adv > summary:hover { color: var(--c-primary); }
.adm-adv-body { padding: 0 20px 18px; }
.adm-adv-body .adm-card { margin-bottom: 14px; box-shadow: none; border: 1px solid #EEF2F7; }
