/* ============================================================
   api-pages.css — AIPPMCM 官网「接口驱动」页面共用样式
   2026-09-16  （會員名片 / 活動列表 / 活動詳情）
   风格对齐设计规范：红金墨 · 小圆角 · 轻投影 · 无渐变
   ============================================================ */

/* ---------- 通用：加载/空/错误 ---------- */
.api-empty {
  padding: 40px 16px; text-align: center;
  color: var(--ink-soft); font-size: 14px;
  border: 1px dashed var(--line); border-radius: 2px; background: #fff;
}
.api-fail { color: var(--red); border-color: rgba(166, 43, 31, .3); }

/* ---------- 人物头像占位 ---------- */
.avatar-ph {
  width: 76px; height: 76px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  background: #f1e8d2; color: #b3a06a;
  border-radius: 2px; overflow: hidden;
}
.avatar-ph svg { width: 42px; height: 42px; }
.mcard-photo { width: 92px; height: 92px; flex: none; border-radius: 2px; object-fit: cover; display: block; background: #f1e8d2; }
.mcard .avatar-ph { width: 92px; height: 92px; flex: none; margin: 0; }

/* ---------- 名片墙（一人一行：左照片 + 右姓名/职务，详情默认折叠） ---------- */
/* 展开：宽屏 hover 该卡、或手机 JS 给中间卡加 .active —— .mcard-detail 由 0 高展开 */
.mcard-grid { display: flex; flex-direction: column; gap: 10px; }
.mcard {
  display: flex; align-items: center; gap: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  padding: 14px 20px; text-align: left;
  box-shadow: 0 2px 8px rgba(46, 38, 32, .05);
  transition: box-shadow .2s ease, background .2s ease;
}
.mcard-info { flex: 1 1 auto; min-width: 0; }
.mcard-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mcard-name { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.mcard-title {
  display: inline-block; padding: 2px 9px;
  font-size: 12px; letter-spacing: .04em;
  color: #8a6d1a; background: #f7efd9; border: 1px solid rgba(185, 138, 60, .35);
  border-radius: 2px; line-height: 1.6;
}
.mcard-detail {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .35s ease, opacity .3s ease, margin-top .3s ease;
  margin-top: 0;
}
.mcard-meta { margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }
.mcard-bio { margin-top: 8px; font-size: 14px; color: var(--ink); line-height: 1.85; }
.mcard-interests { margin-top: 8px; font-size: 13px; color: var(--ink-soft); line-height: 1.7; }
.mcard:hover, .mcard.active { box-shadow: 0 8px 20px rgba(46, 38, 32, .12); }
.mcard:hover .mcard-detail, .mcard.active .mcard-detail { max-height: 500px; opacity: 1; }
@media (max-width: 640px) {
  .mcard-grid { gap: 8px; }
  .mcard { align-items: flex-start; padding: 14px 14px; }
  .mcard-photo, .mcard .avatar-ph { width: 84px; height: 84px; }
  .mcard-name { font-size: 17px; }
  .mcard:hover .mcard-detail { max-height: 0; opacity: 0; } /* 触屏不吃 hover，只认 .active */
  .mcard.active .mcard-detail { max-height: 560px; opacity: 1; }
}

/* ---------- 活动列表 ---------- */
.act-list { display: flex; flex-direction: column; gap: 18px; }
.act-item {
  display: grid; grid-template-columns: 240px 1fr; gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  overflow: hidden; box-shadow: 0 4px 12px rgba(46, 38, 32, .06);
  transition: box-shadow .2s ease;
}
.act-item:hover { box-shadow: 0 8px 20px rgba(46, 38, 32, .12); }
.act-cover { position: relative; min-height: 170px; background: #f1e8d2; }
.act-cover img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.act-cover-ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #c9b98d; font-size: 12px; letter-spacing: .2em;
}
.act-body { padding: 20px 22px; display: flex; flex-direction: column; }
.act-title { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.act-title a { color: inherit; text-decoration: none; }
.act-title a:hover { color: var(--red); }
.act-sub { margin-top: 6px; font-size: 13px; color: var(--ink-soft); }
.act-meta { margin-top: 12px; font-size: 12.5px; color: var(--ink-soft); line-height: 2; }
.act-meta b { color: var(--ink); font-weight: 600; }
.act-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.act-badge {
  display: inline-block; padding: 3px 10px; font-size: 11.5px; border-radius: 2px;
  background: #f7eaea; color: var(--red); border: 1px solid rgba(166, 43, 31, .25);
}
.act-badge.open { background: #eef7ee; color: #3d7a3d; border-color: rgba(61, 122, 61, .25); }
.act-badge.closed { background: #f2f0ec; color: var(--ink-soft); border-color: var(--line); }
.act-badge.aud { background: #f7efd9; color: #8a6d1a; border-color: rgba(185, 138, 60, .35); }
.act-btn {
  display: inline-block; padding: 8px 20px; font-size: 13px; border-radius: 2px;
  background: var(--red); color: #fff; text-decoration: none; border: 1px solid var(--red);
}
.act-btn:hover { background: var(--red-dark); }
.act-btn.ghost { background: transparent; color: var(--red); }
.act-btn.ghost:hover { background: rgba(166, 43, 31, .06); }

@media (max-width: 640px) {
  .act-item { grid-template-columns: 1fr; }
  .act-cover { min-height: 150px; position: relative; }
}

/* ---------- 活动详情 ---------- */
.act-hero-cover { width: 100%; max-height: 380px; object-fit: cover; border-radius: 2px; margin-bottom: 24px; display: block; }
.act-detail-title { font-size: 27px; font-weight: 700; color: var(--red); line-height: 1.4; margin: 0 0 8px; }
.act-detail-sub { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 20px; }
.act-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: 2px; overflow: hidden; margin-bottom: 26px;
}
.act-facts .f { background: #fff; padding: 14px 16px; }
.act-facts .k { font-size: 11.5px; color: var(--ink-soft); letter-spacing: .08em; }
.act-facts .v { font-size: 14.5px; color: var(--ink); font-weight: 600; margin-top: 4px; line-height: 1.6; }
.act-desc { font-size: 15px; line-height: 1.95; color: var(--ink); white-space: pre-wrap; }

/* 报名表单 */
.reg-box { margin-top: 34px; border: 1px solid var(--line); background: #fff; border-radius: 2px; padding: 26px 24px; }
.reg-box h3 { margin: 0 0 6px; font-size: 18px; color: var(--red); font-weight: 700; }
.reg-note { font-size: 13px; color: var(--ink-soft); margin: 0 0 18px; line-height: 1.8; }
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.reg-grid .full { grid-column: 1 / -1; }
.reg-field label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 6px; }
.reg-field .req { color: var(--red); }
.reg-field input, .reg-field select, .reg-field textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 14px;
  font-family: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 2px; outline: none;
}
.reg-field input:focus, .reg-field select:focus, .reg-field textarea:focus {
  border-color: var(--red); box-shadow: 0 0 0 2px rgba(166, 43, 31, .12);
}
.reg-actions { margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.reg-msg { font-size: 13.5px; }
.reg-msg.ok { color: #3d7a3d; }
.reg-msg.err { color: var(--red); }
.reg-lock {
  margin-top: 34px; padding: 22px 24px; border-radius: 2px;
  border: 1px solid rgba(185, 138, 60, .4); background: #fdf8ec;
  font-size: 14px; color: #8a6d1a; line-height: 1.9;
}
@media (max-width: 640px) {
  .reg-grid { grid-template-columns: 1fr; }
  .act-detail-title { font-size: 22px; }
}

/* ---------- 公告列表 ---------- */
.ann-list { display: flex; flex-direction: column; gap: 14px; }
.ann-item {
  display: grid; grid-template-columns: 220px 1fr; gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  overflow: hidden; box-shadow: 0 4px 12px rgba(46,38,32,.06);
}
.ann-cover { position: relative; min-height: 150px; background: #f1e8d2; }
.ann-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ann-cover-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #c9b98d; font-size: 12px; letter-spacing: .2em; }
.ann-body { padding: 18px 22px; }
.ann-date { font-size: 12px; color: var(--ink-soft); letter-spacing: .06em; }
.ann-title { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.5; margin-top: 6px; }
.ann-title a { color: inherit; text-decoration: none; }
.ann-title a:hover { color: var(--red); }
.ann-sum { margin-top: 8px; font-size: 13px; color: var(--ink-soft); line-height: 1.8; }
.ann-more { margin-top: 10px; font-size: 12.5px; color: var(--red); }

/* ---------- 资料下载 ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.dl-card { background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 20px; box-shadow: 0 4px 12px rgba(46,38,32,.06); display: flex; flex-direction: column; }
.dl-tag { display: inline-block; align-self: flex-start; padding: 2px 10px; font-size: 11.5px; border-radius: 2px; background: #f7eaea; color: var(--red); border: 1px solid rgba(166,43,31,.25); }
.dl-title { margin-top: 10px; font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.dl-desc { margin-top: 8px; font-size: 13px; color: var(--ink-soft); line-height: 1.8; flex: 1; }
.dl-meta { margin-top: 12px; font-size: 12px; color: var(--ink-soft); display: flex; gap: 14px; flex-wrap: wrap; }
.dl-btn { margin-top: 14px; display: inline-block; align-self: flex-start; padding: 8px 18px; font-size: 13px; border-radius: 2px; background: var(--red); color: #fff; text-decoration: none; border: 1px solid var(--red); }
.dl-btn:hover { background: var(--red-dark); }
.dl-btn.disabled { background: #cfc7b8; border-color: #cfc7b8; pointer-events: none; }

/* ---------- 学术动态 ---------- */
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ac-card { background: #fff; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; box-shadow: 0 4px 12px rgba(46,38,32,.06); display: flex; flex-direction: column; }
.ac-cover { position: relative; height: 170px; background: #f1e8d2; }
.ac-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ac-cover-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #c9b98d; font-size: 12px; letter-spacing: .2em; }
.ac-body { padding: 18px 20px; display: flex; flex-direction: column; flex: 1; }
.ac-cat { display: inline-block; align-self: flex-start; padding: 2px 10px; font-size: 11.5px; border-radius: 2px; background: #f7efd9; color: #8a6d1a; border: 1px solid rgba(185,138,60,.35); }
.ac-title { margin-top: 10px; font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.55; }
.ac-sum { margin-top: 8px; font-size: 13px; color: var(--ink-soft); line-height: 1.8; flex: 1; }
.ac-author { margin-top: 12px; font-size: 12.5px; color: var(--ink); }
.ac-meta { margin-top: 6px; font-size: 12px; color: var(--ink-soft); }

/* ---------- 期刊列表 ---------- */
.jr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.jr-card { background: #fff; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; box-shadow: 0 4px 12px rgba(46,38,32,.06); display: flex; flex-direction: column; }
.jr-cover { position: relative; height: 200px; background: #f1e8d2; }
.jr-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jr-cover-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #c9b98d; font-size: 12px; letter-spacing: .2em; }
.jr-body { padding: 16px 18px; display: flex; flex-direction: column; flex: 1; }
.jr-vol { font-size: 11.5px; color: var(--red); letter-spacing: .08em; }
.jr-title { margin-top: 6px; font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.55; }
.jr-desc { margin-top: 8px; font-size: 12.8px; color: var(--ink-soft); line-height: 1.8; flex: 1; }
.jr-meta { margin-top: 12px; font-size: 12px; color: var(--ink-soft); }

@media (max-width: 640px) {
  .ann-item { grid-template-columns: 1fr; }
  .ann-cover { min-height: 140px; }
  .dl-grid, .ac-grid, .jr-grid { grid-template-columns: 1fr; }
}

/* ---------- 入會申請 ---------- */
.join-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.join-step { background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 20px; }
.join-step .n { font-size: 12px; letter-spacing: .16em; color: var(--red); }
.join-step .t { margin-top: 8px; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.join-step .d { margin-top: 6px; font-size: 13px; color: var(--ink-soft); line-height: 1.8; }
.join-tip { margin-top: 18px; padding: 14px 18px; border-left: 3px solid var(--red); background: #fbf6ee; font-size: 13px; color: var(--ink-soft); line-height: 1.9; border-radius: 2px; }

.join-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
.join-f { display: flex; flex-direction: column; }
.join-f.full { grid-column: 1 / -1; }
.join-f label { font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.join-f label .req { color: var(--red); margin-left: 2px; }
.join-f input, .join-f select, .join-f textarea {
  border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px;
  font-size: 14px; color: var(--ink); background: #fff; font-family: inherit;
}
.join-f input:focus, .join-f select:focus, .join-f textarea:focus { outline: none; border-color: var(--red); }
.join-f textarea { min-height: 96px; resize: vertical; }
.join-f .hint { margin-top: 5px; font-size: 12px; color: var(--ink-soft); }
.join-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.join-msg { font-size: 13px; }
.join-msg.err { color: var(--red); }
.join-msg.ok { color: #2f7d4f; }

.join-result { background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 28px; }
.join-result .ok-line { font-size: 18px; font-weight: 700; color: var(--ink); }
.join-result .ok-sub { margin-top: 8px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.9; }
.join-no { margin-top: 16px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; background: #fbf6ee; border: 1px dashed var(--line); border-radius: 2px; }
.join-no .k { font-size: 12px; color: var(--ink-soft); letter-spacing: .08em; }
.join-no .v { font-size: 18px; font-weight: 700; color: var(--red); font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }

.status-box { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.status-box .join-f { margin: 0; }
.status-res { margin-top: 18px; }
.status-res .row { display: flex; gap: 12px; font-size: 13.5px; color: var(--ink); line-height: 2; }
.status-res .row .k { width: 96px; color: var(--ink-soft); flex: none; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 2px; font-size: 12px; }
.badge.pending { background: #fdf3e0; color: #8a6d1a; border: 1px solid rgba(185,138,60,.35); }
.badge.approved { background: #e9f5ee; color: #2f7d4f; border: 1px solid rgba(47,125,79,.3); }
.badge.rejected { background: #fbeaea; color: var(--red); border: 1px solid rgba(166,43,31,.3); }

@media (max-width: 640px) {
  .join-steps { grid-template-columns: 1fr; }
  .join-form { grid-template-columns: 1fr; }
  .status-box { grid-template-columns: 1fr; }
}

/* ---------- 邀请制准入闸门 ---------- */
.join-gate { background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 34px 30px; text-align: center; box-shadow: 0 4px 12px rgba(46,38,32,.06); }
.join-gate .gate-title { font-size: 20px; font-weight: 700; color: var(--ink); }
.join-gate .gate-text { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); line-height: 2; }
.join-f input[readonly] { background: #f7f4ee; color: var(--ink); letter-spacing: .04em; font-family: ui-monospace, Menlo, Consolas, monospace; }
