/* =========================================================
   中国秦文研究会 · 会员管理系统  UI v2
   参考 MemberQuery 配色：暗红 → 珊瑚 → 橙 的 135° 渐变
   #8B2323 / #A52A2A / #CD5C5C / #D2691E
   Bootstrap 5.3 主题层
   ========================================================= */

:root {
  /* 品牌红橙 */
  --r900: #6E1919;
  --r800: #8B2323;
  --r700: #A52A2A;
  --r500: #CD5C5C;
  --r300: #E3A7A3;
  --r100: #FBE9E7;
  --o600: #D2691E;

  --grad: linear-gradient(135deg, #7A1C1C 0%, #9E2A2A 34%, #C0504D 70%, #D2691E 100%);
  --grad-soft: linear-gradient(135deg, #7A1C1C 0%, #A52A2A 100%);

  /* 中性 */
  --ink: #22252A;
  --ink2: #4A4F57;
  --ink3: #8E949C;
  --ink4: #B4B9C0;
  --bg: #FFFFFF;
  --bg2: #F8F9FA;
  --bg3: #F1F2F4;
  --line: #E8EAED;
  --line2: #F0F1F3;

  /* 状态 */
  --ok: #155724;
  --okbg: #D4EDDA;
  --bad: #721C24;
  --badbg: #F8D7DA;
  --warn: #8A5A00;
  --warnbg: #FFF3CD;

  /* 圆角 */
  --rad-lg: 16px;
  --rad: 12px;
  --rad-sm: 10px;

  /* Bootstrap 重写 */
  --bs-body-bg: var(--bg2);
  --bs-body-color: var(--ink);
  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --bs-body-font-size: .9375rem;
  --bs-body-line-height: 1.7;
  --bs-primary: #8B2323;
  --bs-primary-rgb: 139, 35, 35;
  --bs-link-color: var(--r800);
  --bs-link-hover-color: var(--r900);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--rad-sm);
  --bs-border-radius-lg: var(--rad);
  --bs-secondary-color: var(--ink3);
}

* { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg2);
  color: var(--ink);
  font-family: var(--bs-body-font-family);
  font-size: .9375rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0;
}
a { text-decoration: none; color: var(--r800); }
a:hover { color: var(--r900); }

/* 工具类 */
.min-w-0 { min-width: 0; }
.text-mute { color: var(--ink3) !important; }
.text-red { color: var(--r800) !important; }
.fs-13 { font-size: .8125rem !important; }
.fs-12 { font-size: .75rem !important; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .01em; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 按钮 ---------- */
.btn {
  --bs-btn-font-size: .9375rem;
  --bs-btn-padding-x: 1.1rem;
  --bs-btn-padding-y: .58rem;
  --bs-btn-border-radius: var(--rad-sm);
  --bs-btn-font-weight: 600;
}
.btn-primary {
  --bs-btn-bg: #8B2323;
  --bs-btn-border-color: #8B2323;
  --bs-btn-hover-bg: #A52A2A;
  --bs-btn-hover-border-color: #A52A2A;
  --bs-btn-active-bg: #6E1919;
  --bs-btn-active-border-color: #6E1919;
  background-image: var(--grad-soft);
  border: 0;
  box-shadow: 0 4px 14px -6px rgba(139, 35, 35, .6);
}
.btn-primary:hover { box-shadow: 0 8px 22px -8px rgba(139, 35, 35, .7); }
.btn-outline-primary {
  --bs-btn-color: var(--r800);
  --bs-btn-border-color: var(--r300);
  --bs-btn-hover-bg: var(--r800);
  --bs-btn-hover-border-color: var(--r800);
  --bs-btn-active-bg: var(--r900);
}
.btn-soft {
  --bs-btn-bg: #fff;
  --bs-btn-border-color: var(--line);
  --bs-btn-color: var(--ink2);
  --bs-btn-hover-bg: var(--r100);
  --bs-btn-hover-border-color: var(--r300);
  --bs-btn-hover-color: var(--r800);
}
.btn-white {
  --bs-btn-bg: rgba(255, 255, 255, .18);
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255, 255, 255, .5);
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-color: var(--r800);
  --bs-btn-hover-border-color: #fff;
}
.btn-ghost {
  --bs-btn-bg: transparent;
  --bs-btn-color: var(--ink2);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: var(--bg3);
  --bs-btn-hover-color: var(--r800);
}
.btn-sm { --bs-btn-font-size: .8125rem; --bs-btn-padding-y: .38rem; --bs-btn-padding-x: .8rem; }
.btn-lg { --bs-btn-font-size: 1rem; --bs-btn-padding-y: .75rem; --bs-btn-padding-x: 1.5rem; }
.btn:focus-visible { box-shadow: 0 0 0 .22rem rgba(139, 35, 35, .18); }

/* ---------- 卡片 ---------- */
.card {
  --bs-card-bg: #fff;
  --bs-card-border-color: var(--line);
  --bs-card-border-radius: var(--rad-lg);
  --bs-card-inner-border-radius: var(--rad-lg);
  --bs-card-cap-bg: transparent;
  box-shadow: 0 2px 6px rgba(34, 37, 42, .04), 0 18px 44px -32px rgba(34, 37, 42, .5);
}
.card-header {
  border-bottom: 1px solid var(--line2);
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
}
.card-body { padding: 1.25rem; }
.card-footer { background: var(--bg2); border-top-color: var(--line2); }

.section-title {
  font-size: 1.0625rem;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--grad-soft);
}

/* ---------- 表单 ---------- */
.form-label { font-size: .8125rem; color: var(--ink2); font-weight: 500; margin-bottom: .4rem; }
.form-control, .form-select {
  border: 1.5px solid var(--line);
  border-radius: var(--rad-sm);
  padding: .58rem .85rem;
  font-size: .9375rem;
  background-color: #fff;
  color: var(--ink);
  transition: .18s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--r800);
  box-shadow: 0 0 0 3px rgba(139, 35, 35, .1);
}
.form-control::placeholder { color: var(--ink4); }
.form-text { font-size: .75rem; color: var(--ink3); }
.req { color: var(--r700); margin-left: 2px; }
.input-lg { height: 48px; font-size: 1rem; border-radius: var(--rad); }

/* 胶囊单选 */
.btn-check + .btn-chip {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink2);
  border-radius: 999px;
  padding: .45rem 1.15rem;
  font-size: .875rem;
  font-weight: 500;
  transition: .16s;
}
.btn-check:checked + .btn-chip {
  background: var(--r100);
  border-color: var(--r800);
  color: var(--r800);
  font-weight: 700;
}

/* 表单分组 */
.form-block { border: 0; padding: 1.6rem 0 0; margin: 0 0 1.6rem; }
.form-block:first-of-type { padding-top: 0; }
.form-block + .form-block { border-top: 1px solid var(--line2); }
.block-title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
}
.block-title::before {
  content: "";
  width: 4px; height: 15px;
  border-radius: 2px;
  background: var(--grad-soft);
}

/* ---------- 表格 ---------- */
.table {
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--line2);
  --bs-table-hover-bg: #FCFCFD;
  font-size: .875rem;
  margin: 0;
}
.table > thead th {
  font-size: .78rem;
  color: var(--ink3);
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  padding: .7rem .85rem;
}
.table > tbody > tr > td { padding: .8rem .85rem; vertical-align: middle; }
.table > tbody > tr:last-child > td { border-bottom: 0; }

/* 手机端：表格转卡片行 */
@media (max-width: 767.98px) {
  .table-stack thead { display: none; }
  .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: .6rem 0; border-bottom: 1px solid var(--line2); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack tr:hover { background: transparent; }
  .table-stack td {
    display: flex;
    gap: .4rem;
    align-items: baseline;
    padding: .22rem 1rem;
    border: 0;
    text-align: left;
  }
  .table-stack td::before {
    content: attr(data-label);
    flex: 0 0 5.2rem;
    color: var(--ink3);
    font-size: .75rem;
  }
  .table-stack td[data-label=""]::before { content: none; }
  .table-stack td[data-label=""] { justify-content: flex-end; }
  .table-stack td:first-child {
    display: block;
    padding-bottom: .4rem;
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 1px dashed var(--line);
    margin-bottom: .3rem;
  }
  .table-stack td:first-child::before { content: none; }
}

/* ---------- 徽章 ---------- */
.badge-soft { font-weight: 600; font-size: .72rem; padding: .32em .7em; border-radius: 999px; }
.badge-soft-ok { background: var(--okbg); color: var(--ok); }
.badge-soft-warn { background: var(--warnbg); color: var(--warn); }
.badge-soft-red { background: var(--badbg); color: var(--bad); }
.badge-soft-brand { background: var(--r100); color: var(--r800); }
.badge-soft-mute { background: var(--bg3); color: var(--ink3); }
.tag-mini {
  font-size: .68rem;
  padding: .1em .5em;
  border-radius: 6px;
  background: var(--bg3);
  color: var(--ink2);
  white-space: nowrap;
}

/* ---------- 提示条 ---------- */
.alert { font-size: .875rem; border-radius: var(--rad); padding: .8rem 1rem; border-width: 1px; }
.alert-ok { background: var(--okbg); border-color: #BFE3C9; color: var(--ok); }
.alert-bad { background: var(--badbg); border-color: #F1C3C7; color: var(--bad); }
.alert-brand { background: var(--r100); border-color: var(--r300); color: var(--r800); }
.alert-warn { background: #fff; border-color: var(--line); border-left: 4px solid var(--o600); color: var(--ink2); }
.alert-warn .fw-semibold, .alert-warn > i { color: #A85A12; }

/* =========================================================
   公开端外壳：整屏红橙渐变 + 白色大容器
   ========================================================= */
.public-shell {
  min-height: 100vh;
  background: var(--grad);
  background-attachment: fixed;
  padding: 0 0 2.5rem;
}
.public-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(760px 460px at 92% -10%, rgba(255, 255, 255, .1), transparent 68%),
    radial-gradient(620px 420px at 2% 106%, rgba(255, 168, 96, .14), transparent 70%);
  pointer-events: none;
}
.public-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 1rem; }

/* 顶部导航：渐变上直接放，白字 */
.pub-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}
.pub-brand { display: flex; align-items: center; gap: .7rem; flex: 0 0 auto; }
.pub-brand img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  background: #fff;
  border-radius: 9px;
  padding: 3px;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .35);
}
.pub-brand .name { display: block; color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.25; white-space: nowrap; }
.pub-brand .en { display: block; color: rgba(255, 255, 255, .62); font-size: .58rem; letter-spacing: .08em; white-space: nowrap; }
.pub-links { margin-left: auto; display: flex; align-items: center; gap: .1rem; flex: 0 0 auto; }
.pub-links a {
  color: rgba(255, 255, 255, .88);
  font-size: .875rem;
  padding: .42rem .7rem;
  border-radius: 8px;
  font-weight: 500;
  white-space: nowrap;
}
.pub-links a i { display: none; }
.pub-links a:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.pub-links a.active { color: #fff; background: rgba(255, 255, 255, .2); font-weight: 600; }

/* 白容器 */
.pub-panel {
  background: #fff;
  border-radius: var(--rad-lg);
  box-shadow: 0 24px 60px -30px rgba(60, 10, 10, .55);
  overflow: hidden;
}
.pub-panel-body { padding: 2rem; }

@media (max-width: 991.98px) {
  .public-inner { padding: 0 .75rem; }
  .pub-brand img { height: 34px; width: 34px; }
  .pub-brand .name { font-size: .85rem; }
  .pub-brand .en { display: none; }
  .pub-links {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    background: #fff;
    padding: .35rem .3rem calc(.35rem + env(safe-area-inset-bottom));
    justify-content: space-around;
    gap: 0;
    box-shadow: 0 -6px 24px -14px rgba(0, 0, 0, .35);
    z-index: 1030;
  }
  .pub-links a {
    flex: 1;
    text-align: center;
    color: var(--ink3);
    font-size: .7rem;
    padding: .3rem 0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    font-weight: 500;
  }
  .pub-links a i { display: block; font-size: 1.15rem; }
  .pub-links a.active { color: var(--r800); background: var(--r100); font-weight: 700; }
  /* 手机端把「管理入口」按钮融进底部栏 */
  .pub-links a.btn-white {
    margin: 0 !important;
    background: transparent;
    border: 0;
    color: var(--ink3);
    box-shadow: none;
    font-size: .7rem;
    padding: .3rem 0;
  }
  .pub-links a.btn-white::before {
    content: "\F3E2";
    font-family: "bootstrap-icons";
    font-size: 1.15rem;
    display: block;
  }
  .pub-links a.nav-hide-sm { display: none; }
  .pub-panel-body { padding: 1.25rem; }
  .has-dock { padding-bottom: 4.6rem; }
  .public-shell { padding-bottom: 4.9rem; }
}

/* Hero：渐变里的白色文字区 */
.pub-hero { color: #fff; padding: 1.5rem 0 2.25rem; }
.pub-hero .eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; letter-spacing: .16em; font-weight: 600;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  padding: .28rem .7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.pub-hero h1 {
  color: #fff;
  font-size: clamp(1.85rem, 4.4vw, 2.7rem);
  line-height: 1.25;
  margin: 0 0 .9rem;
  text-shadow: 0 2px 18px rgba(80, 10, 10, .28);
}
.pub-hero p {
  color: rgba(255, 255, 255, .88);
  font-size: .97rem;
  line-height: 1.9;
  max-width: 54ch;
  margin: 0 0 1.5rem;
}
.pub-hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

/* 会徽：官方矢量稿（logo-暗红）导出。
   会徽本体是「白环 + 暗红盘」的印章结构，直接压在红色背景上红盘会与底色糊在一起，
   因此垫一层白色圆托，还原它在纸张上的原始效果。 */
.pub-hero-emblem-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding: .5rem 0;
}
.pub-hero-emblem-plate {
  width: clamp(170px, 17vw, 218px);
  padding: clamp(6px, .65vw, 9px);
  background: #fff;
  border-radius: 50%;
  /* 下沉阴影让会徽“落”在版面上，而不是贴上去 */
  box-shadow:
    0 18px 38px -12px rgba(56, 5, 5, .58),
    0 0 0 1px rgba(255, 255, 255, .22);
}
.pub-hero-emblem {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
}
@media (max-width: 991.98px) {
  .pub-hero { padding: .5rem 0 1.35rem; }
  .pub-hero-emblem-wrap { display: none; }
  .pub-hero h1 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .pub-hero p { font-size: .92rem; margin-bottom: 1.2rem; }
  .pub-hero-actions .btn { flex: 1 1 42%; }
}

/* 玻璃卡（渐变上的次卡片） */
.glass-card {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: var(--rad-lg);
  padding: 1.15rem 1.25rem;
  color: #fff;
  height: 100%;
  backdrop-filter: blur(6px);
}
.glass-card .k { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.glass-card .k small { font-size: .78rem; font-weight: 400; opacity: .8; margin-left: .15rem; }
.glass-card .t { font-size: .78rem; color: rgba(255, 255, 255, .78); }

/* 服务入口（白底内） */
.svc-tile {
  display: block;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--rad);
  padding: 1.1rem 1.2rem;
  color: inherit;
  height: 100%;
  transition: .18s;
}
.svc-tile:hover {
  border-color: var(--r300);
  box-shadow: 0 12px 28px -18px rgba(139, 35, 35, .6);
  transform: translateY(-2px);
  color: inherit;
}
.svc-tile .ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--r100);
  color: var(--r800);
  font-size: 1.05rem;
  margin-bottom: .7rem;
}
.svc-tile h3 { font-size: .95rem; margin: 0 0 .3rem; }
.svc-tile p { margin: 0; font-size: .8rem; color: var(--ink3); line-height: 1.75; }

/* ---------- 会员卡（参考页核心组件） ---------- */
.member-hero { text-align: center; }
.member-avatar {
  width: 104px; height: 104px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: var(--grad-soft);
  color: #fff;
  font-size: 2.6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -14px rgba(139, 35, 35, .7);
  overflow: hidden;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-avatar.sm { width: 56px; height: 56px; font-size: 1.4rem; margin: 0; box-shadow: 0 6px 16px -8px rgba(139, 35, 35, .6); }
.member-hero .nm { font-size: 1.5rem; font-weight: 700; margin-bottom: .2rem; }
.member-hero .ti { font-size: .85rem; color: var(--r800); font-weight: 500; }

/* 信息格 2×2 */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.info-cell { background: var(--bg2); border-radius: var(--rad-sm); padding: .7rem .85rem; }
.info-cell .lb { font-size: .72rem; color: var(--ink3); margin-bottom: .15rem; }
.info-cell .vl { font-size: .875rem; color: var(--ink); font-weight: 600; word-break: break-word; }
@media (max-width: 575.98px) {
  .info-grid { gap: .6rem; }
  .info-cell { padding: .6rem .7rem; }
  .info-cell .vl { font-size: .8125rem; }
}

/* 有效/过期徽章 */
.status-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .85rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}
.status-pill.ok { background: var(--okbg); color: var(--ok); }
.status-pill.bad { background: var(--badbg); color: var(--bad); }

/* ---------- 验证结果大卡 ---------- */
.verify-card {
  max-width: 460px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  padding: 1.75rem 1.5rem 1.25rem;
  box-shadow: 0 26px 60px -28px rgba(60, 10, 10, .6);
}
.verify-ok-band {
  display: flex; align-items: center; gap: .55rem;
  background: var(--okbg);
  color: var(--ok);
  border-radius: var(--rad-sm);
  padding: .6rem .85rem;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.verify-ok-band i { font-size: 1.1rem; }
.dl-row { display: flex; justify-content: space-between; gap: 1rem; padding: .62rem 0; border-bottom: 1px dashed var(--line); font-size: .84rem; }
.dl-row:last-child { border-bottom: 0; }
.dl-row .k { color: var(--ink3); }
.dl-row .v { color: var(--ink); font-weight: 600; text-align: right; }

/* =========================================================
   后台
   ========================================================= */
.admin-shell { display: flex; min-height: 100vh; background: var(--bg2); }
.admin-side {
  width: 240px; flex: 0 0 240px;
  background: var(--grad-soft);
  color: rgba(255, 255, 255, .82);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.admin-side-brand {
  padding: 1.15rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  display: flex; align-items: center; gap: .6rem;
}
.admin-side-brand img {
  height: 32px; background: #fff; border-radius: 7px; padding: 2px 5px;
}
.admin-side-brand b { color: #fff; font-size: .9rem; display: block; line-height: 1.3; }
.admin-side-brand span { font-size: .62rem; color: rgba(255, 255, 255, .6); letter-spacing: .1em; }
.admin-group { padding: .95rem 1.1rem .35rem; font-size: .68rem; color: rgba(255, 255, 255, .5); font-weight: 700; letter-spacing: .1em; }
.admin-nav { padding-bottom: .75rem; }
.admin-nav a {
  display: flex; align-items: center; gap: .55rem;
  padding: .6rem 1.1rem;
  color: rgba(255, 255, 255, .82);
  font-size: .875rem;
  border-left: 3px solid transparent;
  transition: .15s;
}
.admin-nav a i { font-size: 1rem; opacity: .85; }
.admin-nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-nav a.active {
  background: #fff;
  color: var(--r800);
  border-left-color: var(--o600);
  font-weight: 700;
}
.admin-nav a.active i { opacity: 1; }
.admin-nav a .cnt {
  margin-left: auto;
  background: rgba(255, 255, 255, .22);
  color: #fff;
  font-size: .68rem;
  padding: 0 .4rem;
  border-radius: 999px;
  line-height: 1.1rem;
}
.admin-nav a.active .cnt { background: var(--r800); color: #fff; }
.admin-side-foot {
  margin-top: auto;
  padding: .9rem 1.1rem;
  font-size: .72rem;
  color: rgba(255, 255, 255, .55);
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.admin-side-foot a { color: rgba(255, 255, 255, .8); }

.admin-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: .7rem 1.25rem;
  display: flex; align-items: center; gap: .75rem;
  position: sticky; top: 0; z-index: 1020;
}
.admin-topbar h1 { font-size: 1.05rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-topbar .who { display: flex; align-items: center; gap: .7rem; font-size: .8125rem; color: var(--ink3); }
.admin-body { padding: 1.25rem; }

/* 原生校验定位到字段时，上下留出吸顶头 / 视口边缘的距离，提示气泡不会被挡住 */
.admin-body .form-control, .admin-body .form-select, .admin-body .form-check-input { scroll-margin: 96px 0 40px; }

/* 脚本不可用时的兜底：服务端带着 #r-reject 回到页面，高亮一下驳回理由框 */
#r-reject:target { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(114, 28, 36, .12); }

@media (max-width: 991.98px) {
  .admin-side {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 264px; height: 100%;
    transform: translateX(-100%);
    transition: transform .24s ease;
    z-index: 1080;
    box-shadow: 0 0 40px rgba(0, 0, 0, .35);
  }
  .admin-side.is-open { transform: none; }
  .admin-topbar { padding: .5rem .85rem; }
  .admin-topbar h1 { font-size: .95rem; }
  .admin-body { padding: .9rem .85rem 2rem; }
  .admin-topbar .who .who-hide { display: none; }
}

/* 统计卡 */
.stat-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 1rem 1.1rem;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.stat-tile .k { font-size: .78rem; color: var(--ink3); margin-bottom: .15rem; }
.stat-tile .v { font-size: 1.7rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.stat-tile .v small { font-size: .76rem; font-weight: 400; color: var(--ink3); margin-left: .18rem; }
.stat-tile .foot { font-size: .74rem; color: var(--ink3); margin-top: .1rem; }
.stat-tile .ico {
  position: absolute; right: .9rem; top: .9rem;
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--r100); color: var(--r800); font-size: 1rem;
}
.stat-tile.is-warn .ico { background: var(--warnbg); color: #A85A12; }
.stat-tile.is-ok .ico { background: var(--okbg); color: var(--ok); }
.stat-tile.is-grad {
  background: var(--grad-soft);
  border: 0;
  color: #fff;
}
.stat-tile.is-grad .k, .stat-tile.is-grad .v small, .stat-tile.is-grad .foot { color: rgba(255, 255, 255, .78); }
.stat-tile.is-grad .ico { background: rgba(255, 255, 255, .2); color: #fff; }

/* 进度条 */
.bar-row { display: grid; grid-template-columns: 6.5rem 1fr 5rem; gap: .65rem; align-items: center; padding: .3rem 0; }
.bar-row .label { font-size: .8rem; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { background: var(--bg3); height: 12px; border-radius: 6px; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 6px; background: var(--grad); }
.bar-row .value { font-size: .8rem; text-align: right; color: var(--ink2); font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) {
  .bar-row { grid-template-columns: 5rem 1fr 3.6rem; gap: .45rem; }
  .bar-row .label, .bar-row .value { font-size: .72rem; }
}

/* 详情列表 */
dl.detail-list { margin: 0; }
dl.detail-list dt { font-weight: 400; font-size: .8rem; color: var(--ink3); padding: .52rem 0; }
dl.detail-list dd { margin: 0; padding: .52rem 0; border-bottom: 1px dashed var(--line); word-break: break-word; font-size: .875rem; }
dl.detail-list dd:last-of-type { border-bottom: 0; }

/* 证书 */
.cert-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: .55rem;
  box-shadow: 0 18px 50px -28px rgba(34, 37, 42, .5);
}
.cert-inner {
  border: 2px solid var(--r800);
  border-radius: 6px;
  padding: 2.25rem 2rem;
  text-align: center;
  position: relative;
}
.cert-inner::before {
  content: ""; position: absolute; inset: .45rem;
  border: 1px solid var(--r300);
  border-radius: 3px;
  pointer-events: none;
}
.cert-inner h2 { font-size: 1.7rem; letter-spacing: .26em; color: var(--r800); margin: 0 0 .3rem; }
.cert-inner .en { font-size: .62rem; letter-spacing: .16em; color: var(--ink3); }
.cert-inner .who { font-size: 1.5rem; font-weight: 700; margin: 1.1rem 0 .3rem; }
.cert-inner .body-text { font-size: .85rem; color: var(--ink2); line-height: 2; }
.cert-meta { margin-top: 1.5rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; font-size: .75rem; color: var(--ink2); text-align: left; }
.cert-qr { width: 88px; height: 88px; background: #fff; border: 1px solid var(--line); padding: 4px; border-radius: 6px; }
.cert-seal {
  width: 86px; height: 86px; border-radius: 50%;
  border: 2px solid rgba(139, 35, 35, .38);
  color: rgba(139, 35, 35, .5);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; line-height: 1.3; text-align: center;
  margin: .5rem 0 0 auto;
  transform: rotate(-8deg);
}
@media (max-width: 767.98px) {
  .cert-inner { padding: 1.4rem .9rem; }
  .cert-inner h2 { font-size: 1.25rem; letter-spacing: .14em; }
  .cert-inner .en { font-size: .52rem; letter-spacing: .02em; white-space: nowrap; overflow: hidden; }
  .cert-inner .who { font-size: 1.15rem; margin: .8rem 0 .2rem; }
  .cert-inner .body-text { font-size: .76rem; line-height: 1.9; }
  .cert-meta { flex-direction: column; align-items: center; text-align: center; gap: .9rem; }
  .cert-meta > * { text-align: center !important; }
  .cert-seal { margin: .5rem auto 0; }
}

/* 空状态 */
.empty-state { text-align: center; padding: 2.5rem 1.25rem; color: var(--ink3); }
.empty-state i { font-size: 2.2rem; color: var(--ink4); display: block; margin-bottom: .4rem; }

/* 页脚 */
.pub-footer { text-align: center; color: rgba(255, 255, 255, .72); font-size: .75rem; padding: 1.5rem 0 .5rem; }
.pub-footer a { color: rgba(255, 255, 255, .88); }

/* 分页 */
.pagination {
  --bs-pagination-color: var(--ink2);
  --bs-pagination-border-color: var(--line);
  --bs-pagination-hover-color: var(--r800);
  --bs-pagination-hover-bg: var(--r100);
  --bs-pagination-active-bg: var(--r800);
  --bs-pagination-active-border-color: var(--r800);
  --bs-pagination-font-size: .8125rem;
  --bs-pagination-border-radius: 8px;
}
.pagination .page-link { padding: .35rem .65rem; }

/* 打印 */
@media print {
  .pub-nav, .pub-footer, .admin-side, .admin-topbar, .no-print, .btn, .pub-hero { display: none !important; }
  .public-shell { background: #fff !important; }
  .public-shell::before { display: none; }
  .cert-sheet, .card { box-shadow: none; border: 0; }
}

/* 设计稿注释条 */
.mock-note {
  background: var(--r100);
  border: 1px dashed var(--r300);
  color: var(--r800);
  font-size: .78rem;
  border-radius: 8px;
  padding: .5rem .8rem;
}

/* =========================================================
   系统补充层（真实页面需要的补充件，设计稿未覆盖）
   ========================================================= */

/* 表单必填/错误 */
.is-invalid { border-color: var(--bad) !important; }
.invalid-feedback { display: block; font-size: .75rem; color: var(--bad); margin-top: .3rem; }

/* 页头（白容器内的标题区） */
.page-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head .t { flex: 1 1 auto; min-width: 0; }
.page-head h2 { font-size: 1.25rem; margin: 0 0 .2rem; }
.page-head p { margin: 0; font-size: .82rem; color: var(--ink3); }
.page-head .acts { display: flex; gap: .5rem; flex-wrap: wrap; }

/* 登录 / 窄卡页面 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 2rem 1.75rem; box-shadow: 0 26px 60px -28px rgba(60,10,10,.6); }
.auth-card .brand { text-align: center; margin-bottom: 1.5rem; }
.auth-card .brand img { height: 34px; }
.auth-card .brand b { display: block; font-size: 1.05rem; margin-top: .6rem; }
.auth-card .brand span { font-size: .7rem; color: var(--ink3); letter-spacing: .1em; }

/* 验证码行 */
.captcha-row { display: flex; gap: .6rem; align-items: stretch; }
.captcha-row .form-control { flex: 1 1 auto; min-width: 0; }
.captcha-row img { height: 45px; border-radius: var(--rad-sm); border: 1.5px solid var(--line); cursor: pointer; flex: 0 0 auto; }

/* 详情双列 */
.detail-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.detail-pair > div { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .845rem; }
.detail-pair > div > span:first-child { color: var(--ink3); flex: 0 0 auto; }
.detail-pair > div > span:last-child { color: var(--ink); font-weight: 600; text-align: right; word-break: break-word; }
@media (max-width: 767.98px) { .detail-pair { grid-template-columns: 1fr; } }

/* 后台表格工具栏 */
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar .form-control, .toolbar .form-select { max-width: 190px; min-width: 108px; flex: 0 0 auto; }
.toolbar .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
  .toolbar > * { flex: 1 1 auto; max-width: none !important; min-width: 0; }
  .toolbar .btn { flex: 0 0 auto; white-space: nowrap; }
  .toolbar form { flex: 1 1 100%; }
  .toolbar .form-control, .toolbar .form-select { flex: 1 1 40%; min-width: 0; }
}

/* 表格操作列 */
.td-acts { display: flex; gap: .35rem; flex-wrap: wrap; }
@media (max-width: 767.98px) { .td-acts { justify-content: flex-end; } }

/* 行内表单按钮 */
form.inline { display: inline-flex; }

/* 证书验真结果：徽章化字段 */
.verify-card .member-avatar { margin-bottom: .85rem; }
.verify-card .nm { font-size: 1.35rem; font-weight: 700; text-align: center; }
.verify-card .sub { text-align: center; font-size: .8rem; color: var(--ink3); margin-bottom: 1.1rem; }

/* 打印证书时隐藏外壳 */
@media print {
  .auth-card, .pub-panel { box-shadow: none; }
  .detail-pair > div { border-color: #ddd; }
}

/* 时间轴（审核流程） */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.1rem 1.6rem; border-left: 2px solid var(--line); margin-left: .4rem; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: .3rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--r500);
}
.timeline li.done::before { background: var(--r800); border-color: var(--r800); }
.timeline .tm { font-size: .72rem; color: var(--ink3); }
.timeline .tx { font-size: .85rem; }

/* 步骤点（渐变区） */
.step-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .6);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; line-height: 1; flex: 0 0 auto;
}
.step-dot.is-on { background: #fff; color: var(--r800); border-color: #fff; font-weight: 700; }

/* 上传框 */
.upload-box {
  display: block;
  border: 1.5px dashed var(--line);
  border-radius: var(--rad-sm);
  padding: 1.2rem;
  text-align: center;
  color: var(--ink3);
  cursor: pointer;
  background: var(--bg2);
  transition: .16s;
}
.upload-box:hover { border-color: var(--r300); background: var(--r100); color: var(--r800); }
.upload-box:hover i { color: var(--r800); }
.upload-box i { font-size: 1.6rem; color: var(--r300); display: block; margin-bottom: .3rem; }

/* 已选附件列表：支持单个移除、清空全部 */
.file-tray {
  margin-top: .6rem;
  border: 1px solid var(--line);
  border-radius: var(--rad-sm);
  background: var(--bg2);
  padding: .55rem .7rem;
}
.file-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .78rem;
  color: var(--ink3);
  margin-bottom: .3rem;
}
.file-clear {
  border: 0;
  background: none;
  padding: 0;
  font-size: .78rem;
  color: var(--r800);
  cursor: pointer;
  white-space: nowrap;
}
.file-clear:hover { text-decoration: underline; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .1rem;
  font-size: .82rem;
  border-top: 1px dashed var(--line);
}
.file-item:first-child { border-top: 0; }
.file-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.file-size {
  flex: 0 0 auto;
  color: var(--ink3);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.file-remove {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink3);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: .15s;
}
.file-remove:hover {
  border-color: var(--r300);
  background: var(--r100);
  color: var(--r800);
}

/* 会费登记：行内折叠表单 */
.fee-detail > summary { list-style: none; cursor: pointer; display: inline-block; }
.fee-detail > summary::-webkit-details-marker { display: none; }
.fee-detail[open] > summary { display: none; }
.fee-detail .fee-form {
  margin-top: .4rem;
  min-width: 250px;
  text-align: left;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--rad-sm);
  padding: .75rem .85rem;
}
.fee-detail .fee-form .form-label { font-size: .72rem; margin-bottom: .2rem; }

/* 表格前置小图标块 */
.ico-flat {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--r100); color: var(--r800); font-size: .9rem;
}
@media (max-width: 767.98px) { .ico-flat { display: none; } }

/* 统计页图表容器 */
.chart-box { position: relative; height: 220px; }

/* ---------------------------------------------------------
   仪表盘图表（服务端生成的 SVG）
   窄屏时图表不跟着压缩到看不清，改为横向滚动
   --------------------------------------------------------- */
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart-svg { display: block; width: 100%; min-width: 540px; height: auto; }
.chart-svg .grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; opacity: .9; }
.chart-svg .grid-line.base { stroke-dasharray: none; opacity: 1; }
.chart-svg .axis-y { fill: var(--ink4); font-size: 10px; text-anchor: end; font-variant-numeric: tabular-nums; }
.chart-svg .axis-x { fill: var(--ink3); font-size: 10px; text-anchor: middle; }

.chart-legend { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: .8rem; color: var(--ink2); margin-bottom: .55rem; }
.chart-hint { display: none; text-align: center; font-size: .72rem; color: var(--ink4); margin-top: .3rem; }
@media (max-width: 575.98px) { .chart-hint { display: block; } }
.chart-legend .dot { display: inline-block; width: .52rem; height: .52rem; border-radius: 50%; margin-right: .3rem; vertical-align: 1px; }
.chart-legend b { color: var(--ink); font-weight: 700; }

.donut-wrap { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.donut { flex: 0 0 auto; }
.donut-v { font-size: 25px; font-weight: 700; fill: var(--ink); text-anchor: middle; font-variant-numeric: tabular-nums; }
.donut-u { font-size: 12px; font-weight: 600; fill: var(--ink3); }
.donut-k { font-size: 10.5px; fill: var(--ink3); text-anchor: middle; }

.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 8.5rem; min-width: 7.5rem; }
.donut-legend li { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--ink2); padding: .16rem 0; }
.donut-legend .dot { width: .5rem; height: .5rem; border-radius: 50%; flex: 0 0 auto; }
.donut-legend .lb { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend .n { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.donut-legend .p { color: var(--ink3); font-size: .76rem; min-width: 2.9rem; text-align: right; font-variant-numeric: tabular-nums; }

/* flex 容器里的头像不参与 auto 居中 */
.d-flex > .member-avatar, .d-flex > .member-avatar.sm { margin: 0; flex: 0 0 auto; }

/* 承诺勾选（申请表单） */
.promise-check {
  display: flex; align-items: flex-start; gap: .65rem;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--rad-sm); padding: .85rem 1rem;
}
/* 覆盖 Bootstrap .form-check 的 float + 负 margin，否则复选框会被推出边框 */
.promise-check .form-check-input {
  flex: 0 0 auto; float: none; margin: .16rem 0 0;
  width: 1.05rem; height: 1.05rem;
  border: 1.5px solid var(--line); cursor: pointer;
}
.promise-check .form-check-input:checked {
  background-color: var(--r800); border-color: var(--r800);
}
.promise-check .form-check-label { font-size: .845rem; line-height: 1.65; color: var(--ink2); cursor: pointer; }
.promise-check .form-check-label strong { color: var(--r800); }
.promise-check .req { color: var(--bad); }

/* 承诺状态标签（详情页） */
.promise-tag {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600;
  color: #155724; background: #D4EDDA;
  border-radius: 999px; padding: .2rem .7rem;
}
.promise-tag.is-missing { color: #721C24; background: #F8D7DA; }

/* 必填星号统一标红 */
.req { color: var(--bad); font-style: normal; }

/* 必填星号统一标红 */
.req { color: var(--bad); font-style: normal; }
