/* ==========================================================
   薛庙村综合门户网站 - 主样式表
   配色：中国红 + 政务蓝 沉稳基调
   ========================================================== */

:root {
  --primary:      #b81c22;
  --primary-dark: #96151a;
  --primary-light:#e8545a;
  --accent:       #1e5799;
  --accent-light: #e8f0fa;
  --text:         #1f2329;
  --text-sub:     #5c6570;
  --text-mute:    #8b939e;
  --border:       #e3e6eb;
  --bg:           #f4f5f7;
  --bg-card:      #ffffff;
  --gold:         #c8961e;
  --radius:       6px;
  --shadow:       0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --shadow-lg:    0 4px 12px rgba(0,0,0,.08), 0 12px 32px rgba(0,0,0,.06);
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============ 顶部信息条 ============ */
.topbar {
  background: #2b3038;
  color: #b9c0ca;
  font-size: 13px;
  line-height: 34px;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.topbar-slogan { letter-spacing: .5px; }
.topbar-user a { color: #d8dee6; margin-left: 14px; }
.topbar-user a:hover { color: #fff; }
.topbar-user strong { color: #fff; font-weight: 600; }

/* ============ 报头 ============ */
/* 背景：A3 黄昏暖调（2400×300，8:1 成品图）
   三层叠加：顶部接 #2B3038 衔接带 / 底部接 #B81C22 衔接带 / 白纱 .48 保村名对比度 */
.masthead {
  background-color: #fdf6f6;
  background-image:
    linear-gradient(to bottom, rgba(43, 48, 56, .58), rgba(43, 48, 56, 0) 16%),
    linear-gradient(to top,    rgba(184, 28, 34, .58), rgba(184, 28, 34, 0) 16%),
    linear-gradient(rgba(255, 255, 255, .48), rgba(255, 255, 255, .48)),
    url("/assets/img/header-bg-a3.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  border-bottom: 3px solid var(--primary);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  min-height: 150px;
}
/* 移动端：窄屏背景易糊，白纱加重淡出成近白底 */
@media (max-width: 768px) {
  .masthead {
    background-image:
      linear-gradient(rgba(255, 255, 255, .92), rgba(255, 255, 255, .92)),
      url("/assets/img/header-bg-a3.jpg");
    background-position: center 40%;
  }
  .masthead-inner { min-height: 84px; }
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(184,28,34,.25);
}
.brand-text strong { display: block; font-size: 26px; letter-spacing: 3px; color: var(--primary-dark); line-height: 1.2; }
.brand-text em { font-style: normal; font-size: 13px; color: var(--text-mute); letter-spacing: 2px; }
.masthead-slogan { font-size: 15px; color: var(--text-sub); letter-spacing: 1px; }
/* 报头带背景图后，图上文字需加深保证对比度（仅作用于报头内） */
.masthead .brand-text em { color: #4a3f33; text-shadow: 0 1px 1px rgba(255,255,255,.55); }
.masthead .masthead-slogan { color: #3d3833; font-weight: 500; text-shadow: 0 1px 1px rgba(255,255,255,.55); }

/* ============ 主导航 ============ */
.main-nav { background: var(--primary); box-shadow: 0 2px 8px rgba(184,28,34,.2); position: sticky; top: 0; z-index: 100; }
.main-nav ul { display: flex; flex-wrap: wrap; }
.main-nav a {
  display: block;
  padding: 0 26px;
  line-height: 48px;
  color: #fff;
  font-size: 16px;
  letter-spacing: 1px;
  position: relative;
}
.main-nav a:hover { background: rgba(255,255,255,.12); }
.main-nav a.active { background: var(--primary-dark); font-weight: 600; }
.main-nav a.active::after {
  content: ''; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 60%; height: 3px; background: var(--gold);
}

/* ============ 公告条 ============ */
.notice-bar { background: #fff9e6; border-bottom: 1px solid #f5e6b8; }
.notice-bar .container { display: flex; align-items: center; gap: 12px; line-height: 40px; overflow: hidden; }
.notice-label {
  flex: none; background: var(--gold); color: #fff;
  font-size: 12px; padding: 2px 10px; border-radius: 3px; letter-spacing: 1px;
}
.notice-scroll { flex: 1; overflow: hidden; white-space: nowrap; }
.notice-scroll span { color: #7a5c10; font-size: 14px; animation: marquee 26s linear infinite; display: inline-block; padding-left: 100%; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ============ Hero ============ */
.hero {
  position: relative;
  background:
    linear-gradient(120deg, rgba(143,21,25,.80) 0%, rgba(184,28,34,.72) 45%, rgba(163,64,63,.76) 100%),
    url('/assets/uploads/hero-bg.jpg') center/cover no-repeat;
  color: #fff;
  padding: 56px 0 48px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.09) 0, transparent 42%),
    radial-gradient(circle at 15% 80%, rgba(255,255,255,.06) 0, transparent 38%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero h1 { font-size: 38px; letter-spacing: 5px; font-weight: 700; margin-bottom: 12px; text-shadow: 0 2px 12px rgba(0,0,0,.2); }
.hero p { font-size: 17px; letter-spacing: 3px; opacity: .92; margin-bottom: 30px; }
.hero-stats { display: inline-flex; gap: 0; background: rgba(0,0,0,.16); border-radius: 8px; overflow: hidden; backdrop-filter: blur(4px); }
.hero-stats .stat { padding: 14px 34px; border-right: 1px solid rgba(255,255,255,.14); }
.hero-stats .stat:last-child { border-right: none; }
.hero-stats strong { display: block; font-size: 26px; font-weight: 700; letter-spacing: 1px; }
.hero-stats span { font-size: 13px; opacity: .82; letter-spacing: 1px; }

/* ============ 主体网格 ============ */
.main-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; padding: 24px 20px 40px; }
.page-grid { display: grid; grid-template-columns: 1fr 300px; gap: 22px; }
.page-wrap { padding: 20px 20px 44px; }

/* ============ 面板 ============ */
.panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.panel-head::before {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 56px; height: 2px; background: var(--primary);
}
.panel-head h2 { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: 1px; }
.panel-head h2::before { content: ''; display: inline-block; width: 4px; height: 16px; background: var(--primary); margin-right: 9px; vertical-align: -2px; border-radius: 2px; }
.panel-head .more { font-size: 13px; color: var(--text-mute); }
.panel-head .more:hover { color: var(--primary); }
.panel-sub { font-size: 13px; color: var(--text-mute); }

/* ============ 新闻列表 ============ */
.news-list li { border-bottom: 1px dashed var(--border); }
.news-list li:last-child { border-bottom: none; }
.news-list a { display: flex; align-items: center; gap: 9px; padding: 11px 0; font-size: 15px; }
.news-list a:hover .t { color: var(--primary); }
.news-list .dot { flex: none; width: 5px; height: 5px; background: var(--primary-light); border-radius: 50%; }
.news-list .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list time { flex: none; font-size: 13px; color: var(--text-mute); }

/* ============ 卡片网格 ============ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { display: block; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; transition: all .25s; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #d8dde5; }
.card-thumb {
  height: 132px; background: #eef1f5 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.thumb-ph { color: #c2cad6; font-size: 20px; letter-spacing: 4px; font-weight: 700; }
.card-body { padding: 12px 14px 14px; }
.card-body h3 { font-size: 15px; font-weight: 600; line-height: 1.5; margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 45px; }
.card:hover h3 { color: var(--primary); }
.card-body p { font-size: 13px; color: var(--text-sub); line-height: 1.65; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-mute); }

/* ============ 特色产业 ============ */
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ind-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .25s; }
.ind-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.ind-thumb { height: 150px; background: linear-gradient(135deg,#e8f0fa,#d5e3f3) center/cover no-repeat; }
.ind-card h3 { font-size: 15px; padding: 12px 14px 4px; font-weight: 600; }
.ind-card:hover h3 { color: var(--primary); }
.ind-card p { font-size: 13px; color: var(--text-sub); padding: 0 14px 14px; line-height: 1.6; }

/* ============ 通知公告（侧栏） ============ */
.panel-notice .notice-list li { border-bottom: 1px dashed var(--border); }
.panel-notice .notice-list li:last-child { border-bottom: none; }
.panel-notice a { display: block; padding: 10px 0; font-size: 14px; line-height: 1.55; }
.panel-notice a:hover { color: var(--primary); }
.panel-notice time { display: block; font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.tag { display: inline-block; background: var(--primary); color: #fff; font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 3px; margin-right: 5px; vertical-align: 1px; }

/* ============ 便民服务 ============ */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.service-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 11px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fafbfc; transition: all .2s;
}
.service-item:hover { border-color: var(--primary-light); background: #fff5f5; transform: translateX(2px); }
.service-ico {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.service-name { font-size: 13px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 按钮 ============ */
.btn {
  display: inline-block; text-align: center;
  padding: 9px 22px; border-radius: var(--radius);
  font-size: 14px; letter-spacing: 1px;
  transition: all .22s; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(184,28,34,.28); }
.btn-ghost { background: #fff; color: var(--text-sub); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #d64545; color: #fff; }
.btn-danger:hover { background: #b83333; }
.btn-sm { padding: 5px 13px; font-size: 13px; }
.btn-block { display: block; width: 100%; margin-top: 10px; }

/* ============ 面包屑 ============ */
.breadcrumb { font-size: 13px; color: var(--text-mute); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-sub); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 5px; }

/* ============ 文章列表页 ============ */
.art-list li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px dashed var(--border); }
.art-list li:last-child { border-bottom: none; }
.art-thumb { flex: none; width: 168px; height: 108px; border-radius: var(--radius); background: #eef1f5 center/cover no-repeat; }
.art-body { flex: 1; min-width: 0; }
.art-body h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; line-height: 1.5; }
.art-body h3 a:hover { color: var(--primary); }
.art-body p { font-size: 14px; color: var(--text-sub); line-height: 1.7; margin-bottom: 10px; }
.art-meta { font-size: 13px; color: var(--text-mute); display: flex; gap: 16px; flex-wrap: wrap; }

/* ============ 文章详情 ============ */
.article-detail { padding: 26px 30px 30px; }
.art-title { font-size: 26px; font-weight: 700; line-height: 1.5; text-align: center; margin-bottom: 14px; }
.art-info {
  display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-mute);
  padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--border);
}
.art-summary {
  background: #f7f9fc; border-left: 3px solid var(--accent);
  padding: 12px 16px; margin-bottom: 20px;
  font-size: 14px; color: var(--text-sub); line-height: 1.8; border-radius: 0 var(--radius) var(--radius) 0;
}
.art-cover { margin-bottom: 22px; border-radius: var(--radius); overflow: hidden; }
.art-cover img { width: 100%; }
.art-content { font-size: 16px; line-height: 2; color: #333a42; word-wrap: break-word; }
.art-content p { margin-bottom: 16px; }
.art-content h2 { font-size: 20px; margin: 26px 0 14px; padding-left: 10px; border-left: 4px solid var(--primary); }
.art-content h3 { font-size: 17px; margin: 20px 0 12px; }
.art-content img { margin: 16px auto; border-radius: var(--radius); }
.art-content ul, .art-content ol { margin: 12px 0 16px 24px; }
.art-content ul li { list-style: disc; margin-bottom: 7px; }
.art-content ol li { list-style: decimal; margin-bottom: 7px; }
.art-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.art-content th, .art-content td { border: 1px solid var(--border); padding: 9px 12px; }
.art-content th { background: #f7f8fa; }
.art-content a { color: var(--accent); text-decoration: underline; }

.art-nav { display: flex; gap: 20px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); }
.art-nav-item { flex: 1; font-size: 14px; }
.art-nav-item span { color: var(--text-mute); font-size: 13px; display: block; margin-bottom: 4px; }
.art-nav-item a { color: var(--text-sub); }
.art-nav-item a:hover { color: var(--primary); }
.art-nav-item em { color: var(--text-mute); font-style: normal; }
.art-nav-item.right { text-align: right; }

/* ============ 侧栏列表 ============ */
.rank-list li { border-bottom: 1px dashed var(--border); }
.rank-list li:last-child { border-bottom: none; }
.rank-list a { display: flex; gap: 9px; align-items: baseline; padding: 9px 0; font-size: 14px; }
.rank-list a:hover .t { color: var(--primary); }
.rank { flex: none; font-style: normal; width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 12px; background: #eceff4; color: #8b939e; border-radius: 3px; }
.rank-1 { background: var(--primary); color: #fff; }
.rank-2 { background: #e07b39; color: #fff; }
.rank-3 { background: var(--gold); color: #fff; }
.rank-list .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.rel-list li:last-child { border-bottom: none; }
.rel-list a:hover { color: var(--primary); }
.side-text { font-size: 14px; color: var(--text-sub); line-height: 1.75; }

/* ============ 分页 ============ */
.pager { display: flex; gap: 7px; justify-content: center; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.pager a {
  min-width: 34px; padding: 6px 11px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; background: #fff; color: var(--text-sub);
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager a.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager .gap { color: var(--text-mute); }

/* ============ 表单 ============ */
.form { margin-top: 4px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: var(--text-sub); margin-bottom: 6px; font-weight: 500; }
.field label i { color: var(--primary); font-style: normal; }
.field input[type=text], .field input[type=password], .field input[type=email],
.field input[type=number], .field textarea, .field select {
  width: 100%; padding: 9px 13px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; transition: all .2s; color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(184,28,34,.09);
}
.field input:disabled { background: #f5f6f8; color: var(--text-mute); }
.field textarea { resize: vertical; line-height: 1.7; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 13px; color: var(--text-mute); margin-left: 12px; }
.form-user { font-size: 14px; color: var(--text-sub); margin-bottom: 14px; }
.form-user strong { color: var(--primary); }

/* ============ 提示条 ============ */
.alert { padding: 11px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fef1f1; border: 1px solid #f8d0d0; color: #a52a2a; }
.alert-ok { background: #f0f9f2; border: 1px solid #c8e6d0; color: #256b3a; }
.alert-info { background: #f0f6fc; border: 1px solid #cddff2; color: #1e5799; }

/* ============ 登录/注册 ============ */
.auth-wrap { display: flex; justify-content: center; padding: 44px 20px 60px; }
.auth-card {
  width: 100%; max-width: 420px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 34px 34px 28px;
}
.auth-card-wide { max-width: 640px; }
.auth-card h1 { font-size: 22px; text-align: center; margin-bottom: 6px; letter-spacing: 2px; }
.auth-card h1::after { content: ''; display: block; width: 42px; height: 3px; background: var(--primary); margin: 12px auto 0; border-radius: 2px; }
.auth-sub { text-align: center; font-size: 13px; color: var(--text-mute); margin: 12px 0 22px; }
.auth-foot { text-align: center; font-size: 14px; color: var(--text-sub); margin-top: 18px; }
.auth-foot a { color: var(--primary); font-weight: 600; }
.auth-tip { text-align: center; font-size: 12px; color: var(--text-mute); margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }

/* ============ 留言板 ============ */
.msg-list { margin-top: 4px; }
.msg-item { padding: 16px 0; border-bottom: 1px dashed var(--border); }
.msg-item:last-child { border-bottom: none; }
.msg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.msg-user { font-size: 15px; font-weight: 600; color: var(--accent); }
.msg-head time { font-size: 12px; color: var(--text-mute); }
.msg-content { font-size: 14px; color: var(--text); line-height: 1.8; background: #f7f8fa; padding: 11px 14px; border-radius: var(--radius); }
.msg-reply {
  margin-top: 10px; margin-left: 22px; padding: 11px 14px;
  background: #fff8f8; border-left: 3px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0;
  position: relative;
}
.reply-label { display: inline-block; font-size: 12px; color: var(--primary); font-weight: 700; margin-bottom: 5px; }
.reply-body { font-size: 14px; color: var(--text-sub); line-height: 1.75; }
.reply-time { display: block; font-size: 12px; color: var(--text-mute); margin-top: 5px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 10px; }
.badge-pending { background: #fff4e0; color: #a9681a; }
.badge-approved { background: #e9f6ec; color: #256b3a; }
.badge-rejected { background: #f5f6f8; color: #8b939e; }

.tips-list { counter-reset: t; }
.tips-list li { font-size: 14px; color: var(--text-sub); line-height: 1.8; padding-left: 24px; position: relative; margin-bottom: 8px; counter-increment: t; }
.tips-list li::before {
  content: counter(t); position: absolute; left: 0; top: 3px;
  width: 17px; height: 17px; line-height: 17px; text-align: center;
  background: var(--accent-light); color: var(--accent); font-size: 11px; border-radius: 50%;
}

.info-table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; }
.info-table th, .info-table td { border: 1px solid var(--border); padding: 11px 15px; font-size: 14px; text-align: left; }
.info-table th { background: #f7f8fa; width: 130px; color: var(--text-sub); font-weight: 600; }
.muted { color: var(--text-mute); font-size: 14px; }

.empty { color: var(--text-mute); font-size: 14px; padding: 22px 0; text-align: center; }
.empty-page { text-align: center; padding: 80px 20px; }
.empty-page h1 { font-size: 24px; margin-bottom: 12px; }
.empty-page p { color: var(--text-mute); margin-bottom: 22px; }

/* ============ 页脚 ============ */
.site-footer { background: #2b3038; color: #9aa3ae; margin-top: 20px; font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 30px; padding: 38px 20px 30px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: 1px; position: relative; padding-bottom: 9px; }
.footer-col h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--primary); }
.footer-col p { line-height: 1.9; font-size: 13px; }
.footer-slogan { color: #7d8794; font-size: 12px !important; margin-top: 4px; }
.footer-col ul li { margin-bottom: 8px; font-size: 13px; }
.footer-col ul a { color: #9aa3ae; }
.footer-col ul a:hover { color: #fff; }
.footer-contact li { line-height: 1.8; }
.footer-bottom { border-top: 1px solid #3a4048; padding: 16px 20px; text-align: center; font-size: 13px; color: #7d8794; }
.footer-bottom a { color: #9aa3ae; }
.footer-bottom .sep { margin: 0 8px; color: #4a515a; }

/* ============ 返回顶部 ============ */
.back-top {
  position: fixed; right: 26px; bottom: 34px; z-index: 200;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 19px;
  box-shadow: 0 4px 14px rgba(184,28,34,.35);
  display: none; align-items: center; justify-content: center;
  transition: all .25s;
}
.back-top.show { display: flex; }
.back-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ============ 后台 ============ */
.admin-body { background: #eef0f3; }
.admin-layout { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.admin-side { background: #23282f; color: #b8c0ca; }
.admin-side .logo { padding: 20px 22px; border-bottom: 1px solid #313841; display: flex; align-items: center; gap: 10px; }
.admin-side .logo b { color: #fff; font-size: 17px; letter-spacing: 1px; }
.admin-side .logo span { display: block; font-size: 11px; color: #6c7681; letter-spacing: 1px; }
.admin-menu { padding: 12px 0; }
.admin-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 22px; font-size: 14px; color: #b8c0ca;
  border-left: 3px solid transparent; transition: all .2s;
}
.admin-menu a:hover { background: #2b3138; color: #fff; }
.admin-menu a.active { background: #2b3138; color: #fff; border-left-color: var(--primary); font-weight: 600; }
.admin-menu .ico { width: 16px; text-align: center; opacity: .8; }
.admin-menu .grp { padding: 14px 22px 6px; font-size: 11px; color: #626b76; letter-spacing: 1px; }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 0 26px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.admin-topbar h1 { font-size: 17px; font-weight: 600; }
.admin-user { font-size: 14px; color: var(--text-sub); display: flex; align-items: center; gap: 14px; }
.admin-user a { color: var(--primary); }
.admin-content { padding: 22px 26px 40px; flex: 1; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.stat-card .num { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-card .lbl { font-size: 13px; color: var(--text-mute); margin-top: 4px; }

.card-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.card-box-head {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; background: #fafbfc;
}
.card-box-head h2 { font-size: 15px; font-weight: 600; }
.card-box-body { padding: 20px; }
.card-box-body.nopad { padding: 0; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { background: #fafbfc; font-weight: 600; color: var(--text-sub); font-size: 13px; white-space: nowrap; }
.table tbody tr:hover { background: #fafbfc; }
.table td.actions { white-space: nowrap; }
.table td.actions a, .table td.actions button { font-size: 13px; color: var(--accent); margin-right: 10px; }
.table td.actions a:hover { text-decoration: underline; }
.table td.actions .del { color: #d64545; }
.table .t-title { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 10px; background: #eef1f5; color: var(--text-sub); }
.pill-published { background: #e9f6ec; color: #256b3a; }
.pill-draft { background: #f0f1f4; color: #6c7681; }
.pill-pending { background: #fff4e0; color: #a9681a; }
.pill-rejected { background: #fbeaea; color: #a52a2a; }
.pill-admin { background: #fbeaea; color: #b81c22; }
.pill-editor { background: #e8f0fa; color: #1e5799; }
.pill-member { background: #f0f1f4; color: #6c7681; }
.pill-top { background: var(--primary); color: #fff; }

.admin-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.admin-toolbar .field { margin-bottom: 0; }
.admin-toolbar input, .admin-toolbar select { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius); }

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2b3038 0%, #3d1f22 100%); }
.login-box { width: 100%; max-width: 380px; background: #fff; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.3); padding: 36px 34px 30px; }
.login-box h1 { text-align: center; font-size: 21px; letter-spacing: 2px; margin-bottom: 6px; }
.login-box .sub { text-align: center; font-size: 13px; color: var(--text-mute); margin-bottom: 24px; }
.login-box .logo { text-align: center; margin-bottom: 18px; }
.login-box .logo span {
  display: inline-flex; width: 54px; height: 54px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 26px; font-weight: 700; border-radius: 12px;
  align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(184,28,34,.3);
}

.editor-toolbar {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 9px 11px;
  border: 1px solid var(--border); border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0; background: #fafbfc;
}
.editor-toolbar button {
  padding: 4px 11px; font-size: 13px; border: 1px solid var(--border);
  border-radius: 4px; background: #fff; color: var(--text-sub);
}
.editor-toolbar button:hover { border-color: var(--primary); color: var(--primary); }
.editor-area {
  width: 100%; min-height: 340px; padding: 14px;
  border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
  line-height: 1.85; font-size: 15px; background: #fff; overflow-y: auto;
}
.editor-area:focus { outline: none; border-color: var(--primary); }
.editor-area:empty::before { content: attr(data-placeholder); color: var(--text-mute); }

/* ============ 响应式 ============ */
@media (max-width: 1000px) {
  .main-grid, .page-grid { grid-template-columns: 1fr; }
  .card-grid, .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { display: none; }
}

@media (max-width: 640px) {
  .brand-text strong { font-size: 21px; }
  .masthead-slogan { display: none; }
  .hero h1 { font-size: 26px; letter-spacing: 3px; }
  .hero p { font-size: 14px; }
  .hero-stats .stat { padding: 10px 18px; }
  .hero-stats strong { font-size: 20px; }
  .main-nav a { padding: 0 14px; font-size: 15px; }
  .card-grid, .ind-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .art-list li { flex-direction: column; }
  .art-thumb { width: 100%; height: 150px; }
  .article-detail { padding: 20px 18px; }
  .art-title { font-size: 20px; }
  .art-nav { flex-direction: column; gap: 14px; }
  .art-nav-item.right { text-align: left; }
  .footer-top { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr; }
  .topbar-slogan { display: none; }
  .table { font-size: 13px; }
  .table th, .table td { padding: 8px 9px; }
  .admin-content { padding: 16px 14px 30px; }
}

/* 打印 */
@media print {
  .site-header, .site-footer, .back-top, .page-side, .breadcrumb { display: none; }
  .panel { box-shadow: none; border: none; }
}

/* ==================== 消息中心 / 留言互动（2026-09-30） ==================== */

/* 顶栏个人中心红点 */
.member-link { position: relative; }
.nav-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #e03131; margin-left: 4px; vertical-align: 2px;
  box-shadow: 0 0 0 2px rgba(224, 49, 49, .18);
}

/* 留言讨论区 */
.cmt-list { margin-top: 12px; border-top: 1px dashed #e3e6eb; padding-top: 4px; }
.cmt-item { padding: 9px 0 7px; border-bottom: 1px dashed #eef0f3; }
.cmt-item:last-child { border-bottom: none; }
.cmt-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #5c6570; flex-wrap: wrap; }
.cmt-user { font-weight: 600; color: #343a40; }
.cmt-badge { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #eef2f6; color: #5c6570; }
.cmt-badge.b-follow { background: #fdeeee; color: #b81c22; }
.cmt-badge.b-supplement { background: #eef7f0; color: #1a9e4b; }
.cmt-content { font-size: 14px; margin-top: 4px; word-break: break-word; }
.cmt-form { margin-top: 10px; }
.cmt-form textarea { width: 100%; min-height: 58px; font-size: 14px; }
.cmt-emoji-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.cmt-count { font-size: 12px; color: #9aa1a9; }

/* 表情选择面板（由 main.js 动态创建，对齐微信交互：点一个即收起） */
.emoji-pop {
  position: fixed; z-index: 999; display: none;
  background: #fff; border: 1px solid #e3e6eb; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14); padding: 8px;
  grid-template-columns: repeat(8, 32px); gap: 2px;
  max-height: 62vh; overflow-y: auto; overscroll-behavior: contain;
}
.emoji-item {
  width: 32px; height: 32px; border: none; background: none;
  font-size: 20px; line-height: 32px; cursor: pointer; border-radius: 6px; padding: 0;
}
.emoji-item:hover { background: #f1f3f5; }
.emoji-item:active { background: #e3e6eb; transform: scale(.92); }

/* 消息中心 */
.ntf-list { list-style: none; margin: 0; padding: 0; }
.ntf-item {
  display: flex; gap: 10px; padding: 11px 4px;
  border-bottom: 1px dashed #eef0f3; align-items: flex-start;
}
.ntf-item:last-child { border-bottom: none; }
.ntf-dot { width: 8px; height: 8px; border-radius: 50%; background: #e03131; margin-top: 6px; flex: none; }
.ntf-dot.read { background: #d5d9de; }
.ntf-body b { font-size: 14px; color: #343a40; }
.ntf-body a { color: #b81c22; text-decoration: none; }
.ntf-body p { margin: 3px 0 0; font-size: 13px; color: #5c6570; }
.ntf-body time { font-size: 12px; color: #9aa1a9; }

/* 后台：留言下的作者补充展示 */
.supp-block {
  margin: 6px 0; padding: 8px 12px; background: #f8faf9;
  border-left: 3px solid #1a9e4b; border-radius: 0 6px 6px 0; font-size: 14px;
}
.supp-block .supp-time { font-size: 12px; color: #9aa1a9; margin-right: 8px; }
