/* ============================================================
   商协会日常管理软件 · 前台公共样式（响应式）
   ============================================================ */
:root {
  --primary: #2f5597;
  --primary-dark: #1e3a6e;
  --primary-light: #eaf0fa;
  --accent: #c9a25a;
  --text: #2c3345;
  --text-light: #6b7486;
  --bg: #f5f7fa;
  --card: #ffffff;
  --border: #e3e8f0;
  --danger: #d9534f;
  --ok: #3fa96f;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 40, 80, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶栏 ---------- */
.site-header {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 18px; white-space: nowrap; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 9px;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.nav { display: flex; gap: 2px; flex-wrap: nowrap; white-space: nowrap; min-width: 0; }
.nav a {
  color: rgba(255,255,255,.86); padding: 8px 6px; border-radius: 8px; font-size: 13px;
}
.nav a:hover, .nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.btn-admin {
  color: #fff; border: 1px solid rgba(255,255,255,.45);
  padding: 6px 12px; border-radius: 8px; font-size: 13px; white-space: nowrap;
}
.btn-admin:hover { background: rgba(255,255,255,.12); }

/* ---------- 横幅 ---------- */
.hero {
  background:
    linear-gradient(rgba(24, 44, 86, .78), rgba(24, 44, 86, .82)),
    repeating-linear-gradient(45deg, #233d75 0 22px, #24407c 22px 44px);
  color: #fff; text-align: center; padding: 88px 16px 92px;
}
.hero h1 { font-size: 40px; letter-spacing: 4px; margin-bottom: 14px; }
.hero p { font-size: 17px; color: rgba(255,255,255,.85); max-width: 640px; margin: 0 auto 30px; }
.hero .btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 11px 30px; border-radius: 9px; font-size: 16px;
  transition: .18s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border: 1px solid rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* ---------- 区块 ---------- */
.section { padding: 52px 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { font-size: 27px; color: var(--primary-dark); }
.section-head .sub { color: var(--text-light); margin-top: 6px; font-size: 15px; }
.section-head .bar {
  width: 46px; height: 4px; border-radius: 2px;
  background: var(--accent); margin: 12px auto 0;
}

/* ---------- 卡片 ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
  border: 1px solid var(--border);
  transition: .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(20,40,80,.12); }
.card h3 { font-size: 17px; margin-bottom: 8px; color: var(--primary-dark); }
.card .meta { color: var(--text-light); font-size: 13px; }
.card p { font-size: 14px; color: var(--text-light); margin-top: 6px; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary);
  font-size: 12px; margin-right: 6px;
}

/* ---------- 会员卡 ---------- */
.member-card { text-align: left; }
.member-card .m-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.member-card .avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #5b7fbe);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 600; flex-shrink: 0;
}
.member-card .info b { font-size: 15.5px; }
.member-card .info .pos { color: var(--text-light); font-size: 12.5px; }
.member-card .rows { font-size: 13.5px; color: var(--text-light); display: grid; gap: 4px; }
.member-card .rows b { color: var(--text); font-weight: 600; }

/* ---------- 列表条目 ---------- */
.news-item {
  display: flex; gap: 16px; padding: 18px 4px;
  border-bottom: 1px solid var(--border); align-items: flex-start;
}
.news-item:last-child { border-bottom: none; }
.news-item .date {
  flex-shrink: 0; width: 62px; text-align: center;
  background: var(--primary-light); border-radius: 8px; padding: 8px 4px;
}
.news-item .date b { display: block; font-size: 20px; color: var(--primary); }
.news-item .date span { font-size: 12px; color: var(--text-light); }
.news-item .body h4 { font-size: 16px; margin-bottom: 4px; }
.news-item .body p { font-size: 13.5px; color: var(--text-light); line-height: 1.75; }
.news-item .read { color: var(--text-light); font-size: 12.5px; margin-left: 10px; }

/* ---------- 表单 ---------- */
.input, .select, .textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14.5px; background: #fff; color: var(--text);
  outline: none; transition: .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,85,151,.12); }
.search-bar { display: flex; gap: 10px; max-width: 520px; margin: 0 auto 28px; }
.search-bar .btn { white-space: nowrap; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #22304a; color: rgba(255,255,255,.72);
  padding: 38px 0 26px; margin-top: 40px; font-size: 14px;
}
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px; margin-bottom: 22px; }
.site-footer h4 { color: #fff; margin-bottom: 12px; font-size: 15.5px; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
.site-footer .copyright { border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; text-align: center; font-size: 13px; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 26px; }
.pager button {
  padding: 7px 14px; border: 1px solid var(--border); background: #fff;
  border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--text);
}
.pager button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

.empty { text-align: center; color: var(--text-light); padding: 44px 0; font-size: 14.5px; }
.loading { text-align: center; color: var(--text-light); padding: 34px 0; }

/* ---------- 详情弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,25,45,.5);
  display: none; align-items: center; justify-content: center; z-index: 300; padding: 18px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 12px; max-width: 640px; width: 100%;
  max-height: 84vh; overflow: auto; padding: 26px;
}
.modal h3 { color: var(--primary-dark); margin-bottom: 14px; font-size: 19px; }
.modal .close { float: right; cursor: pointer; color: var(--text-light); font-size: 20px; line-height: 1; }
.modal .kv { display: grid; grid-template-columns: 92px 1fr; gap: 7px 10px; font-size: 14px; }
.modal .kv b { color: var(--text-light); font-weight: 500; }

/* ---------- 响应式 ---------- */
@media (min-width: 621px) and (max-width: 1320px) {
  .site-header .inner { flex-wrap: wrap; height: auto; padding: 9px 0; }
  .brand { order: 1; }
  .header-actions { order: 2; margin-left: auto; }
  .nav { order: 3; width: 100%; overflow-x: auto; padding-top: 4px; }
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .site-header .inner { height: auto; padding: 9px 0; flex-wrap: wrap; }
  .nav { width: 100%; justify-content: flex-start; overflow-x: auto; }
  .hero h1 { font-size: 29px; }
  .hero { padding: 60px 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 36px 0; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .modal .kv { grid-template-columns: 76px 1fr; }
}
