/* ============================================================
   南方集团信息化系统（内部）— 全站样式
   配色取自集团 logo：金黄 → 青绿 → 深蓝（山形渐变）
   ============================================================ */

:root {
  --navy: #16243a;
  --navy-2: #1e3350;
  --navy-3: #2a4568;
  --teal: #1f8a92;
  --teal-dark: #156b72;
  --teal-soft: #e6f3f4;
  --gold: #d99a2b;
  --gold-dark: #b47f1c;
  --gold-soft: #fdf4e3;
  /* 退补年龄验证专用：琥珀 / 橙色，和待审核（蓝）、已通过（绿）、已驳回（红）明确区分 */
  --amber: #d97706;
  --amber-dark: #a8500a;
  --amber-soft: #fff3e3;
  --red: #b8232d;
  --red-soft: #fdf2f2;
  --green: #2f8f5b;
  --green-soft: #eaf6ef;
  --blue: #2f6fb3;
  --blue-soft: #eaf1f9;
  --purple-soft: #f2eefb;
  --purple: #6a4fb3;

  --ink: #14171c;
  --ink-2: #3c4450;
  --ink-3: #6b7480;
  --paper: #ffffff;
  --bg: #f4f6f9;
  --bg-2: #eef1f5;
  --line: #e3e7ec;
  --line-strong: #ccd4dd;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 28, .05), 0 2px 8px rgba(20, 23, 28, .04);
  --shadow: 0 2px 6px rgba(20, 23, 28, .06), 0 12px 32px rgba(20, 23, 28, .08);
  --shadow-lg: 0 20px 60px rgba(20, 23, 28, .18);

  /* ---- 三级层次阴影（概览页 / 后台概览用） ---- */
  --e1: 0 1px 2px rgba(16, 24, 40, .04);
  --e2: 0 8px 24px rgba(16, 24, 40, .08);
  --e3: 0 24px 48px rgba(16, 24, 40, .16);
  /* ---- 磨砂玻璃（一屏最多 3~4 处大面积使用） ---- */
  --glass-bg: rgba(255, 255, 255, .62);
  --glass-line: rgba(255, 255, 255, .55);
  --glass-in: inset 0 1px 0 rgba(255, 255, 255, .7);
  --glass-blur: blur(20px) saturate(180%);
  /* ---- 分隔线 ---- */
  --hair: 1px solid rgba(16, 24, 40, .06);
  /* ---- 图表 ---- */
  --chart-track: rgba(16, 24, 40, .07);
  --skeleton: linear-gradient(100deg, rgba(16, 24, 40, .045) 30%, rgba(16, 24, 40, .10) 50%, rgba(16, 24, 40, .045) 70%);
  /* ---- 动效 ---- */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t-micro: 150ms;
  --t-enter: 320ms;
  --radius-card: 18px;
  --radius-card-sm: 14px;
  --grad: linear-gradient(135deg, #f0b429 0%, #1f9e8f 55%, #1b4f8a 100%);
  --grad-soft: linear-gradient(135deg, rgba(240, 180, 41, .16), rgba(31, 158, 143, .14) 55%, rgba(27, 79, 138, .14));
  /* 强调细条：不要每张卡都加 */
  --grad-bar: linear-gradient(95deg, #f0b429, #68beb2, #1b4f8a);

  --sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --serif: "Songti SC", "SimSun", Georgia, "Noto Serif SC", serif;
  --header-h: 60px;
  --side-w: 220px;
}

[data-theme="dark"] {
  --ink: #e9eef5;
  --ink-2: #bcc7d4;
  --ink-3: #8d99a8;
  --paper: #151d28;
  --bg: #0d131b;
  --bg-2: #101823;
  --line: #26313f;
  --line-strong: #35445a;
  --teal-soft: #14312f;
  --gold-soft: #33280f;
  --amber-soft: #3a2610;
  --amber-dark: #f2b872;
  --red-soft: #33191b;
  --green-soft: #14301f;
  --blue-soft: #16263a;
  --purple-soft: #241f38;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  --e1: 0 1px 2px rgba(0, 0, 0, .30);
  --e2: 0 8px 24px rgba(0, 0, 0, .38);
  --e3: 0 24px 48px rgba(0, 0, 0, .55);
  --glass-bg: rgba(20, 28, 42, .58);
  --glass-line: rgba(255, 255, 255, .10);
  --glass-in: inset 0 1px 0 rgba(255, 255, 255, .06);
  --hair: 1px solid rgba(255, 255, 255, .08);
  --chart-track: rgba(255, 255, 255, .10);
  --skeleton: linear-gradient(100deg, rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, .11) 50%, rgba(255, 255, 255, .05) 70%);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* 卡片入场会先向下偏移 12px，避免因此出现横向滚动条
   （用 clip 而不是 hidden：clip 不会把 sticky 顶栏变成失效的滚动祖先） */
html { overflow-x: clip; }
body { overflow-x: clip; }

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

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; }
p { margin: 0 0 .8em; }
code {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 6px; font-family: ui-monospace, Consolas, monospace; font-size: .92em;
}

/* ---------------- 通用布局 ---------------- */

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; gap: 10px; align-items: center; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.wrap-gap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.right { text-align: right; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 700; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 16px; } .mt3 { margin-top: 24px; }
.mb1 { margin-bottom: 8px; } .mb2 { margin-bottom: 16px; } .mb3 { margin-bottom: 24px; }
.hide { display: none !important; }
.gap-sm { gap: 6px; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink);
  border-radius: var(--radius-sm); padding: 8px 16px; font-size: 14px; font-family: inherit;
  cursor: pointer; transition: .16s ease; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--ink-3); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #23180a; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #9c1c25; border-color: #9c1c25; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-2); border-color: transparent; }
.btn-outline-amber { background: transparent; border-color: var(--amber); color: var(--amber-dark); }
.btn-outline-amber:hover { background: var(--amber-soft); border-color: var(--amber); }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: 7px 10px; }

/* ---------------- 卡片 ---------------- */

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 16px; overflow: hidden;
}
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; }
.card-head .sub { font-size: 13px; color: var(--ink-3); font-weight: 400; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 14px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg-2); }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.stat .n { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.2; }
[data-theme="dark"] .stat .n { color: var(--ink); }
.stat .k { font-size: 13px; color: var(--ink-3); }
.stat.accent .n { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- 标签 / 徽章 ---------------- */

.tag {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px;
  background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); line-height: 1.7;
  white-space: nowrap;
}
.tag-teal { background: var(--teal-soft); color: var(--teal-dark); border-color: transparent; }
.tag-gold { background: var(--gold-soft); color: var(--gold-dark); border-color: transparent; }
.tag-red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.tag-green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.tag-blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.tag-amber { background: var(--amber-soft); color: var(--amber-dark); border-color: transparent; }
.amber-text { color: var(--amber-dark); }
.tag-purple { background: var(--purple-soft); color: var(--purple); border-color: transparent; }
.tag-navy { background: var(--navy); color: #fff; border-color: transparent; }
.role-super { background: var(--grad); color: #fff; border-color: transparent; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); cursor: pointer; font-size: 13px;
  font-family: inherit; color: var(--ink-2); transition: .14s;
}
.chip:hover { border-color: var(--teal); color: var(--teal-dark); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-amber:hover { border-color: var(--amber); color: var(--amber-dark); }
.chip-amber.active { background: var(--amber); border-color: var(--amber); color: #fff; }

/* ---------------- 表单 ---------------- */

.field { margin-bottom: 14px; }
.label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); }
.label .req { color: var(--red); }
.label .opt { color: var(--muted); font-weight: normal; font-size: 12px; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; background: var(--paper); color: var(--ink); transition: .14s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft);
}
.textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line-strong);
  border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--paper); user-select: none;
}
.check input { margin: 0; accent-color: var(--teal); }
.check.on { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); font-weight: 600; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-info { background: var(--teal-soft); color: var(--teal-dark); }
.alert-warn { background: var(--gold-soft); color: var(--gold-dark); }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-ok { background: var(--green-soft); color: var(--green); }

/* ---------------- 表格 ---------------- */

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th, table.table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.table th { background: var(--bg-2); font-size: 13px; color: var(--ink-3); font-weight: 600; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
table.table tbody tr:hover { background: var(--bg-2); }
table.table tbody tr:last-child td { border-bottom: none; }
table.table td.num { color: var(--ink-3); font-size: 13px; width: 42px; }

/* ---------------- 邮箱（第 84 批，管理员名单 / 账号管理共用） ----------------
   有值：单行显示，窄屏省略号截断（不撑宽表格）；空值：灰色「未填」小胶囊，
   看得见但不刺眼。 */
.email-cell {
  display: inline-block; max-width: 190px; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom;
}
/* 申请详情里的邮箱：可点击直接回信（mailto:），详情里不截断（能看全整串地址） */
.email-link {
  color: var(--teal-dark); text-decoration: underline; text-underline-offset: 2px;
  max-width: 100%; white-space: normal; word-break: break-all;
}
.email-link:hover { color: var(--teal); }
.email-missing {
  display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 12px; line-height: 1.7;
  color: var(--ink-3); background: var(--bg-2); border: 1px dashed var(--line-strong);
  white-space: nowrap;
}
.email-stats { color: var(--ink-2); white-space: nowrap; }
.email-stats b { color: var(--ink); }
/* 账号管理：列比别处多（多了「邮箱」），左右内边距收窄一点，操作按钮才排得下 */
table.table.users-table th, table.table.users-table td { padding-left: 8px; padding-right: 8px; }
table.table.users-table td:last-child { white-space: nowrap; }
.mcard-email { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mcard-email .email-cell { max-width: 100%; }

/* 手机端：邮箱跟着格子宽度截断，绝不把表格 / 卡片撑出横向滚动条 */
@media (max-width: 720px) {
  table.table.responsive td .email-cell, .mcard-email .email-cell { max-width: 100%; }
  .email-stats { white-space: normal; }
}

/* ---------------- 列表项 / 成员卡 ---------------- */

.list { display: flex; flex-direction: column; }
.list-item { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg-2); }

.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 15px; background: var(--grad); letter-spacing: .5px;
}
.avatar.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 20px; }
.avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.member-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: .16s;
}
.member-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--teal); }
/* 长串（300 个 1、长英文 / 游戏ID / 标签）不能把卡片撑破：
   卡片与每层内容盒都允许收缩（min-width:0）+ 任意位置断行；简介最多 2 行省略号。 */
.member-card { min-width: 0; overflow: hidden; }
.member-card .row { min-width: 0; }
.member-card b,
.member-card .mcard-id,
.member-card .mcard-bio,
.member-card .mcard-recent,
.member-card .gift-no {
  min-width: 0; overflow-wrap: anywhere; word-break: break-word;
}
.member-card .tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.member-card .mcard-bio,
.member-card .mcard-recent {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ---------------- 顶栏 / 侧栏（内部系统） ---------------- */

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side-w); flex: none; background: var(--navy); color: #cfd8e3;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sidebar .brand img { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 9px; padding: 2px; }
.sidebar .brand b { color: #fff; font-size: 15px; display: block; line-height: 1.3; }
.sidebar .brand span { font-size: 11px; color: #93a3b8; }
.nav { padding: 10px 8px; overflow-y: auto; flex: 1; }
.nav-group { font-size: 11px; color: #7c8ca3; padding: 12px 12px 4px; letter-spacing: .06em; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: #cfd8e3;
  font-size: 14px; cursor: pointer; border: none; background: none; width: 100%; text-align: left; font-family: inherit;
  transition: .14s; text-decoration: none; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--teal); color: #fff; font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; }
/* 侧栏 / 底部导航的线性图标（原来是 emoji） */
.nav-item .ico, .bottom-nav a .ico { display: inline-flex; align-items: center; justify-content: center; }
.nav-item .ico .ic { width: 18px; height: 18px; }
.bottom-nav a .ico .ic { width: 20px; height: 20px; }
.nav-item.active .ico .ic { stroke-width: 1.7; }
/* 侧栏红点：白字红底圆角气泡，数字 >99 显示 99+（颜色统一为红 #e5484d，不再用琥珀色） */
.nav-item .dot {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: #e5484d; color: #fff; font-size: 11px; border-radius: 999px; padding: 0 6px;
  line-height: 17px; min-width: 18px; text-align: center; white-space: nowrap; pointer-events: none;
}
/* 菜单文字过长时截断，角标固定在右侧，手机上不会把菜单撑破 */
.nav-item .nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .side-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.09); font-size: 12px; color: #8e9fb5; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--header-h); background: var(--paper); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 18px; position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 16px; margin: 0; }
.topbar .spacer { flex: 1; }
.content { padding: 18px; max-width: 1280px; width: 100%; }
.bottom-nav { display: none; }

.icon-btn {
  border: 1px solid var(--line); background: var(--paper); border-radius: 10px; width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; color: var(--ink-2);
  position: relative;
}
.icon-btn:hover { border-color: var(--teal); color: var(--teal-dark); }
.icon-btn .dot {
  position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; border-radius: 999px;
  font-size: 10px; min-width: 17px; height: 17px; line-height: 17px; text-align: center; padding: 0 4px;
}

/* ---------------- 弹窗 / 提示 ---------------- */

.modal-mask {
  position: fixed; inset: 0; background: rgba(12, 18, 28, .55); display: flex; align-items: center;
  justify-content: center; padding: 18px; z-index: 100; backdrop-filter: blur(2px);
}
.modal {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal.wide { max-width: 900px; }
.modal.narrow { max-width: 420px; }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: var(--bg-2); }

.toast-wrap { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--navy); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow); animation: toastIn .2s ease; max-width: 90vw;
}
.toast.ok { background: var(--green); }
.toast.err { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------------- Markdown 内容 ---------------- */

.md { font-size: 15px; line-height: 1.8; word-wrap: break-word; }
.md h1 { font-size: 20px; margin: 1.2em 0 .6em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.md h2 { font-size: 18px; margin: 1.3em 0 .5em; color: var(--navy); }
[data-theme="dark"] .md h2 { color: var(--ink); }
.md h3 { font-size: 16px; margin: 1.1em 0 .4em; color: var(--teal-dark); }
.md h4 { font-size: 15px; margin: 1em 0 .3em; }
.md ul, .md ol { padding-left: 1.4em; margin: 0 0 .9em; }
.md li { margin-bottom: .25em; }
.md blockquote {
  margin: 0 0 .9em; padding: 8px 14px; border-left: 3px solid var(--teal);
  background: var(--teal-soft); border-radius: 0 8px 8px 0; color: var(--ink-2);
}
.md hr { border: none; border-top: 1px solid var(--line); margin: 1.4em 0; }
.md table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 1em; }
/* 表格：窄屏可横向滚动，单元格与后台 table.table 保持同一套观感 */
.md-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1em; }
.md-table-wrap table { margin-bottom: 0; min-width: 460px; }
.md table th, .md table td {
  padding: 8px 11px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
}
.md table th:first-child, .md table td:first-child { border-left: 1px solid var(--line); }
.md table thead th {
  background: var(--bg-2); font-size: 13px; font-weight: 700; color: var(--ink-3);
  border-top: 1px solid var(--line); white-space: nowrap;
}
.md table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.md table tbody tr:nth-child(even) { background: rgba(0, 0, 0, .015); }
/* 落款表（公章 / 签字）：无边框、右对齐 */
.md .md-sign { width: auto; min-width: 0; margin: 1.6em 0 .4em; border: none; }
.md .md-sign td { border: none; padding: 0 8px; vertical-align: bottom; text-align: right; white-space: nowrap; }
.md .md-sign img { height: 54px; width: auto; max-width: 100%; }
/* 公章在原件里是方形大图，比签字高得多，按比例放大才不失真 */
.md .md-sign img[src*="seal"] { height: 104px; }
.md .md-sign img + img { margin-left: 10px; }
.md img { max-width: 100%; height: auto; }

/* 相关制度列表（章程 / 职级办法等制度页底部） */
.link-list { display: grid; gap: 10px; }
.link-item {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink); text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.link-item:hover { border-color: var(--teal); background: var(--teal-soft); color: var(--ink); transform: translateY(-1px); }
.link-item b { font-size: 14.5px; }
.link-item span { font-size: 12.5px; color: var(--ink-3); }
.link-item.current { border-style: dashed; background: var(--bg-2); }
.link-item.current b { color: var(--teal-dark); }

/* ---------------- 空状态 / 加载 ---------------- */

/* 蜜罐字段：真人看不见，自动程序会去填（用来识别机器人） */
.hp-field { position: absolute !important; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------- 首页：申请结果公示入口条 ---------------- */
.announce-band {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 14px; text-decoration: none;
  background: linear-gradient(120deg, rgba(240, 180, 41, .14), rgba(31, 158, 143, .14) 55%, rgba(27, 79, 138, .14));
  border: 1px solid rgba(31, 158, 143, .3);
  color: var(--ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.announce-band:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: 0 10px 26px rgba(20, 35, 60, .12); color: var(--ink); }
.announce-band .ico { font-size: 26px; line-height: 1; }
.announce-band .txt { flex: 1 1 auto; min-width: 0; }
.announce-band .txt b { display: block; font-size: 16px; margin-bottom: 3px; }
.announce-band .txt span { display: block; font-size: 13px; color: var(--ink-2); }
.announce-band .go { flex: 0 0 auto; font-weight: 700; color: var(--teal); white-space: nowrap; }
@media (max-width: 640px) {
  .announce-band { flex-wrap: wrap; gap: 10px; }
  .announce-band .txt { flex: 1 1 100%; order: 2; }
  .announce-band .go { order: 3; margin-left: auto; }
}

.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }
.empty .big { font-size: 32px; display: block; margin-bottom: 8px; opacity: .55; }
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--teal);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 留言板 ---------------- */

.post { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: none; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-title { font-weight: 600; font-size: 15px; }
.reply { padding: 12px 16px; border-top: 1px dashed var(--line); background: var(--bg-2); }
.reply .md { font-size: 14px; }

/* ---------------- 任务清单 ---------------- */

.task {
  display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: flex-start;
}
.task:last-child { border-bottom: none; }
.task .box {
  width: 22px; height: 22px; flex: none; border: 2px solid var(--line-strong); border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: transparent; font-size: 13px; margin-top: 2px;
  background: var(--paper); transition: .14s;
}
.task .box:hover { border-color: var(--teal); }
.task.done .box { background: var(--green); border-color: var(--green); color: #fff; }
.task.done .task-title { text-decoration: line-through; color: var(--ink-3); }
.task-title { font-weight: 600; }
.progress { height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--grad); border-radius: 999px; transition: width .3s; }

/* ---------------- 公开页面 ---------------- */

.public-top {
  height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
[data-theme="dark"] .public-top { background: rgba(13, 19, 27, .88); }
.public-top img.logo { height: 34px; width: 34px; object-fit: contain; border-radius: 9px; background: #fff; padding: 2px; }
.public-top .name { font-weight: 700; font-size: 16px; }
.public-top .name small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-3); }
.public-top .links { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.hero {
  position: relative; overflow: hidden; color: #fff; padding: 70px 0 60px;
  background: var(--navy);
}
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .32; }
.hero .veil { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(22,36,58,.94), rgba(27,79,138,.72) 55%, rgba(31,158,143,.55)); }
.hero .inner { position: relative; }
.hero h1 { font-size: 34px; margin-bottom: .3em; letter-spacing: .01em; }
.hero p { font-size: 16px; color: #dfe7f1; max-width: 720px; }
.hero .kpis { display: flex; gap: 26px; margin-top: 26px; flex-wrap: wrap; }
.hero .kpis div b { font-size: 26px; display: block; background: linear-gradient(120deg, #ffd978, #7ce0d3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .kpis div span { font-size: 13px; color: #c4d2e2; }

.section { padding: 44px 0; }
.section-title { font-size: 22px; margin-bottom: 6px; }
.section-sub { color: var(--ink-3); margin-bottom: 22px; font-size: 14px; }

.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); height: 100%; }
.feature .ico { font-size: 24px; margin-bottom: 8px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--ink-3); margin: 0; }

.notice-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.notice-item:last-child { border-bottom: none; }

.public-foot { padding: 28px 0; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; background: var(--paper); }

/* ============================================================
   概览页 / 后台概览：视觉语言
   磨砂玻璃只用在 .glass（一屏最多 3~4 处），其余用卡片 + 三级阴影
   ============================================================ */

/* ---------------- 图标 ---------------- */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* SVG 线性图标（1.5px 描边 / currentColor / 24×24 视框） */
.ic {
  width: 1.15em; height: 1.15em; flex: none; display: inline-block;
  vertical-align: -.19em; fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.ic-sm { width: 1em; height: 1em; }
.ic-lg { width: 1.4em; height: 1.4em; }
.icon-btn .ic { width: 19px; height: 19px; vertical-align: 0; }

/* ---------------- 页面骨架 ---------------- */
.dash { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.dash .grid { margin: 0; }

/* 品牌光斑：玻璃面背后要有东西才好看 */
.glow { position: relative; }
.glow::before, .glow::after {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  filter: blur(60px); opacity: .18; border-radius: 50%;
}
.glow::before {
  top: -90px; left: -60px; width: 380px; height: 260px;
  background: radial-gradient(closest-side, #f0b429, rgba(240, 180, 41, 0));
}
/* 用 max() 夹住半径：负半径会让 radial-gradient 整条失效（光斑直接不显示） */
.glow::after {
  top: -60px; right: max(-30px, calc(100% - 390px)); width: min(420px, calc(100% + 30px)); height: 280px;
  background: radial-gradient(closest-side, rgba(31, 158, 143, .95), rgba(27, 79, 138, 0));
}

/* ---------------- 磨砂玻璃 ---------------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  box-shadow: var(--e2), var(--glass-in);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .glass { background: var(--paper); }
}

/* ---------------- 卡片：三级层次 ---------------- */
.panel {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--e1); overflow: hidden;
  transition: transform var(--t-micro) var(--ease), box-shadow var(--t-micro) var(--ease);
}
.panel-sm { border-radius: var(--radius-card-sm); }
.panel:hover { transform: translateY(-2px); box-shadow: var(--e2); }
.panel-accent::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--grad-bar); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: var(--hair);
}
.panel-head h2, .panel-head h3 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.panel-head h2 .ic, .panel-head h3 .ic { color: var(--ink-3); }
.panel-head .sub { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.panel-body { padding: 18px; }
.panel-body.tight { padding: 10px 14px; }

/* ---------------- 入场：只动 transform / opacity，逐张错开 40ms ---------------- */
@keyframes dashIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.dash .enter {
  opacity: 0;
  animation: dashIn var(--t-enter) var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}

/* ---------------- 骨架屏 shimmer ---------------- */
.sk-wrap { display: flex; flex-direction: column; gap: 16px; }
.sk-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.sk-row:nth-of-type(3) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sk {
  border-radius: var(--radius-card); background: var(--skeleton);
  background-size: 300% 100%; animation: shimmer 1.35s linear infinite;
}
.sk-hero { height: 116px; }
.sk-stat { height: 96px; }
.sk-panel { height: 240px; }
.sk-line { height: 260px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
.sk-note { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 14px; }

/* ---------------- 玻璃欢迎条 ---------------- */
.hero-card { position: relative; }
.hero-in { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; padding: 20px 22px; flex-wrap: wrap; }
.hero-in .who { flex: 1 1 260px; min-width: 0; }
.hero-name { font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.hero-meta { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.hero-meta b { font-variant-numeric: tabular-nums; }
.hero-side { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

/* ---------------- 统计卡 ---------------- */
.stat-card {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 14px 16px 15px; box-shadow: var(--e1);
  transition: transform var(--t-micro) var(--ease), box-shadow var(--t-micro) var(--ease);
  overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--e2); }
.stat-card .k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.stat-card .k .ic { width: 15px; height: 15px; }
.stat-card .n {
  margin-top: 6px; font-size: 27px; font-weight: 700; line-height: 1.15; color: var(--navy);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
[data-theme="dark"] .stat-card .n { color: var(--ink); }
.stat-card.accent .n { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .foot { margin-top: 4px; font-size: 12px; color: var(--ink-3); }

/* ---------------- 可视化 ---------------- */
.row-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
/* 后台概览：图表列 + 常用操作列 */
.admin-cols { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr); gap: 16px; align-items: start; }
.row-charts.col { grid-template-columns: 1fr; gap: 16px; }
.chart-body { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.chart-legend { flex: 1 1 150px; min-width: 130px; display: flex; flex-direction: column; gap: 9px; }
.lg-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.lg-item .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.lg-item b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.lg-item .tag { margin-left: 2px; }

.donut-svg { width: 148px; height: 148px; flex: none; display: block; }
.donut-center { font-size: 27px; font-weight: 700; fill: var(--navy); font-variant-numeric: tabular-nums; }
[data-theme="dark"] .donut-center { fill: var(--ink); }
.donut-sub { font-size: 10.5px; fill: var(--ink-3); }

.spark-svg { width: 100%; max-width: 620px; height: 96px; display: block; }
.axis { font-size: 10px; fill: var(--ink-3); }
.gridline { stroke: var(--line); stroke-width: 1; }
.gridline.dash { stroke-dasharray: 3 5; }

.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-name { flex: 0 0 78px; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1 1 auto; min-width: 0; height: 12px; border-radius: 999px; background: var(--chart-track); overflow: hidden; }
/* 必须是块级：行内元素没有盒，背景和高度都不会生效（条形会整条消失） */
.bar-fill {
  display: block; height: 100%; width: 0; border-radius: 999px;
  transform-origin: left center;
  transition: width 700ms var(--ease);
}
.bar-val { flex: 0 0 auto; min-width: 34px; text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

.stack { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--chart-track); }
.stack > span { display: block; height: 100%; }
.stack-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }

/* 数值动画期间不选中文字，避免闪烁 */
.counting { user-select: none; }

/* 空状态：SVG 图标 + 一行说明，绝不用 emoji */
.empty-ico { color: var(--ink-3); opacity: .6; margin-bottom: 8px; }
.empty-ico .ic { width: 30px; height: 30px; stroke-width: 1.4; }

/* 概览页里的紧凑列表 */
.dash-list { display: flex; flex-direction: column; }
.dash-list .list-item { padding: 11px 2px; }
.dash-list .list-item:last-child { border-bottom: none; }
.dash-list .list-item:hover { background: transparent; }

/* 快捷入口 */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick a {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: var(--radius-card-sm);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-size: 13.5px;
  text-decoration: none; transition: transform var(--t-micro) var(--ease), box-shadow var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease);
}
.quick a:hover { transform: translateY(-2px); box-shadow: var(--e2); border-color: var(--teal); color: var(--teal-dark); text-decoration: none; }
.quick a .ic { color: var(--ink-3); }
.quick a:hover .ic { color: var(--teal); }
.quick a .badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 17px; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-charts { grid-template-columns: 1fr; }
  .admin-cols { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  body { font-size: 14.5px; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 90; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: var(--shadow-lg); height: 100%;
  }
  .sidebar.open { transform: none; }
  .sidebar-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 80; }
  .content { padding: 12px 12px 96px; }
  .topbar { padding: 0 12px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  /* 统计数字卡片在手机上排两列，省一半滚动 */
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; }
  .stat .n { font-size: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 15px; }
  .section { padding: 30px 0; }
  .card-body { padding: 14px; }
  .modal { max-width: 100%; max-height: 92vh; }
  .member-grid { grid-template-columns: 1fr; }

  /* 表格在手机上变成卡片 */
  table.table.responsive thead { display: none; }
  table.table.responsive tbody tr {
    display: block; border: 1px solid var(--line); border-radius: var(--radius-sm);
    margin-bottom: 10px; padding: 8px 12px; background: var(--paper);
  }
  table.table.responsive tbody tr:hover { background: var(--paper); }
  table.table.responsive td { display: flex; gap: 10px; border: none; padding: 4px 0; font-size: 14px; }
  table.table.responsive td::before {
    content: attr(data-label); flex: none; width: 88px; color: var(--ink-3); font-size: 12.5px; padding-top: 2px;
  }
  /* 项目名那一格：名称 / 部门 / 提交人各自占一行，不跟标签挤在一起 */
  .proj-cell { flex: 1; min-width: 0; }

  /* 概览页：单列、图表自适应、绝不横向滚动 */
  .dash { gap: 12px; }
  .dash .grid-2, .dash .grid-3, .dash .grid-4, .dash .row-charts, .admin-cols { grid-template-columns: 1fr; }
  .sk-row, .sk-row:nth-of-type(3) { grid-template-columns: 1fr; }
  .panel-body { padding: 14px; }
  .panel-head { padding: 12px 14px; }
  .hero-in { padding: 15px 16px; gap: 14px; }
  .hero-name { font-size: 17px; }
  .hero-side { gap: 16px; width: 100%; }
  .hero-card .donut-svg { width: 116px; height: 116px; }
  .hero-card .donut-center { font-size: 23px; }
  .stat-card { padding: 12px 13px 13px; }
  .stat-card .n { font-size: 22px; }
  .chart-body { gap: 12px; }
  .bar-name { flex-basis: 62px; font-size: 12.5px; }
  .donut-svg { width: 124px; height: 124px; margin: 0 auto; }
  .spark-svg { height: 88px; }
  .quick { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }

  /* 手机底部导航 */
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: var(--paper); border-top: 1px solid var(--line); padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    flex: 1; text-align: center; padding: 6px 0; font-size: 11px; color: var(--ink-3); text-decoration: none;
    display: flex; flex-direction: column; align-items: center; gap: 1px;
  }
  .bottom-nav a .ico { font-size: 18px; }
  .bottom-nav a.active { color: var(--teal-dark); font-weight: 600; }
}

@media print {
  .sidebar, .topbar, .bottom-nav, .public-top, .no-print { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
  .dash .enter { opacity: 1 !important; animation: none !important; transform: none !important; }
}

/* ============================================================
   首屏加载动画（只在本会话第一次进入时出现）
   设计语言与概览页一致：浅色 + 品牌渐变 + 细线，无 emoji
   ============================================================ */
.splash {
  position: fixed; inset: 0; z-index: 999; display: none;
  align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, #ffffff 0%, #f4f8f8 55%, #e8f0f1 100%);
  /* 硬上限：即使脚本没来得及收，840ms 内也自己淡出 */
  animation: splashHide 220ms var(--ease) 620ms forwards;
}
html.splash-on .splash { display: flex; }
@keyframes splashHide { to { opacity: 0; visibility: hidden; } }
.splash-inner { width: min(300px, 74vw); text-align: center; }
.splash-logo {
  width: 64px; height: 64px; object-fit: contain; border-radius: 18px; background: #fff;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .10), 0 0 0 1px rgba(16, 24, 40, .04);
  animation: splashPop 420ms var(--ease) both;
}
.splash-name { margin-top: 16px; font-size: 19px; font-weight: 700; letter-spacing: .16em; color: var(--navy); }
.splash-en { margin-top: 3px; font-size: 10px; font-weight: 600; letter-spacing: .32em; color: var(--ink-3); }
.splash-bar {
  position: relative; height: 2px; margin-top: 22px; border-radius: 999px; overflow: hidden;
  background: rgba(16, 24, 40, .08);
}
.splash-bar > span {
  position: absolute; inset: 0; transform-origin: left center;
  background: var(--grad-bar); animation: splashGrow 520ms var(--ease) both;
}
.splash.splash-out { opacity: 0; transition: opacity 220ms var(--ease); pointer-events: none; }
[data-theme="dark"] .splash { background: radial-gradient(120% 120% at 50% 0%, #16202d 0%, #111a25 55%, #0d131b 100%); }
[data-theme="dark"] .splash-name { color: var(--ink); }
@keyframes splashGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes splashPop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

/* ============================================================
   列表工具条：筛选 chip / 排序下拉 / 升降序开关
   ============================================================ */
.select-sm { width: auto; min-width: 112px; padding: 5px 30px 5px 11px; font-size: 13px; border-radius: 999px; }
.chip .ic { width: 14px; height: 14px; }
.counter { font-variant-numeric: tabular-nums; }
.counter.over { color: var(--red); font-weight: 600; }
.clickable { cursor: pointer; }

/* ---------------- 公会公文 ---------------- */
.doc-item { cursor: pointer; }
.doc-item:hover .doc-title { color: var(--teal-dark); }
.doc-title { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.doc-no { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.doc-body { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.85; color: var(--ink-2); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------------- 周报素材 / 周报 ---------------- */
.weekly-item { padding: 12px 0; border-bottom: var(--hair); }
.weekly-item:last-child { border-bottom: none; }
.weekly-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.mini-text { white-space: pre-wrap; word-break: break-word; }

/* ---------------- 减少动效 ---------------- */
/* 关掉入场、数字滚动、图表生长与过渡，只保留 opacity 变化 */
@media (prefers-reduced-motion: reduce) {
  .splash { animation: splashHide 150ms linear 0ms forwards; }
  .splash-logo { animation: none; }
  .splash-bar > span { animation: splashGrow 120ms linear both; }
  .splash.splash-out { transition-duration: 150ms; }
  .dash .enter {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .panel, .stat-card, .quick a, .member-card, .btn { transition: none !important; }
  .panel:hover, .stat-card:hover, .quick a:hover { transform: none !important; }
  .bar-fill, .seg-thumb { transition: none !important; }
  .sk { animation: none !important; background: var(--chart-track); }
  .spinner { animation-duration: 1.6s; }
  * { scroll-behavior: auto !important; }
}

/* ============================================================
   职级体系（第一批）：徽章 / 阶梯 / 签到卡 / 岗位卡
   ============================================================ */

/* 职级徽章：M 技术序列（青）/ A 行政序列（金）/ P 通行证持有人（紫，独立配色） */
.rank-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 9px 1px 7px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 20px;
  white-space: nowrap; border: 1px solid transparent;
}
.rank-badge .code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  padding: 0 5px; border-radius: 999px; background: rgba(255, 255, 255, .55);
}
.rank-badge.m { background: var(--teal-soft); color: var(--teal-dark); border-color: rgba(31, 138, 146, .22); }
.rank-badge.a { background: var(--gold-soft); color: var(--gold-dark); border-color: rgba(217, 154, 43, .28); }
/* P 通行证持有人：紫色徽章，和 M（青）/ A（金）明确区分 */
.rank-badge.p { background: var(--purple-soft); color: var(--purple); border-color: rgba(106, 79, 179, .3); }
[data-theme="dark"] .rank-badge .code { background: rgba(0, 0, 0, .28); }

/* 签到卡 */
.checkin-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.checkin-nums > div {
  background: var(--bg-2); border-radius: var(--radius-sm); padding: 10px 12px; text-align: center;
}
.checkin-nums b { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; }
.checkin-nums span { font-size: 11.5px; color: var(--ink-3); }
.checkin-btn { width: 100%; padding: 12px 18px; font-size: 15.5px; border-radius: 12px; }
.checkin-btn:disabled { opacity: .75; }

/* 两条路径预估值 */
.eta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.eta-card {
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  padding: 9px 12px; background: var(--bg-2);
}
.eta-card b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; margin: 2px 0; }

/* 职级阶梯（M6 → M0 / A3 → A00 竖排） */
.ladder { display: flex; flex-direction: column; gap: 8px; }
.ladder-step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--paper);
}
.ladder-step .lv {
  flex: none; width: 44px; text-align: center; font-weight: 700; font-size: 13px;
  padding: 3px 0; border-radius: 8px; background: var(--bg-2); color: var(--ink-2);
}
.ladder-step.done { background: var(--bg-2); }
.ladder-step.done .lv { color: var(--teal-dark); background: var(--teal-soft); }
.ladder-step.current {
  border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft);
}
.ladder-step.current .lv { background: var(--teal); color: #fff; }

/* 岗位空缺一览 */
.office-dept { margin-bottom: 18px; }
.office-dept:last-child { margin-bottom: 0; }
.office-dept > .row-between { margin-bottom: 8px; }
.office-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.office-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; background: var(--paper);
  display: flex; flex-direction: column; gap: 7px;
}
.office-card.vacant { border-style: dashed; background: var(--bg-2); }
.office-card .t { font-weight: 600; font-size: 14px; }
.office-holders { display: flex; flex-direction: column; gap: 5px; min-height: 24px; }
.office-holder { display: flex; align-items: center; gap: 7px; font-size: 13px; min-width: 0; }
/* 在任者一行显示「在任：名字 + 游戏ID」：卡片窄时整行省略，不撑破卡片 */
.office-holder .holder-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 780px) {
  .eta-grid { grid-template-columns: 1fr; }
  .office-grid { grid-template-columns: 1fr; }
  .checkin-nums b { font-size: 19px; }
  .ladder-step { padding: 10px 11px; }
}

/* ---------------- 新人礼包（第三批） ---------------- */

.gift-line {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding-top: 8px; border-top: 1px dashed var(--line);
}
.gift-line .gift-no { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.gift-line .btn { margin-left: auto; }

.gift-meta {
  display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: baseline;
  padding: 10px 12px; background: var(--bg-2); border-radius: var(--radius-sm);
}
.gift-meta .label { display: inline; margin-right: 6px; }
.gift-lead { margin: 14px 0 8px; font-size: 13px; color: var(--ink-3); }

.gift-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.gift-step {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
  transition: border-color .16s, background .16s;
}
.gift-step.copied { border-color: var(--green); background: var(--green-soft); }
.gift-step-no {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.gift-step.copied .gift-step-no { background: var(--green); }
.gift-step-lbl { flex: none; width: 104px; font-size: 13px; color: var(--ink-2); }
.gift-cmd {
  flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-2); font-family: ui-monospace, Consolas, monospace; font-size: 13px;
  overflow-wrap: anywhere; color: var(--ink);
}
.gift-step.copied .gift-cmd { background: var(--paper); }
.gift-step-state { flex: none; white-space: nowrap; }
.gift-copy { flex: none; min-height: 40px; white-space: nowrap; }
/* 指令文本必须能手动选中（浏览器拒绝写剪贴板时靠用户自己 Ctrl+C） */
.gift-cmd { user-select: text; -webkit-user-select: text; }
/* 「复制」的本地 / 服务器状态：进度、单项未同步标记、窗口底部整行提醒 */
.gift-progress { margin-left: 8px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.gift-sync { flex: none; white-space: nowrap; }
.gift-sync[hidden] { display: none; }
.gift-sync-tip {
  margin-top: 10px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--gold-soft); border: 1px solid rgba(217, 154, 43, .35);
  color: var(--gold-dark); font-size: 12.5px; line-height: 1.6;
}
.gift-sync-tip[hidden] { display: none; }
.gift-hint { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }

@media (max-width: 640px) {
  .gift-step { flex-wrap: wrap; }
  .gift-step-lbl { width: auto; }
  .gift-cmd { flex-basis: 100%; order: 3; }
  .gift-step-state { margin-left: auto; }
  .gift-copy { width: 100%; min-height: 44px; order: 4; }
  .gift-sync { order: 5; margin-left: 0; }
  .gift-progress { display: block; margin: 3px 0 0; }
}

/* ---------------- 岗位直接任命（仅最高管理员，2026-10-26） ---------------- */

/* 岗位卡上的「任命 / 改任 / 免除」：白底细边，样式次要，不抢竞聘按钮 */
.office-admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.office-admin-actions .btn {
  background: transparent; border-color: var(--line-strong); color: var(--ink-2);
}
.office-admin-actions .btn:hover { background: var(--bg-2); border-color: var(--ink-3); color: var(--ink); }

/* 任命弹窗里的成员选择列表 */
.appoint-pick {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  max-height: 232px; overflow-y: auto; background: var(--paper);
}
.pick-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer;
}
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: var(--bg-2); }
.pick-item.sel { background: var(--teal-soft); box-shadow: inset 3px 0 0 var(--teal); }
.pick-item .pick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-empty { padding: 16px 12px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* ============================================================
   我的证件（#/my-card 版块内视图，2026-10-27）
   卡面本身由 card-canvas.js 绘制，这里只管排版、等比缩放、手机端与打印
   ============================================================ */
.cv-head { align-items: flex-start; }
.cv-head-txt { min-width: 0; }
.cv-sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; line-height: 1.6; }
.cv-toolbar { display: flex; flex-wrap: wrap; gap: 10px; }
.cv-toolbar .btn { padding: 10px 18px; font-size: 14px; }

/* 卡面舞台：画布按容器宽度等比缩放，永远不横向溢出 */
.cv-stage {
  position: relative; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px;
}
.cv-canvas { display: block; width: 100%; max-width: 856px; height: auto; margin: 0 auto; background: transparent; }
.cv-canvas.cv-tall { max-width: 700px; border-radius: 12px; box-shadow: var(--shadow); }

/* 首帧骨架：盖在画布上，画好就移除（避免卡面未生成时闪白 / 跳高） */
.cv-skel {
  position: absolute; inset: 12px; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.cv-skel .sk { position: absolute; inset: 0; border-radius: 12px; }
.cv-skel-note {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.cv-px { margin-top: 10px; }

/* 证件信息（5 项：前 3 项一行，后 2 项各占半行） */
.cv-meta { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cv-meta > div { grid-column: span 2; }
.cv-meta > div:nth-child(4), .cv-meta > div:nth-child(5) { grid-column: span 3; }
.cv-meta .k { font-size: 12px; color: var(--ink-3); }
.cv-meta .v { font-size: 15px; font-weight: 600; margin-top: 3px; word-break: break-all; }

/* 关于验真 */
.cv-about-row { display: flex; gap: 12px; align-items: flex-start; }
.cv-about-row .ico { font-size: 22px; line-height: 1.2; }

@media (max-width: 640px) {
  .cv-meta { grid-template-columns: 1fr 1fr; }
  .cv-meta > div, .cv-meta > div:nth-child(4), .cv-meta > div:nth-child(5) { grid-column: auto; }
  .cv-meta > div:last-child { grid-column: span 2; }
  .cv-toolbar { gap: 8px; }
  /* 手机上两列排布，按钮不挤成一团 */
  .cv-toolbar .btn { flex: 1 1 46%; padding: 10px 8px; font-size: 13px; white-space: normal; }
  .cv-stage { padding: 8px; }
  .cv-skel { inset: 8px; }
}

/* 打印 / 存 PDF：只印证件，侧栏、顶栏、按钮、提示、说明块全部隐藏 */
@media print {
  .cv-toolbar-wrap, .cv-toolbar, .cv-px, .cv-about, .cv-skel, .toast-wrap { display: none !important; }
  .cv-stage { background: none; border: none; padding: 0; }
  .cv-canvas { max-width: 180mm !important; }
  .cv-canvas.cv-tall { max-width: 150mm !important; box-shadow: none !important; border-radius: 0 !important; }
  .cv-meta { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .card { border: none !important; box-shadow: none !important; margin-bottom: 10px !important; }
}

/* ---------------- 公文管理（第三批）：PDF 附件上传区 ---------------- */
.doc-form-body { min-height: 220px; }
.doc-attach {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 12px 14px;
  transition: border-color var(--t-micro) var(--ease), background var(--t-micro) var(--ease);
}
.doc-attach:hover { border-color: var(--teal); background: var(--teal-soft); }
.doc-attach-ico {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--teal); background: var(--teal-soft); border: 1px solid rgba(31, 138, 146, .18);
}
.doc-attach-ico .ic { width: 18px; height: 18px; }
.doc-attach-state { font-size: 13.5px; line-height: 1.6; word-break: break-all; }
.doc-attach-state b { font-weight: 600; color: var(--ink); }
.doc-attach [hidden] { display: none !important; }
.doc-admin-table td .doc-title { word-break: break-word; }
@media (max-width: 720px) {
  .doc-admin-table td[data-label="操作"] .row { flex-wrap: wrap; }
}

/* ============================================================
   手机端适配补充（2026-11-06）
   —— 只补窄屏缺失的规则；780px 里已有的响应式（侧栏抽屉、
      表格转卡片、底部导航）保持原样，不做重写。
   ============================================================ */

/* ① 公开顶栏：原来 .public-top 固定 64px 高、且子项不换行，
   390px 下 5 个导航按钮被折成 3 行后溢出，压在下面的标题 / 头图上。
   这里改成「高度自适应 + 允许换行」，按钮不再被裁掉。 */
@media (max-width: 780px) {
  .public-top {
    height: auto; min-height: 58px; padding: 6px 16px;
    flex-wrap: wrap; row-gap: 6px;
  }
  .public-top .name { min-width: 0; font-size: 15px; line-height: 1.25; }
  .public-top .name small { font-size: 10.5px; }
  /* 内容区左右留白 12px → 16px */
  .content { padding-left: 16px; padding-right: 16px; }
  .topbar { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 640px) {
  /* 导航按钮排成一行、横向可滑，不再挤成两三行 */
  .public-top .links {
    width: 100%; margin-left: 0; flex-wrap: nowrap; gap: 4px;
    overflow-x: auto; padding: 2px 0 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .public-top .links::-webkit-scrollbar { display: none; }
  .public-top .links .btn { flex: 0 0 auto; min-height: 44px; font-size: 14px; }

  /* ② 表单：输入框满宽 + 16px 字号（iOS 聚焦时不再自动放大页面） */
  .input, .select, .textarea { font-size: 16px; min-height: 44px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }

  /* ③ 可点区域：按钮 ≥44px */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 44px; font-size: 14px; padding: 6px 12px; }
  .icon-btn { min-width: 44px; min-height: 44px; }

  /* ④ 首页「加入我们」的三个按钮：竖排满宽，不再一长一短 */
  #applyActions { flex-direction: column; align-items: stretch; }
  #applyActions .btn { width: 100%; }
}

