/* =============================================================================
   塘溪源著小区服务系统 · 设计系统 v3
   基调：深翡翠主色 + 暖白纸面 + 发丝级分割 + 多层柔光
   原则：高级感来自克制——只用一种强调色，靠留白、字距与光影分层拉开档次
   ============================================================================= */

:root {
  /* 主色：深翡翠（比 v2 更沉、更少荧光感） */
  --primary: #12a594;
  --primary-hover: #0e9488;
  --primary-dark: #0c8578;
  --primary-soft: #e6f5f3;
  --primary-line: #bfe7e1;
  --primary-glow: rgba(18, 165, 148, 0.22);

  /* 中性色：冷灰偏绿，避免纯灰的廉价感 */
  --ink: #0f1729;
  --text: #334155;
  --muted: #5b6b80;
  --muted-2: #6e7f92;
  --line: #e3e8ee;
  --line-soft: #edf1f5;
  --bg: #f1f4f7;
  --panel: #ffffff;
  --white: #ffffff;

  /* 语义色 */
  --danger: #d95454;
  --danger-soft: #fdeeee;
  --warning: #c47a12;
  --warning-soft: #fdf4e6;
  --info: #2b8faf;
  --info-soft: #e8f3f8;
  --purple: #6c55c8;
  --purple-soft: #f1edfc;
  --teal: #12a594;
  --teal-soft: #e6f5f3;
  --success: #12a594;
  --success-soft: #e6f5f3;

  /* 光影：只用两级——贴地（分组）和浮起（弹层） */
  --shadow-xs: 0 1px 2px rgba(15, 23, 41, 0.05), 0 1px 3px rgba(15, 23, 41, 0.04);
  --shadow-sm: 0 1px 2px rgba(15, 23, 41, 0.05), 0 1px 3px rgba(15, 23, 41, 0.04);
  --shadow-md: 0 12px 32px -12px rgba(15, 23, 41, 0.22), 0 2px 6px rgba(15, 23, 41, 0.05);
  --shadow-lg: 0 12px 32px -12px rgba(15, 23, 41, 0.22), 0 2px 6px rgba(15, 23, 41, 0.05);
  --ring: 0 0 0 3px rgba(18, 165, 148, 0.14);

  /* 圆角：两档——控件/卡片 6px，浮层 10px */
  --radius-xs: 6px;
  --radius-sm: 6px;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-xl: 10px;

  /* 渐变：只保留深色 hero 与主色两块，其余语义色用纯色 */
  --grad-navy: linear-gradient(118deg, #0b2029 0%, #0e2e38 44%, #12414a 100%);
  --grad-teal: linear-gradient(118deg, #0a7c72 0%, #12a594 55%, #2bbfae 100%);
  --grad-green: #12a594;
  --grad-orange: #c47a12;
  --grad-purple: #6c55c8;
  --grad-red: #d95454;
  --grad-blue: #2b8faf;

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.72, 0.28, 1);
  --dur: 0.2s;

  --sidebar-w: 238px;
  --topbar-h: 64px;

}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h1 { font-size: 25px; letter-spacing: -0.03em; }
h2 { font-size: 18.5px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
a { color: var(--primary-dark); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; }
svg { flex-shrink: 0; }

::selection { background: rgba(18, 165, 148, 0.18); color: var(--ink); }

/* 焦点可见：键盘可达性（WCAG 2.2） */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #d3dedb; border-radius: 99px;
  border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #b9c8c4; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------- 工具类 */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.grid { display: grid; gap: 20px; }
.grid > *, .pub-grid > *, .entry-grid > *, .stat-strip > *, .stat-cards > *, .module-grid > * { min-width: 0; }
.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)); }
.hidden { display: none; }

/* ------------------------------------------------------------- 按钮
   主操作：实心主色 / 次操作：白底描边 / 文字操作：.btn-link / 危险：实心红
   统一 6px 圆角，不做胶囊；hover 只变颜色，不做位移和发光 */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { background: var(--primary-hover); color: #fff; }
.btn:active { background: var(--primary-dark); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
  box-shadow: none;
}
.btn-ghost:hover {
  background: #fff;
  border-color: var(--primary-line);
  color: var(--primary-dark);
}
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); box-shadow: none; }
.btn-soft:hover { background: #d9f0ec; color: var(--primary-dark); box-shadow: none; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #c94a4a; }
.btn-dark { background: #24373d; }
.btn-dark:hover { background: #16262b; }
.btn-white { background: #fff; color: var(--primary-dark); box-shadow: none; }
.btn-white:hover { background: #f2f7f5; color: var(--primary-dark); }
/* 文字操作：用于表格行内、卡片右上角等次要位置 */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  height: auto;
  border: 0;
  background: none;
  color: var(--primary-dark);
  font-size: 13px;
  cursor: pointer;
}
.btn-link:hover { color: var(--primary); text-decoration: underline; background: none; }
.btn-pill { border-radius: var(--radius-sm); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-sm.btn-pill { border-radius: var(--radius-sm); }
.btn-lg { height: 46px; padding: 0 26px; font-size: 14.5px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }

/* 表格内迷你操作 */
.act {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(43, 143, 175, 0.12);
  cursor: pointer;
  background: var(--info-soft);
  color: var(--info);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap;
}
.act:hover { color: var(--info); background: #dfeaf7; border-color: rgba(43, 143, 175, 0.2); }
.act-danger { background: var(--danger-soft); color: #bf4444; border-color: rgba(217, 84, 84, 0.14); }
.act-danger:hover { background: #fbe2e2; color: #b03a3a; }
.act-warn { background: var(--warning-soft); color: #a86409; border-color: rgba(196, 122, 18, 0.14); }
.act-warn:hover { background: #fbedd6; color: #96590a; }
.act-plain { background: #f4f7f7; color: var(--text); border-color: rgba(0, 0, 0, 0.04); }
.act-plain:hover { background: #edf2f2; color: var(--text); }

/* ------------------------------------------------------------- 徽标 */
.badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.badge-success { background: var(--success-soft); color: #0a7355; box-shadow: inset 0 0 0 1px rgba(18, 165, 148, 0.1); }
.badge-warning { background: var(--warning-soft); color: #9c610f; box-shadow: inset 0 0 0 1px rgba(196, 122, 18, 0.12); }
.badge-info { background: var(--info-soft); color: #2a6099; box-shadow: inset 0 0 0 1px rgba(43, 143, 175, 0.1); }
.badge-danger { background: var(--danger-soft); color: #b93d3d; box-shadow: inset 0 0 0 1px rgba(217, 84, 84, 0.12); }
.badge-muted { background: #f2f6f6; color: #6f828a; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03); }
.badge-purple { background: var(--purple-soft); color: #57409f; box-shadow: inset 0 0 0 1px rgba(108, 85, 200, 0.1); }

/* ------------------------------------------------------------- 卡片 */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-hover { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.card-hover:hover { box-shadow: var(--shadow-md); border-color: #d3e7e4; }
.card-pad { padding: 22px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.card-head h2, .card-head h3 { font-size: 14.5px; }
.card-head .head-title { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.card-head .head-title h3 { color: var(--ink); }
.card-body { padding: 22px; }
.card-body-flush { padding: 0; }
.card-foot {
  padding: 13px 22px;
  border-top: 1px solid var(--line-soft);
  background: #fbfcfd;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* 区块标题 */
.block-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.block-title .ic {
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-dark);
}
.block-title h2 { font-size: 16px; }

/* ------------------------------------------------------------- 表单 */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row { margin-bottom: 18px; }
.form-row:last-child { margin-bottom: 0; }
label.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: #55666d;
  letter-spacing: 0.01em;
}
label.field-label .req { color: var(--danger); margin-left: 2px; }
.field-hint { margin-top: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }

input[type="text"], input[type="password"], input[type="tel"], input[type="email"],
input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"],
select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfc;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
input::placeholder, textarea::placeholder { color: #a9b8be; }
input:hover, select:hover, textarea:hover { border-color: #d7e2e0; }
input:focus, select:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--primary);
  box-shadow: var(--ring);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.75; }
input[type="file"] { font-size: 13px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364757d' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.field-error { margin-top: 6px; font-size: 11.5px; color: var(--danger); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--primary); }

/* 可选卡片（权限分配） */
.check-card {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 12.5px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  min-width: 0;
}
.check-card:hover { border-color: var(--primary-line); background: #fbfcfd; }
.check-card:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary-line);
  color: var(--primary-dark);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(18, 165, 148, 0.06);
}

/* 搜索框 */
.searchbar { position: relative; display: flex; align-items: center; }
.searchbar svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.searchbar input { padding-left: 40px; height: 42px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-xs); }
.searchbar input:focus { box-shadow: var(--ring), var(--shadow-xs); }

/* ------------------------------------------------------------- 表格 */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  background: #f8fafc;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
table.data th:first-child { padding-left: 22px; }
table.data th:last-child { padding-right: 22px; }
table.data td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  color: var(--text);
}
table.data td:first-child { padding-left: 22px; }
table.data td:last-child { padding-right: 22px; }
table.data tbody tr { transition: background var(--dur) var(--ease); }
table.data tbody tr:hover { background: linear-gradient(90deg, rgba(18, 165, 148, 0.045), rgba(18, 165, 148, 0) 55%); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data .row-actions { display: flex; gap: 6px; justify-content: flex-end; }
table.data a { color: var(--ink); font-weight: 500; }
table.data a:hover { color: var(--primary); }

/* ------------------------------------------------------------- 提示 */
.alert {
  display: flex;
  flex-wrap: wrap;
  border-left-width: 3px;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-soft); color: #0a7355; border-color: var(--primary-line); }
.alert-error { background: var(--danger-soft); color: #b03a3a; border-color: #f3d0d0; }
.alert-info { background: var(--info-soft); color: #265d8f; border-color: #d5e5f5; }
.alert-warning { background: var(--warning-soft); color: #9a610d; border-color: #f5e0c2; }

.empty {
  padding: 52px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty strong { display: block; margin-bottom: 6px; color: var(--text); font-weight: 500; font-size: 14px; }
.empty .empty-ic {
  width: 50px; height: 50px; margin: 0 auto 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #f7f9fb, #eef4f2);
  color: #b9c9c4;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

/* ------------------------------------------------------------- 分页 */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
  box-shadow: var(--shadow-xs);
  transition: all var(--dur) var(--ease);
}
.pagination a:hover { border-color: var(--primary-line); color: var(--primary-dark); }
.pagination .is-current { background: var(--primary); border-color: transparent; color: #fff; box-shadow: none; }
.pagination .is-disabled { color: #cbd7d4; box-shadow: none; }
.pagination .gap { border: none; background: none; box-shadow: none; color: var(--muted); }

/* =============================================================================
   后台框架
   ============================================================================= */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fcfefd 100%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--topbar-h);
  padding: 0 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.sidebar-brand small { display: block; font-size: 10.5px; color: var(--muted-2); font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.brand-mark {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--grad-green);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 1px 1px rgba(12, 133, 120, 0.3), 0 6px 14px rgba(18, 165, 148, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  flex-shrink: 0;
}

.sidebar-nav { padding: 10px 10px 20px; flex: 1; overflow-y: auto; }
.nav-group-label { padding: 14px 10px 6px; font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted-2); text-transform: uppercase; }

.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px 8px 14px;
  margin-bottom: 1px;
  border-radius: var(--radius-sm);
  color: #56686f;
  font-size: 13px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.sidebar-nav a:hover { background: #f5faf8; color: var(--primary-dark); }
.sidebar-nav a.is-active {
  background: linear-gradient(90deg, rgba(18, 165, 148, 0.13), rgba(18, 165, 148, 0.045));
  color: var(--primary-dark);
  font-weight: 600;
}
.sidebar-nav a.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 16px;
  transform: translateY(-50%);
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}
.sidebar-nav a svg { width: 16px; height: 16px; opacity: 0.78; }
.sidebar-nav a.is-active svg { opacity: 1; color: var(--primary); }

/* 折叠分组 */
.nav-group { border: none; }
.nav-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  margin-bottom: 1px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: #6a7c83;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: #f7fbf9; color: var(--primary-dark); }
.nav-group > summary .sum-main { display: flex; align-items: center; gap: 10px; }
.nav-group > summary .chev { color: #b6c6c2; display: inline-flex; }
.nav-group > summary .chev svg { transition: transform var(--dur) var(--ease); transform: rotate(-90deg); }
.nav-group[open] > summary .chev svg { transform: rotate(0deg); }
.nav-group .nav-items { padding-left: 10px; margin-left: 13px; border-left: 1px solid var(--line); }
.nav-group .nav-items a { font-size: 12.5px; padding: 7px 10px 7px 12px; }
.nav-group .nav-items a svg { width: 14px; height: 14px; }
.nav-group.is-current > summary { color: var(--primary-dark); font-weight: 600; }

.sidebar-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  flex-shrink: 0;
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 380px at 58% -12%, #e6f2f2 0%, rgba(233, 246, 240, 0) 62%),
    var(--bg);
}
.nav-toggle {
  display: none;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  align-items: center; justify-content: center;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  box-shadow: var(--shadow-xs);
}
.nav-toggle:hover { border-color: var(--primary-line); color: var(--primary-dark); }
.nav-mask { display: none; }

.admin-topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-brand { display: none; }
.topbar-left .dotline { width: 1px; height: 20px; background: var(--line); }
.admin-topbar .crumb { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.admin-topbar .crumb-sep { font-size: 12px; color: #cfdad7; margin: 0 -6px; }
.admin-topbar .page-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-topbar .user-box { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad-green);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--primary-line);
  flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; }
.user-meta .n { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.user-meta .r { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.03em; }
.role-switch { margin-left: 5px; color: var(--primary-dark); text-decoration: none; }
.role-switch:hover { color: var(--primary); text-decoration: underline; }

.admin-content { padding: 22px 24px 44px; flex: 1; }
@media (min-width: 1560px) {
  .admin-content { width: 100%; max-width: 1460px; margin: 0 auto; }
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }

/* 深色页头：单一底色，无光晕/网格/噪点 */
.admin-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background: var(--grad-navy);
  box-shadow: var(--shadow-xs);
}
.admin-hero .hero-body { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; min-width: 0; }
.admin-hero .hero-ic {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.admin-hero .hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 7px;
}
.admin-hero h1, .admin-hero h2 {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 5px;
}
.admin-hero p { margin: 0; color: rgba(255, 255, 255, 0.66); font-size: 12.5px; letter-spacing: 0.01em; }
.admin-hero .hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.admin-hero .hero-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.hero-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.hero-panel .hp-item { display: flex; flex-direction: column; gap: 2px; }
.hero-panel .hp-k { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.52); }
.hero-panel .hp-v { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.2; }
.hero-panel .hp-v small { font-size: 11px; font-weight: 500; margin-left: 1px; color: rgba(255, 255, 255, 0.6); }
.hero-panel .hp-sep { width: 1px; height: 26px; background: rgba(255, 255, 255, 0.14); }
.admin-hero .hero-actions .btn {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}
.admin-hero .hero-actions .btn:hover { background: #f4fbf8; color: var(--primary-dark); }
.admin-hero .hero-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  backdrop-filter: blur(6px);
  box-shadow: none;
}
.admin-hero .hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.admin-hero .btn-glass { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; box-shadow: none; }
.admin-hero .btn-glass:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.admin-hero .btn-white { background: #fff; color: var(--primary-dark); }

.admin-hero.is-green { background: #0f8c7e; }
.admin-hero.is-blue { background: #26628f; }
.admin-hero.is-orange { background: #a86813; }
.admin-hero.is-teal { background: #0b7a72; }
.admin-hero.is-purple { background: #57409f; }
.admin-hero.is-red { background: #b34a44; }
.admin-hero.is-navy { background: var(--grad-navy); }
.admin-hero.is-plain { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.admin-hero.is-plain::before, .admin-hero.is-plain::after { display: none; }
.admin-hero.is-plain h1, .admin-hero.is-plain h2 { color: var(--ink); }
.admin-hero.is-plain p { color: var(--muted); }
.admin-hero.is-plain .hero-tag { color: var(--muted-2); }
.admin-hero.is-plain .hero-ic { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); }

/* 统计卡 */
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-sm); border-color: #d5e6e4; }
.stat-card .stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-card .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; letter-spacing: 0.01em; }
.stat-card .value {
  font-size: 29px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1.15;
}
.stat-card .meta { font-size: 11.5px; color: var(--muted-2); margin-top: 5px; }
.stat-card .stat-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(18, 165, 148, 0.08);
}
.stat-card .stat-icon.blue { background: #e9f1fb; color: #2f6fb0; box-shadow: inset 0 0 0 1px rgba(43, 143, 175, 0.08); }
.stat-card .stat-icon.green { background: #e6f5f3; color: #0d8f82; box-shadow: inset 0 0 0 1px rgba(18, 165, 148, 0.08); }
.stat-card .stat-icon.orange { background: #fdf3e5; color: #c47a12; box-shadow: inset 0 0 0 1px rgba(196, 122, 18, 0.08); }
.stat-card .stat-icon.purple { background: #f1edfc; color: #6c55c8; box-shadow: inset 0 0 0 1px rgba(108, 85, 200, 0.08); }
.stat-card .stat-icon.red { background: #fdeeee; color: #cf4a4a; box-shadow: inset 0 0 0 1px rgba(217, 84, 84, 0.08); }
.stat-card .stat-icon.teal { background: #e6f5f3; color: #12a594; box-shadow: inset 0 0 0 1px rgba(18, 165, 148, 0.08); }

/* 功能磁贴 */
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.module-card {
  position: relative;
  display: block;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.module-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d8e8e2;
  color: inherit;
}
.module-card .mc-top { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; }
.module-card .mc-ic {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgba(18, 165, 148, 0.07);
}
.module-card .mc-ic.blue { background: #e9f1fb; color: #2f6fb0; }
.module-card .mc-ic.orange { background: #fdf3e5; color: #c47a12; }
.module-card .mc-ic.purple { background: #f1edfc; color: #6c55c8; }
.module-card .mc-ic.red { background: #fdeeee; color: #cf4a4a; }
.module-card .mc-ic.teal { background: #e6f5f3; color: #12a594; }
.module-card .mc-ic.green { background: #e6f5f3; color: #0d8f82; }
.module-card h3 { font-size: 13.5px; margin: 0 0 3px; color: var(--ink); }
.module-card p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.module-card .mc-badge {
  position: absolute;
  top: 14px; right: 14px;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(217, 84, 84, 0.32);
}

/* 标签页 / 分段控件 */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.tabs a, .tabs button {
  height: 33px;
  padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--dur) var(--ease);
}
.tabs a:hover, .tabs button:hover { border-color: var(--primary-line); color: var(--primary-dark); }
.tabs a.is-active, .tabs button.is-active {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
  font-weight: 500;
  box-shadow: none;
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: var(--shadow-xs);
}
.seg::-webkit-scrollbar { display: none; }
.seg a, .seg button {
  height: 31px;
  padding: 0 15px;
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.seg a:hover, .seg button:hover { color: var(--primary-dark); }
.seg .is-active { background: var(--primary); color: #fff; font-weight: 500; box-shadow: none; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar input, .filter-bar select { width: auto; min-width: 150px; height: 38px; padding: 0 12px; }
.filter-bar input[type="search"] { flex: 1 1 240px; min-width: 240px; max-width: 420px; }
.filter-bar select { flex: 0 0 auto; }

/* 进度条 */
.progress { height: 6px; border-radius: 999px; background: #edf2f1; overflow: hidden; }
.progress > span {
  display: block; height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.5s var(--ease);
}
.progress.is-blue > span { background: var(--info); }
.progress.is-orange > span { background: var(--warning); }

/* 时间线 */
.timeline { list-style: none; position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 18px 8px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute; left: -19px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary-line);
  box-shadow: 0 0 0 3px #fff;
}
.timeline li.is-current::before { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(18, 165, 148, 0.14); }
.timeline .time { font-size: 11.5px; color: var(--muted-2); }

.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.detail-list .item .k { font-size: 11.5px; color: var(--muted-2); margin-bottom: 2px; letter-spacing: 0.02em; }
.detail-list .item .v { font-size: 13.5px; color: var(--text); }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.image-grid a { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.image-grid img { width: 100%; height: 100px; object-fit: cover; transition: transform 0.3s var(--ease); }
.image-grid a:hover img { transform: scale(1.02); }

/* =============================================================================
   前台
   ============================================================================= */
body.is-public {
  background:
    radial-gradient(1100px 460px at 10% -8%, #e7f3f2 0%, rgba(231, 243, 242, 0) 60%),
    radial-gradient(900px 420px at 94% 2%, #e8f0f8 0%, rgba(232, 240, 248, 0) 56%),
    linear-gradient(180deg, #f6f8fb 0%, #f1f4f7 100%);
  background-attachment: fixed;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 244, 247, 0.84);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(228, 234, 236, 0.9);
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); font-size: 15.5px; letter-spacing: -0.01em; }
.brand small { display: block; font-size: 10.5px; color: var(--muted-2); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: #4f626a;
  font-size: 13px;
  transition: all var(--dur) var(--ease);
}
.site-nav a:hover { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-xs); }
.site-nav a.is-active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 500; }
.site-actions { display: flex; align-items: center; gap: 8px; }

/* 首页 Hero：极光 + 细网格 */
.hero { position: relative; padding: 60px 0 12px; text-align: center; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.14); }
.hero h1 {
  color: var(--ink);
  font-size: 42px;
  line-height: 1.24;
  margin-bottom: 16px;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, #0e9488 0%, #2fb8a8 55%, #2f9ec4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--muted); font-size: 14.5px; line-height: 1.85; margin: 0 auto 28px; max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero .btn-white { background: #fff; color: var(--primary-dark); border-color: var(--line); box-shadow: var(--shadow-xs); }
.hero .btn-white:hover { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-sm); }
.hero .btn-outline { background: rgba(255, 255, 255, 0.6); border-color: var(--line); color: var(--text); box-shadow: none; }
.hero .btn-outline:hover { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-xs); }

.section { padding: 34px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 18px; letter-spacing: -0.03em; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.section-head .more { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; transition: gap var(--dur) var(--ease), color var(--dur) var(--ease); }
.section-head .more:hover { color: var(--primary-dark); gap: 8px; }

.entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.entry-card {
  position: relative;
  display: block;
  padding: 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.entry-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cfe6e1;
  color: inherit;
}
.entry-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #effaf8, #e2f4f1);
  color: var(--primary-dark);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  box-shadow: inset 0 0 0 1px rgba(18, 165, 148, 0.08);
}
.entry-card h3 { font-size: 14.5px; margin-bottom: 5px; color: var(--ink); }
.entry-card p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.stat-strip .item {
  padding: 20px 26px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--line-soft);
  border-radius: 0;
  box-shadow: none;
}
.stat-strip .item:first-child { border-left: none; }
.stat-strip .num {
  font-size: 27px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}
.stat-strip .label { font-size: 12px; color: var(--muted); margin-top: 2px; }

.list { list-style: none; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.list-item:last-child { border-bottom: none; }
.list-item .date { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.list-item .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .title a { color: var(--text); }
.list-item .title a:hover { color: var(--primary-dark); }
.list-item .tag { flex-shrink: 0; }

/* 前台卡片网格 */
.pub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pub-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.p-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.p-card:hover { box-shadow: var(--shadow-md); border-color: #cfe6e1; color: inherit; }
.p-card .pc-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.p-card h3 { font-size: 14px; line-height: 1.5; margin: 0 0 7px; color: var(--ink); letter-spacing: -0.01em; }
.p-card p { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.p-card .pc-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 11.5px; color: var(--muted-2);
  border-top: 1px solid var(--line-soft);
}
.p-card .cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #eef2f4;
  overflow: hidden;
}
.p-card .cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(6, 24, 20, 0.14) 100%);
  pointer-events: none;
}
.p-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.p-card:hover .cover img { transform: scale(1.02); }
.p-card .cover .cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px 16px 14px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #2b463f;
  background: #e9efec;
  box-shadow: inset 4px 0 0 #3f6b62, inset 0 0 0 1px rgba(15, 23, 41, 0.07);
  overflow: hidden;
}
.p-card .cover .cover-fallback.c2 { background: #e9edf1; color: #2f4354; box-shadow: inset 4px 0 0 #3d5d75, inset 0 0 0 1px rgba(15, 23, 41, 0.07); }
.p-card .cover .cover-fallback.c3 { background: #f1ece1; color: #54401f; box-shadow: inset 4px 0 0 #6d5426, inset 0 0 0 1px rgba(15, 23, 41, 0.07); }
.p-card .cover .cover-fallback.c4 { background: #eceaf0; color: #3d3752; box-shadow: inset 4px 0 0 #4c4468, inset 0 0 0 1px rgba(15, 23, 41, 0.07); }
.p-card .cover .cover-fallback.c5 { background: #f0eae8; color: #54322c; box-shadow: inset 4px 0 0 #6b4038, inset 0 0 0 1px rgba(15, 23, 41, 0.07); }

/* 文件行 */
.file-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: inherit;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.file-row:hover { border-color: var(--primary-line); box-shadow: var(--shadow-sm); color: inherit; transform: translateX(2px); }
.file-row .fr-ic {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fdeeee, #fbe3e3);
  color: #c34a4a;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(217, 84, 84, 0.1);
}
.file-row .fr-main { flex: 1; min-width: 0; }
.file-row .fr-title {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-row .fr-sub { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fr-meta { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 财务四宫格 */
.finance-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 12px; }
.finance-mini .fm { padding: 8px 10px; border-radius: var(--radius-sm); background: #f8fafc; border: 1px solid #edf1f5; }
.finance-mini .fm .k { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.02em; }
.finance-mini .fm .v { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: -0.02em; }
.finance-mini .fm.blue { background: #f2f7fd; border-color: #e6effa; }
.finance-mini .fm.blue .v { color: #2c6499; }
.finance-mini .fm.green { background: #f1faf5; border-color: #e4f4ec; }
.finance-mini .fm.green .v { color: #0b7a56; }
.finance-mini .fm.red { background: #fdf4f4; border-color: #fae8e8; }
.finance-mini .fm.red .v { color: #b84242; }

.prose { font-size: 14.5px; line-height: 1.95; color: var(--text); }
.prose p { margin: 0 0 16px; }
.prose h3 { margin: 26px 0 10px; }
.prose img { border-radius: var(--radius-sm); margin: 16px 0; }
.prose blockquote { margin: 16px 0; padding: 12px 18px; border-left: 3px solid var(--primary-line); background: #fbfcfd; color: var(--muted); }

.page-hero { padding: 30px 0 8px; }
.page-hero .hero-in { display: flex; align-items: center; gap: 14px; }
.page-hero .ph-ic {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  background: var(--grad-green);
  box-shadow: 0 1px 2px rgba(12, 133, 120, 0.2), 0 8px 18px rgba(18, 165, 148, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.page-hero .ph-ic.blue { background: var(--grad-blue); }
.page-hero .ph-ic.orange { background: var(--grad-orange); }
.page-hero .ph-ic.purple { background: var(--grad-purple); }
.page-hero .ph-ic.teal { background: var(--grad-teal); }
.page-hero h1 { font-size: 23px; margin-bottom: 4px; letter-spacing: -0.035em; }
.page-hero p { margin: 0; color: var(--muted); font-size: 12.5px; }

.pub-toolbar { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; flex-wrap: wrap; }
.pub-toolbar .searchbar { flex: 1; min-width: 220px; }
.pub-toolbar .sort { display: flex; gap: 6px; }

.site-footer { margin-top: 44px; padding: 36px 0 26px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.55); }
.site-footer .f-inner { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.site-footer .f-col p { margin: 0 0 7px; font-size: 12px; color: var(--muted); }
.site-footer .f-col .f-title { color: var(--ink); font-weight: 600; font-size: 12.5px; margin-bottom: 10px; letter-spacing: 0.02em; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--muted-2);
}

/* =============================================================================
   登录
   ============================================================================= */
body.is-auth {
  background:
    radial-gradient(900px 520px at 6% 0%, #e9f1f3 0%, rgba(233, 241, 243, 0) 60%),
    radial-gradient(760px 460px at 98% 96%, #eef1f6 0%, rgba(238, 241, 246, 0) 58%),
    linear-gradient(180deg, #f7f9fb, #f1f4f7);
  min-height: 100vh;
}
.auth-stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
  position: relative;
  width: 100%;
  max-width: 424px;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(228, 234, 236, 0.9);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0e9488 0%, #2fb8a8 45%, #3f8fd0 100%);
}
.auth-hero { position: relative; overflow: hidden; padding: 30px 30px 26px; text-align: center; color: #fff; background: var(--grad-navy); }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .ah-ic {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.auth-hero h1 { color: #fff; font-size: 18px; margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-hero p { margin: 0; color: rgba(255, 255, 255, 0.6); font-size: 12px; }
.auth-body { padding: 26px 30px 24px; }
.auth-body .form-row { margin-bottom: 15px; }
.auth-body label.field-label { font-size: 12px; color: #5c6f76; }
.auth-body input { background: #f8fafc; border-color: #e9efee; }
.auth-body .btn-lg { height: 44px; border-radius: var(--radius-sm); margin-top: 4px; }
.auth-foot { padding: 0 30px 24px; text-align: center; font-size: 11.5px; color: var(--muted-2); }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 12px; }
.auth-tip {
  margin-top: 18px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.75;
}
.auth-tip b { color: var(--text); font-weight: 500; }
.auth-demo {
  margin-top: 14px;
  padding: 11px 13px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  color: var(--primary-dark);
  line-height: 1.7;
}

/* =============================================================================
   PDF / 富文本 / 用印 / 弹窗
   ============================================================================= */
.pdf-list { display: grid; gap: 8px; }
.pdf-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.pdf-item:hover { border-color: var(--primary-line); box-shadow: var(--shadow-sm); }
.pdf-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fdeeee, #fbe3e3);
  color: #c34a4a;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
}
.pdf-meta { flex: 1; min-width: 0; }
.pdf-name { display: block; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-sub { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.pdf-actions { display: flex; gap: 8px; flex-shrink: 0; }
.pdf-frame {
  width: 100%;
  height: 640px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eff1f4;
}
.pdf-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }

.ql-toolbar.ql-snow {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-color: var(--line);
  background: #fafbfd;
}
.ql-container.ql-snow {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border-color: var(--line);
  font-family: inherit;
  font-size: 14px;
  min-height: 260px;
}
.ql-editor { min-height: 260px; line-height: 1.8; }
.ql-editor.ql-blank::before { color: var(--muted-2); font-style: normal; }

.seal-stage { display: grid; gap: 20px; }
.seal-page {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.seal-page canvas { display: block; width: 100%; height: auto; }
.seal-pin {
  position: absolute;
  cursor: move;
  user-select: none;
  touch-action: none;
  border: 1px dashed transparent;
  transition: border-color var(--dur) var(--ease);
}
.seal-pin:hover, .seal-pin.is-active { border-color: var(--primary); }
.seal-pin img { display: block; width: 100%; height: 100%; pointer-events: none; }
.seal-page-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.seal-page-bar select { height: 30px; padding: 0 8px; width: auto; font-size: 12px; }

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 41, 0.44);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-in 0.22s var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line-soft); background: #fbfcfd; display: flex; justify-content: flex-end; gap: 10px; }

/* =============================================================================
   响应式
   ============================================================================= */
@media (max-width: 1200px) {
  .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 36px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .topbar-brand { display: none !important; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 264px;
    height: 100%;
    transform: translateX(-102%);
    transition: transform 0.26s var(--ease);
    box-shadow: var(--shadow-lg);
    z-index: 60;
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 41, 0.4);
    backdrop-filter: blur(2px);
    z-index: 55;
  }
  .admin-topbar { position: sticky; top: 0; padding: 0 14px; }
  .admin-content { padding: 16px; }
  .admin-hero { padding: 22px 20px; flex-direction: column; align-items: flex-start; }
  .admin-hero h1, .admin-hero h2 { font-size: 19px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .site-header .inner { height: 60px; }
  .site-nav { display: none; }
  .hero { padding: 40px 0 8px; }
  .hero h1 { font-size: 26px; letter-spacing: -0.035em; }
  .hero p { font-size: 13.5px; }
  .section { padding: 22px 0; }
  .entry-grid, .stat-strip, .stat-cards, .module-grid, .pub-grid, .pub-grid.is-2 { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .filter-bar { gap: 8px; }
  .filter-bar input[type="search"] { min-width: 0; flex: 1 1 100%; max-width: none; }
  .card-pad, .card-body { padding: 16px; }
  .auth-card { border-radius: var(--radius-lg); }
  .auth-body { padding: 20px 20px 18px; }
  h1 { font-size: 21px; }
  .topbar-left .dotline { display: none; }
}

@media (max-width: 480px) {
  .site-header .inner { height: 56px; gap: 10px; }
  .site-actions { gap: 6px; }
  .site-actions .btn { height: 28px; padding: 0 10px; font-size: 12px; }
  .site-actions .btn svg { display: none; }
  .brand { font-size: 14px; }
  .brand-mark { width: 28px; height: 28px; border-radius: var(--radius-sm); font-size: 12px; }
  .hero h1 { font-size: 23px; }
  .hero-actions .btn { height: 40px; padding: 0 18px; font-size: 13px; }
  .admin-topbar .crumb { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.admin-topbar .crumb-sep { font-size: 12px; color: #cfdad7; margin: 0 -6px; }
.admin-topbar .page-name { display: none; }
  .user-meta { display: none; }
  .stat-card .value { font-size: 25px; }
}

/* 尊重系统的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .card-hover:hover, .module-card:hover, .p-card:hover,
  .entry-card:hover, .file-row:hover, .tabs a:hover { transform: none; }
}

/* =============================================================================
   无限滚动加载哨兵
   ============================================================================= */
.load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 0 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}
.load-more .lm-hint { min-height: 18px; }
.load-more .lm-btn { display: inline-flex; }
.load-more.is-busy .lm-btn { display: none; }
.load-more.is-busy .lm-hint::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid var(--primary-line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: lm-spin .7s linear infinite;
}
.load-more.is-end { padding-bottom: 18px; color: var(--muted-2); }
.load-more.is-end .lm-hint::before {
  content: '—';
  margin-right: 8px;
  color: var(--primary-line);
}
@keyframes lm-spin { to { transform: rotate(360deg); } }

/* =============================================================================
   2026-11-05 美化 + 移动端（竖版）加固
   目标：任何页面在 360px 宽的屏幕上都不横向越界；观感统一。
   ============================================================================= */

/* 全局防横向溢出：内容裁切 + 表格/代码块自身可滚 */
html, body { overflow-x: hidden; }
main, .admin-main, .pc-main, .admin-content, .pc-body { min-width: 0; }
img, canvas, video, svg { max-width: 100%; }
pre, .mono { max-width: 100%; overflow-wrap: anywhere; }
.table-wrap { -webkit-overflow-scrolling: touch; }

/* 触屏：按钮与输入高度不低于 40px，避免手机误触 */
@media (max-width: 720px) {
  .btn { height: 40px; }
  .btn-sm, .act { height: 34px; }
  .btn-lg { height: 48px; }
  input[type="text"], input[type="password"], input[type="tel"], input[type="email"],
  input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"],
  select, textarea { font-size: 16px; }
}

/* 手机上卡片留白收一档，间距更紧凑 */
@media (max-width: 720px) {
  .card-pad { padding: 16px 14px; }
  .card-body { padding: 16px 14px; }
  .card-head, .card-foot { padding-left: 14px; padding-right: 14px; }
  .page-head { gap: 12px; }
  .admin-content { padding: 14px 12px 32px; }
  .admin-hero { padding: 20px 16px; }
  .admin-hero h1, .admin-hero h2 { font-size: 20px; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px 14px; }
  .stat-card .value { font-size: 24px; }
  .module-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .module-card { padding: 13px 14px; }
  .module-card h3 { font-size: 13px; }
}

@media (max-width: 380px) {
  .stat-cards, .module-grid { grid-template-columns: 1fr; }
}

/* 顶栏：手机上隐藏次要动作，只留「菜单」和核心按钮 */
@media (max-width: 720px) {
  .admin-topbar { padding: 0 10px; gap: 8px; }
  .admin-topbar .page-name, .admin-topbar .crumb, .admin-topbar .crumb-sep,
  .admin-topbar .topbar-brand, .admin-topbar .dotline { display: none; }
  .admin-topbar .user-box { gap: 6px; }
  .admin-topbar .user-box .btn {
    height: 32px; padding: 0 10px; font-size: 12px; border-radius: var(--radius-sm);
  }
  .admin-topbar .user-box .btn svg { display: none; }
  .admin-topbar .user-meta { display: none; }
  .admin-topbar .avatar { width: 30px; height: 30px; font-size: 12px; }
}

/* 深色渐变页头：手机上堆叠，hero-panel 数字行横向可滚 */
@media (max-width: 720px) {
  .admin-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .admin-hero .hero-side { align-items: flex-start; width: 100%; }
  .hero-panel { width: 100%; overflow-x: auto; }
  .hero-panel .hp-item { flex: 0 0 auto; }
  .admin-hero .hero-actions { width: 100%; flex-wrap: wrap; }
}

/* 表格在窄屏：横向滚动替代挤压；行操作按钮换行 */
@media (max-width: 720px) {
  .table-wrap { margin: 0 -2px; }
  table.data th, table.data td { padding: 10px 12px; }
  table.data th:first-child, table.data td:first-child { padding-left: 14px; }
  table.data th:last-child, table.data td:last-child { padding-right: 14px; }
  .row-actions { flex-wrap: wrap; }
}

/* filter-bar：手机上搜索框占满整行 */
@media (max-width: 720px) {
  .filter-bar { gap: 8px; }
  .filter-bar input, .filter-bar select { flex: 1 1 100%; min-width: 0; width: 100%; }
  .filter-bar input[type="search"] { max-width: none; }
  .filter-bar .btn { flex: 0 0 auto; }
}

/* 双栏 grid（含内联 grid-template-columns）在手机上压成单栏 */
@media (max-width: 900px) {
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
}

/* 页头与分段控件：横向可滚，避免被内容挤爆 */
@media (max-width: 720px) {
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .btn { align-self: flex-start; }
  .tabs, .seg { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .tabs a, .tabs button { flex: 0 0 auto; }
  .pub-toolbar { gap: 10px; }
  .pub-toolbar .searchbar { flex: 1 1 100%; min-width: 0; }
  .pub-toolbar .seg { max-width: 100%; }
}

/* 前台：页面头、网格、页脚 */
@media (max-width: 720px) {
  .page-hero { padding: 20px 0 6px; }
  .page-hero .hero-in { gap: 12px; }
  .page-hero h1 { font-size: 20px; }
  .site-footer .f-inner { flex-direction: column; gap: 18px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .pf-hero { padding: 44px 0 36px; }
}

/* 长文字/富文本：不让长 URL 撑破容器 */
.prose img { max-width: 100%; height: auto; }
.prose iframe { max-width: 100%; }
.prose a { overflow-wrap: anywhere; }

/* 富文本编辑器（wangEditor）生成内容的展示样式 */
.prose h1, .prose h2, .prose h3, .prose h4 { line-height: 1.4; margin: 24px 0 12px; }
.prose h1 { font-size: 26px; }
.prose h2 { font-size: 22px; }
.prose h4 { font-size: 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 26px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 6px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 14px; }
.prose table th, .prose table td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose table th { background: var(--bg); font-weight: 600; }
.prose table tr:nth-child(even) td { background: var(--bg); }
.prose blockquote { margin: 16px 0; padding: 12px 18px; border-left: 3px solid var(--primary-line); background: var(--bg); color: var(--muted); }
.prose code { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: 13px; }
.prose pre { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; }
.prose pre code { border: 0; padding: 0; background: none; }
.prose p:empty { display: none; }

/* 弹窗：手机全屏，底部操作不换行溢出 */
@media (max-width: 720px) {
  .modal-mask { padding: 12px; align-items: flex-end; }
  .modal-card { max-width: none; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-foot { flex-wrap: wrap; }
}

/* 表单：手机单列，避免 110/140px 的下拉和文字框挤爆 */
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .form-row { margin-bottom: 14px; }
  .form-row input, .form-row select, .form-row textarea { min-width: 0; }
  .check-card { padding: 10px 12px; }
  .detail-list { grid-template-columns: 1fr; gap: 10px 14px; }
  .finance-mini { grid-template-columns: 1fr 1fr; }
}

/* 平台控制台：手机上顶栏右侧只保留退出、藏次要信息 */
@media (max-width: 720px) {
  .pc-top { padding: 0 12px; gap: 10px; }
  .pc-crumb strong { display: inline; }
  .pc-crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pc-user { gap: 6px; }
  .pc-user .pc-avatar, .pc-user > span, .pc-user .pc-role { display: none; }
  .pc-user .btn { height: 32px; padding: 0 10px; font-size: 12px; }
}

/* =============================================================================
   前台移动导航抽屉
   ============================================================================= */
.pub-nav-toggle { display: none; }
.pub-drawer {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(78vw, 320px);
  background: #fff;
  z-index: 60;
  padding: 20px 18px;
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform 0.26s var(--ease);
  overflow-y: auto;
}
.pub-drawer a {
  display: block;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14.5px;
  border-bottom: 1px solid var(--line-soft);
}
.pub-drawer a.is-active { color: var(--primary-dark); font-weight: 600; background: var(--primary-soft); }

@media (max-width: 720px) {
  .pub-nav-toggle { display: inline-flex; }
  body.pub-nav-open .pub-drawer { transform: none; }
  body.pub-nav-open .nav-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 41, 0.4);
    backdrop-filter: blur(2px);
    z-index: 55;
  }
}

/* 前台 header 在手机上不换行、不挤压 */
@media (max-width: 720px) {
  .site-header .inner { gap: 10px; }
  .site-actions .btn-pill svg { display: none; }
  .site-actions { gap: 6px; }
  .site-actions .btn { height: 32px; padding: 0 11px; font-size: 12px; }
}

/* 平台营销首页：手机上保持单列 + 间距收紧 */
@media (max-width: 620px) {
  .pf-header .inner { height: 58px; }
  .pf-hero h1 { font-size: 30px; }
  .pf-hero p { font-size: 14px; }
  .pf-actions .btn { height: 32px; padding: 0 11px; font-size: 12px; }
  .pf-cta { margin: 36px 0 26px; padding: 28px 18px; }
}

/* =============================================================================
   站内消息中心 / 登录后通知弹窗
   ============================================================================= */
@media (max-width: 960px) {
  .msg-cols { grid-template-columns: 1fr !important; }
}
.switch-row { display: flex; align-items: flex-start; gap: 10px; }
.switch-row input[type=checkbox] { margin-top: 3px; }
.hint { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; line-height: 1.6; }
.msg-row {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.msg-row:last-child { border-bottom: 0; }
.msg-row.is-unread { background: #f7fbfa; box-shadow: inset 3px 0 0 var(--primary); }
.msg-row .msg-body {
  margin-top: 8px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.85;
  white-space: normal;
  word-break: break-word;
}
.msg-row .msg-meta { margin-top: 8px; font-size: 11.5px; color: var(--muted-2); }
.msg-row .msg-actions { margin-top: 10px; display: flex; gap: 16px; align-items: center; }
.msg-actions .link {
  background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px;
  color: var(--primary-dark); cursor: pointer; text-decoration: none;
}
.msg-actions .link:hover { text-decoration: underline; }
.msg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); display: inline-block; }
.msg-pop-item { padding: 14px 0; border-bottom: 1px dashed var(--line-soft); }
.msg-pop-item:last-child { border-bottom: 0; }
.pc-nav-badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: #d95454; color: #fff;
  font-size: 11px; font-weight: 600; line-height: 20px; text-align: center;
}
@media (max-width: 860px) {
  .pc-nav-badge { margin-left: 2px; }
  .msg-row { padding: 14px 16px; }
}

/* ============================================================
   图片上传统一组件（partials/image-upload.php + js/image-upload.js）
   · 虚线上传卡，点击即拍照/选图，不再出现原生「选择文件」按钮
   · 选图后立即预览，object-fit: contain 保证证件/印章不被裁切
   · 多图：缩略图网格，可单张移除，可继续追加
   · 主动取消选择时保留上一次的文件与预览
   ============================================================ */
.up-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.up-item { min-width: 0; }

.up-tile {
  position: relative; display: block; min-height: var(--up-h, 172px); overflow: hidden;
  border: 1.5px dashed #c9ded9; border-radius: var(--radius-sm); cursor: pointer;
  background: linear-gradient(180deg, #fbfefd 0%, #f3faf8 100%);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.up-tile:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.up-tile:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.up-tile.is-invalid { border-color: #e7b4b4; background: #fffafa; }
.up-tile-sm { --up-h: 132px; }
.up-input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.up-empty {
  position: absolute; inset: 0; padding: 20px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; text-align: center;
}
.up-icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary); background: #fff; border: 1px solid var(--primary-line);
  box-shadow: 0 6px 16px rgba(18, 165, 148, .10);
  transition: .18s ease;
}
.up-title { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.up-sub { display: block; font-size: 11px; color: var(--muted-2); line-height: 1.5; }

/* contain：竖版证件 / 印章完整显示，不裁切、不溢出卡片 */
.up-img { display: none; width: 100%; height: var(--up-h, 172px); object-fit: contain; background: #eef4f3; }
.up-tile.has-file { border-style: solid; border-color: var(--primary-line); background: #fff; }
.up-tile.has-file .up-empty { display: none; }
.up-tile.has-file .up-img { display: block; }

.up-replace {
  display: none; position: absolute; right: 10px; bottom: 10px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  color: #fff; background: rgba(12, 32, 38, .62);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.up-tile.has-file .up-replace { display: inline-flex; }

.up-meta { margin-top: 8px; display: flex; align-items: center; gap: 6px; min-height: 16px; }
.up-name { font-size: 11px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-meta .ok { color: var(--primary); flex-shrink: 0; display: inline-flex; }

/* 宽版卡片（多图 / 整页底图） */
.up-tile-wide { min-height: 120px; }
.up-tile-wide .up-empty { flex-direction: row; justify-content: flex-start; text-align: left; gap: 14px; padding: 20px 22px; }
.up-tile-wide .up-empty .txt { min-width: 0; }
.up-tile-wide .up-badge {
  display: none; position: absolute; top: 12px; right: 12px;
  height: 24px; padding: 0 9px; border-radius: 999px;
  align-items: center; font-size: 11px; font-weight: 600;
  color: var(--primary-dark); background: #fff; border: 1px solid var(--primary-line);
  box-shadow: var(--shadow-xs);
}
.up-tile-wide.has-files { border-style: solid; border-color: var(--primary-line); background: linear-gradient(180deg, #f5fcfa, #eaf7f4); }
.up-tile-wide.has-files .up-icon { background: var(--primary); border-color: var(--primary); color: #fff; }
.up-tile-wide.has-files .up-badge { display: inline-flex; }

.proof-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.proof-grid:empty { display: none; }
.proof-item {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--line); background: #eef4f3;
}
.proof-item img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 4px; box-sizing: border-box; }
.proof-del {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(12, 32, 38, .62); font-size: 15px; line-height: 1;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.proof-del:hover { background: rgba(217, 84, 84, .92); }
.proof-item .proof-tag {
  position: absolute; left: 6px; bottom: 6px; height: 18px; padding: 0 6px;
  border-radius: 999px; display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 600; color: #fff; background: rgba(12, 32, 38, .55);
}

@media (max-width: 720px) {
  .up-grid { grid-template-columns: 1fr; }
  .up-tile { --up-h: 150px; }
  .up-tile-wide { min-height: 104px; }
  .proof-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
}

/* =============================================================================
   统一附件选择组件（PDF / CSV）+ 手写签名
   ============================================================================= */
.fu-keeps { display: grid; gap: 8px; margin-bottom: 10px; }
.fu-keep { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }

.fu-item { width: 100%; }
.fu-tile {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 88px; padding: 16px 18px; box-sizing: border-box;
  border: 1.5px dashed var(--primary-line); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fbfefd, #f4faf9);
  cursor: pointer; transition: .18s ease;
}
.fu-tile:hover { border-color: var(--primary); background: var(--primary-soft); }
.fu-tile.has-files { border-style: solid; border-color: var(--primary); }
.fu-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fu-icon {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary-dark); background: var(--primary-soft); border: 1px solid var(--primary-line);
}
.fu-tile.has-files .fu-icon { color: #fff; background: var(--primary); border-color: var(--primary); }
.fu-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fu-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.fu-sub { font-size: 12px; color: var(--muted-2); }
.fu-badge { display: none; margin-left: auto; flex: 0 0 auto; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: var(--primary-dark); background: #fff; border: 1px solid var(--primary-line); }
.fu-tile.has-files .fu-badge { display: inline-flex; }
.fu-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.fu-list:empty { display: none; }
.fu-file { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line-soft); font-size: 12.5px; }
.fu-name { color: var(--text); word-break: break-all; }
.fu-size { margin-left: auto; flex: 0 0 auto; color: var(--muted-2); font-size: 11px; }
.fu-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.fu-template { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  color: var(--primary-dark); text-decoration: none; padding: 5px 10px; border-radius: var(--radius-sm); background: var(--primary-soft); }
.fu-template:hover { background: #d7efeb; }

.sig-item { margin-top: 18px; }
.sig-box { position: relative; border: 1.5px dashed var(--primary-line); border-radius: var(--radius-sm);
  background: #fff; overflow: hidden; }
.sig-canvas { display: block; width: 100%; height: 150px; touch-action: none; cursor: crosshair; }
.sig-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 7px; color: #a3b3bd; font-size: 13px; pointer-events: none; }
.sig-item.has-ink .sig-placeholder { display: none; }
.sig-item.is-invalid .sig-box { border-color: var(--danger); background: var(--danger-soft); }
.sig-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.sig-confirm-row { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 11px 13px;
  border-radius: var(--radius-sm); background: var(--warning-soft); border: 1px solid #f0dcbb; font-size: 13px; color: #7a5410; }
.sig-confirm-row.is-invalid { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.sig-confirm-row input { width: 16px; height: 16px; accent-color: var(--primary); }

@media (max-width: 720px) {
  .fu-tile { min-height: 76px; padding: 12px 14px; }
  .fu-icon { flex-basis: 38px; width: 38px; height: 38px; }
  .fu-badge { display: none !important; }
  .sig-canvas { height: 130px; }
}

/* 发起投票：上传选票 PDF 后的逐页预览与 XY 坐标设置 */
.vseal { margin: 0 0 16px; border: 1px solid var(--primary-line); border-radius: var(--radius-sm);
  background: var(--primary-soft); padding: 14px 16px; }
.vseal[hidden] { display: none; }
.vseal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; font-size: 14px; }
.vseal-head span { word-break: break-all; }
.vseal-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-bottom: 12px; }
.vseal-pages { display: grid; gap: 14px; }
.vseal-page-card { padding: 12px; border-radius: var(--radius-sm); background: #fff;
  border: 1px solid var(--line-soft); }
.vseal-page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px; font-size: 13px; }
.vseal-page-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; align-items: start; }
.vseal-preview { min-width: 0; }
.vseal-canvas-wrap { position: relative; width: 100%; max-width: 560px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); line-height: 0; overflow: hidden;
  box-shadow: 0 2px 10px rgba(20, 50, 60, .07); }
.vseal-canvas-wrap canvas { display: block; width: 100%; height: auto; }
.vseal-pin { position: absolute; display: none; cursor: move; touch-action: none; opacity: .92;
  border: 1px dashed rgba(200, 40, 40, .55); }
.vseal-pin.is-active { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(220, 60, 60, .18); }
.vseal-pin img { display: block; width: 100%; height: 100%; pointer-events: none; }
.vseal-preview-tip { margin-top: 8px; text-align: center; font-size: 11.5px; color: var(--muted); }
.vseal-controls { display: grid; gap: 12px; }
.vseal-ctrl { display: grid; gap: 6px; }
.vseal-label { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--muted); }
.vseal-label b { color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.vseal-field { display: block; }
.vseal-controls select { width: 100%; height: 32px; padding: 4px 9px; font-size: 12.5px; }
/* 全局 input[type=number] 有 width:100%，这里必须用更高特异性覆盖 */
.vseal-inline { display: flex; align-items: center; gap: 8px; }
.vseal-inline input.vseal-size[type="number"] { width: 88px !important; flex: 0 0 88px;
  height: 32px; padding: 4px 9px; font-size: 12.5px; }
.vseal-inline span { font-size: 12px; color: var(--muted); }
.vseal-slider input[type="range"] { display: block; width: 100%; height: 22px; padding: 0;
  border: 0; background: transparent; accent-color: var(--primary); }
.vseal-loading, .vseal-empty { padding: 12px; border-radius: var(--radius-sm); background: #fff; font-size: 13px; }
.vseal-empty { display: grid; gap: 9px; justify-items: start; }
.vseal-empty p { margin: 0; }

@media (max-width: 860px) {
  .vseal-page-body { grid-template-columns: 1fr; }
  .vseal-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .vseal { padding: 12px; }
  .vseal-controls { grid-template-columns: 1fr; }
}

/* 投票确认浮窗：所选选项清单 */
.cast-chosen { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cast-chosen li { padding: 11px 14px; border: 1px solid var(--primary-line); background: var(--primary-soft);
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; }
.modal-mask[hidden] { display: none !important; }

/* hidden 属性优先于任何 display 设置（HTML 标准语义，避免 flex/inline-flex 类覆盖导致该隐藏的元素仍显示） */
[hidden] { display: none !important; }

/* 投票详情页：选票 PDF 只读预览（委员 / 管理员均可见，无任何用印操作） */
.bprev-loading { padding: 26px 10px; text-align: center; font-size: 13px; color: var(--muted); }
.bprev-page {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.bprev-page + .bprev-page { margin-top: 12px; }
.bprev-page canvas { display: block; width: 100%; height: auto; }
.bprev-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px;
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.bprev-dim { color: var(--muted-2); font-size: 11.5px; }
