/* ==========================================================================
   蓝天救援队志愿者管理系统 · 全局样式
   纯自研 CSS，无任何外部依赖 / 无构建步骤
   设计基调：专业救援蓝 + 干净留白，桌面端侧边栏，移动端抽屉 + 底部导航
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌
   -------------------------------------------------------------------------- */
:root {
  --brand:          #1D5FD0;
  --brand-dark:     #123C86;
  --brand-darker:   #0C2A61;
  --brand-light:    #E8F0FE;
  --brand-lighter:  #F3F7FE;

  --accent:         #FF6A2B;
  --accent-light:   #FFF1EA;

  --ok:             #12A150;
  --ok-light:       #E6F6EC;
  --warn:           #E08A00;
  --warn-light:     #FEF4E0;
  --danger:         #D93A3A;
  --danger-light:   #FDECEC;
  --info:           #0E8FA8;
  --info-light:     #E5F6FA;

  --bg:             #F4F6FB;
  --surface:        #FFFFFF;
  --surface-2:      #FAFBFE;
  --border:         #E4E9F2;
  --border-strong:  #D2DAE8;

  --text:           #16233A;
  --text-2:         #47536B;
  --text-3:         #7A879E;

  --radius:         14px;
  --radius-sm:      10px;
  --radius-xs:      8px;
  --radius-pill:    999px;

  --shadow-sm:  0 1px 2px rgba(22, 35, 58, .06);
  --shadow:     0 4px 16px rgba(22, 35, 58, .07);
  --shadow-lg:  0 12px 40px rgba(22, 35, 58, .12);

  --sidebar-w:  248px;
  --topbar-h:   62px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   2. 重置
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.35; color: var(--text); }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p  { margin: 0 0 10px; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding-left: 20px; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #C6D0E0; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #A9B6CC; }
::-webkit-scrollbar-track { background: transparent; }

/* --------------------------------------------------------------------------
   3. 应用外壳
   -------------------------------------------------------------------------- */
.app { display: flex; min-height: 100vh; }

/* --- 侧边栏（桌面端） --- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(178deg, var(--brand-darker) 0%, #123566 55%, #143A72 100%);
  color: #D3E0F5;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 60;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.sidebar-logo {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, #3D8BFF, #1D5FD0 60%, #123C86);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(29, 95, 208, .45);
}

.sidebar-logo svg { width: 22px; height: 22px; }

.sidebar-brand-txt { min-width: 0; }
.sidebar-brand-txt strong {
  display: block;
  color: #fff;
  font-size: 15px;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-brand-txt span {
  display: block;
  font-size: 11px;
  color: #8FAEDC;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }

.nav-group { margin-bottom: 6px; }
.nav-group-title {
  font-size: 11px;
  letter-spacing: 1.2px;
  color: #7B9BD0;
  padding: 12px 12px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9.5px 12px;
  border-radius: var(--radius-sm);
  color: #C3D5EE;
  font-size: 13.5px;
  margin-bottom: 2px;
  transition: background .16s, color .16s;
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(63, 139, 255, .32), rgba(63, 139, 255, .12));
  color: #fff;
  font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 0 3px 3px 0;
  background: #5B9CFF;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .9; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  line-height: 1.6;
}

.sidebar-foot {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  font-size: 11.5px;
  color: #7B9BD0;
}

/* --- 主区域 --- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-title { min-width: 0; }
.topbar-title h1 {
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-title .crumb { font-size: 12px; color: var(--text-3); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.hamburger {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
}
.hamburger span {
  display: block; width: 16px; height: 2px;
  background: var(--text-2); border-radius: 2px; position: relative;
}
.hamburger span::before, .hamburger span::after {
  content: ""; position: absolute; left: 0;
  width: 16px; height: 2px; background: var(--text-2); border-radius: 2px;
}
.hamburger span::before { top: -5px; }
.hamburger span::after  { top: 5px; }

.content { padding: 20px; flex: 1; }
.content-narrow { max-width: 900px; }

/* --- 用户头像菜单 --- */
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  transition: box-shadow .16s, border-color .16s;
}
.user-chip:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.user-chip .uc-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-chip .uc-role { font-size: 11px; color: var(--text-3); line-height: 1.2; }

/* --- 底部导航（仅移动端） --- */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 58px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  z-index: 55;
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: var(--text-3);
  font-size: 10.5px;
}
.bottom-nav a svg { width: 19px; height: 19px; }
.bottom-nav a.active { color: var(--brand); font-weight: 600; }

/* --- 移动端抽屉 --- */
.drawer-mask {
  display: none;
  position: fixed; inset: 0;
  background: rgba(12, 28, 56, .48);
  z-index: 58;
  opacity: 0;
  transition: opacity .22s;
}
.drawer-mask.show { opacity: 1; }

/* --------------------------------------------------------------------------
   4. 卡片
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}
.card-head h2, .card-head h3 { font-size: 15px; }
.card-head .card-sub { font-size: 12px; color: var(--text-3); }
.card-head .head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.card-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   5. 统计卡
   -------------------------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute; right: -22px; top: -22px;
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--brand-lighter);
}
.stat > * { position: relative; z-index: 1; }
.stat .stat-label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat .stat-value {
  font-size: 27px; font-weight: 800; letter-spacing: -.5px;
  color: var(--text); line-height: 1.25; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat .stat-value small { font-size: 13px; font-weight: 600; color: var(--text-3); margin-left: 3px; }
.stat .stat-foot { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.stat.is-ok::after    { background: var(--ok-light); }
.stat.is-warn::after  { background: var(--warn-light); }
.stat.is-danger::after{ background: var(--danger-light); }
.stat.is-brand::after { background: var(--brand-light); }

.stat-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 10px;
  background: var(--brand-light); color: var(--brand);
}
.stat-icon svg { width: 18px; height: 18px; }
.stat.is-ok .stat-icon    { background: var(--ok-light); color: var(--ok); }
.stat.is-warn .stat-icon  { background: var(--warn-light); color: var(--warn); }
.stat.is-danger .stat-icon{ background: var(--danger-light); color: var(--danger); }

/* --------------------------------------------------------------------------
   6. 按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  transition: filter .16s, background .16s, box-shadow .16s, border-color .16s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.07); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }

.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--brand-lighter); border-color: var(--brand); color: var(--brand); filter: none; }

.btn-soft { background: var(--brand-light); color: var(--brand-dark); }
.btn-soft:hover { background: #DCE8FD; color: var(--brand-dark); filter: none; }

.btn-accent { background: var(--accent); }
.btn-danger { background: var(--danger); }
.btn-ok { background: var(--ok); }
.btn-warn { background: var(--warn); }

.btn-outline-danger { background: transparent; color: var(--danger); border-color: #F1BCBC; }
.btn-outline-danger:hover { background: var(--danger-light); color: var(--danger); filter: none; }
.btn-outline-ok { background: transparent; color: var(--ok); border-color: #B6E2C6; }
.btn-outline-ok:hover { background: var(--ok-light); color: var(--ok); filter: none; }

.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   7. 徽章 / 标签
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  white-space: nowrap;
  background: #EEF2F8;
  color: var(--text-2);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }
.badge-ok      { background: var(--ok-light);     color: #0B7A3B; }
.badge-warn    { background: var(--warn-light);   color: #A96700; }
.badge-danger  { background: var(--danger-light); color: #B32B2B; }
.badge-brand   { background: var(--brand-light);  color: var(--brand-dark); }
.badge-info    { background: var(--info-light);   color: #0A6C7E; }
.badge-muted   { background: #EFF2F7;             color: var(--text-3); }
.badge-accent  { background: var(--accent-light); color: #C24A12; }

.badge-on      { background: var(--ok-light);     color: #0B7A3B; }
.badge-standby { background: var(--brand-light);  color: var(--brand-dark); }
.badge-busy    { background: var(--accent-light); color: #C24A12; }
.badge-off     { background: #EFF2F7;             color: var(--text-3); }

.badge .sub { font-weight: 500; opacity: .8; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
}
.chip-brand { background: var(--brand-lighter); border-color: #CFE0FA; color: var(--brand-dark); }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* --------------------------------------------------------------------------
   8. 表单
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 16px;
}
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.field > label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--text-3); }

.input, .select, .textarea {
  width: 100%;
  padding: 9.5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  transition: border-color .16s, box-shadow .16s;
  min-height: 42px;
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237A879E' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 95, 208, .12);
}
.input[readonly], .input[disabled], .select[disabled] {
  background: #F5F7FA;
  color: var(--text-3);
}

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
  padding: 4px 0 2px;
  border-bottom: 1px dashed var(--border-strong);
  margin: 6px 0 2px;
  grid-column: 1 / -1;
}

/* 多选技能 */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.check-item:hover { border-color: var(--brand); }
.check-item input { width: 15px; height: 15px; accent-color: var(--brand); flex: 0 0 15px; }
.check-item.checked { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }

/* 卡片式单选（状态打卡等） */
.radio-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.radio-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s, background .15s, transform .15s;
}
.radio-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.radio-card input { display: none; }
.radio-card .rc-title { font-weight: 700; font-size: 14px; }
.radio-card .rc-desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.radio-card.checked { border-color: var(--brand); background: var(--brand-lighter); box-shadow: 0 0 0 3px rgba(29, 95, 208, .1); }

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.form-actions .right { margin-left: auto; display: flex; gap: 10px; }

/* --------------------------------------------------------------------------
   9. 表格
   -------------------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table { width: 100%; min-width: 640px; font-size: 13.5px; }
.table thead th {
  background: var(--surface-2);
  color: var(--text-2);
  font-weight: 700;
  font-size: 12.5px;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #EFF2F7;
  vertical-align: middle;
  color: var(--text-2);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--brand-lighter); }
.table .nowrap { white-space: nowrap; }
.table .col-actions { white-space: nowrap; text-align: right; }
.table .strong { color: var(--text); font-weight: 600; }
.table .num { font-variant-numeric: tabular-nums; }
.table-mini { min-width: 0; font-size: 13px; }

.person-cell { display: flex; align-items: center; gap: 9px; }
.person-cell img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: 0 0 32px; }
.person-cell .pc-name { font-weight: 600; color: var(--text); line-height: 1.25; }
.person-cell .pc-sub { font-size: 11.5px; color: var(--text-3); line-height: 1.25; }

/* --------------------------------------------------------------------------
   10. 筛选栏
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
  align-items: flex-end;
}
.filter-bar .field { flex: 1 1 160px; min-width: 140px; }
.filter-bar .field.wide { flex: 1 1 240px; }
.filter-bar .fb-actions { display: flex; gap: 8px; flex: 0 0 auto; }
/* 多选项占满整行时更易点选 */
.filter-bar .field.full { flex: 1 1 100%; }
/* 芯片式多选需要更宽的横向空间，宽屏下允许两列并排 */
.filter-bar .field.chips { flex: 1 1 320px; }

/* 芯片字段比下拉框高，底部对齐会让各字段标签错行；
   报表页筛选区改为顶部对齐，并把操作按钮单独放一行右对齐 */
.filter-bar-tall { align-items: flex-start; }
.filter-bar-tall .fb-actions {
  flex: 1 1 100%;
  justify-content: flex-end;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   10.1 芯片式多选（替代 <select multiple>）
   原生多选下拉在移动端与桌面 Chrome 下会渲染成高度重叠的列表框，
   这里改为「隐藏 checkbox + 胶囊标签」，点选直观、触控友好，且保留 name="xx[]" 的提交格式。
   -------------------------------------------------------------------------- */
.msel {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  max-height: 168px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.msel .msel-label {
  flex: 0 0 100%;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: .02em;
  margin-top: 2px;
}
.msel .msel-label:first-child { margin-top: 0; }
.msel-item { position: relative; display: inline-flex; }
.msel-item input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.msel-item > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  /* 移动端点击目标不小于 32px，符合触控规范 */
  min-height: 32px;
  transition: border-color .15s, background .15s, color .15s;
}
.msel-item > span:hover { border-color: var(--brand); color: var(--brand); }
.msel-item input:focus-visible + span { box-shadow: 0 0 0 3px rgba(29, 95, 208, .16); }
.msel-item input:checked + span {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-dark);
}
.msel-item input:checked + span::before {
  content: "✓";
  font-size: 11px;
  font-weight: 700;
}
.msel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-3);
}
.link-mini {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.link-mini:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   11. 提示条
   -------------------------------------------------------------------------- */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 14px;
  border: 1px solid transparent;
  line-height: 1.6;
}
.alert svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 2px; }
.alert-ok     { background: var(--ok-light);     border-color: #B6E2C6; color: #0B6B35; }
.alert-warn   { background: var(--warn-light);   border-color: #F0D9A8; color: #96600A; }
.alert-danger { background: var(--danger-light); border-color: #F1BCBC; color: #A82C2C; }
.alert-info   { background: var(--brand-light);  border-color: #C9DCFB; color: var(--brand-dark); }
.alert .alert-close { margin-left: auto; background: none; border: none; font-size: 17px; color: inherit; opacity: .5; padding: 0 2px; }
.alert .alert-close:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   12. 空状态
   -------------------------------------------------------------------------- */
.empty { text-align: center; padding: 46px 20px; color: var(--text-3); }
.empty svg { width: 46px; height: 46px; opacity: .35; margin: 0 auto 12px; }
.empty p { font-size: 13.5px; margin: 0; }

/* --------------------------------------------------------------------------
   13. 分页
   -------------------------------------------------------------------------- */
.pager {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
.pager-info { font-size: 12.5px; color: var(--text-3); }
.pager-btns { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   14. 时间线
   -------------------------------------------------------------------------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute; left: -21px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--brand);
}
.tl-item.is-ok::before   { border-color: var(--ok); }
.tl-item.is-warn::before { border-color: var(--warn); }
.tl-item.is-danger::before { border-color: var(--danger); }
.tl-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.tl-meta  { font-size: 11.5px; color: var(--text-3); }
.tl-desc  { font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* --------------------------------------------------------------------------
   15. 进度条
   -------------------------------------------------------------------------- */
.bar { height: 7px; border-radius: 4px; background: #EEF2F8; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .5s; }
.bar.is-ok > i    { background: var(--ok); }
.bar.is-warn > i  { background: var(--warn); }
.bar.is-danger > i{ background: var(--danger); }

.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-row .bar { flex: 1; }
.bar-row .bar-val { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 54px; text-align: right; }

/* --------------------------------------------------------------------------
   16. 标签页
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  padding: 0 18px;
  background: var(--surface);
}
.tabs a {
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--brand); }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }

/* --------------------------------------------------------------------------
   17. 详情列表
   -------------------------------------------------------------------------- */
.dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0;
}
.dl-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  gap: 10px;
  font-size: 13.5px;
  align-items: baseline;
}
.dl-item dt { color: var(--text-3); flex: 0 0 96px; font-size: 12.5px; }
.dl-item dd { margin: 0; color: var(--text); font-weight: 500; word-break: break-all; }

/* --------------------------------------------------------------------------
   18. 档案头部
   -------------------------------------------------------------------------- */
.profile-head {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 20px;
  background: linear-gradient(120deg, var(--brand-darker), #1B4E9E 55%, #1D5FD0);
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
}
.profile-head::after {
  content: "";
  position: absolute;
  right: -60px; top: -70px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 156, 255, .38), transparent 68%);
}
.profile-head .ph-avatar {
  width: 78px; height: 78px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .3);
  object-fit: cover;
  flex: 0 0 78px;
  position: relative; z-index: 1;
}
.profile-head .ph-main { position: relative; z-index: 1; min-width: 0; flex: 1; }
.profile-head h1 { color: #fff; font-size: 21px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.profile-head .ph-meta { font-size: 12.5px; color: #BFD6F5; margin-top: 5px; display: flex; gap: 14px; flex-wrap: wrap; }
.profile-head .ph-meta b { color: #fff; font-weight: 600; }
.profile-head .ph-tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.profile-head .ph-tags .chip {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .22);
  color: #EAF2FE;
}
.profile-head .ph-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.profile-head .ph-actions .btn-ghost {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .26);
  color: #fff;
}
.profile-head .ph-actions .btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }

/* --------------------------------------------------------------------------
   19. 前台（对外站点）
   -------------------------------------------------------------------------- */
.public-body { background: var(--surface); }

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-head-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo .logo-badge {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(140deg, #3D8BFF, #1D5FD0 60%, #123C86);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(29, 95, 208, .35);
  flex: 0 0 40px;
}
.site-logo .logo-badge svg { width: 24px; height: 24px; }
.site-logo strong { display: block; font-size: 16px; letter-spacing: .4px; line-height: 1.25; }
.site-logo span { display: block; font-size: 11px; color: var(--text-3); letter-spacing: 1.6px; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:hover { background: var(--brand-lighter); color: var(--brand); }

/* 首屏 */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 460px at 82% -12%, rgba(93, 156, 255, .34), transparent 62%),
    radial-gradient(720px 380px at 8% 108%, rgba(255, 106, 43, .18), transparent 66%),
    linear-gradient(158deg, #0A2550 0%, #123C86 48%, #1D5FD0 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 76%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 62px 20px 74px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 44px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: 12.5px;
  letter-spacing: .6px;
  margin-bottom: 18px;
}
.hero-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #6BE39A; box-shadow: 0 0 0 3px rgba(107, 227, 154, .25); }
.hero h1 {
  font-size: 42px;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -.5px;
  margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: #7FB6FF; }
.hero-lead { font-size: 15.5px; color: #C6DAF7; line-height: 1.85; max-width: 560px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn { padding: 12px 24px; font-size: 15px; border-radius: var(--radius-sm); }
.btn-glass {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
}
.btn-glass:hover { background: rgba(255, 255, 255, .22); color: #fff; filter: none; }
.btn-white { background: #fff; color: var(--brand-dark); }
.btn-white:hover { background: #F0F5FF; color: var(--brand-dark); filter: none; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.hero-stat {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: var(--radius);
  padding: 16px 18px;
  backdrop-filter: blur(6px);
}
.hero-stat .hs-val { font-size: 28px; font-weight: 800; color: #fff; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero-stat .hs-val small { font-size: 13px; font-weight: 600; color: #A8C6EE; margin-left: 3px; }
.hero-stat .hs-label { font-size: 12.5px; color: #ADCAEF; margin-top: 2px; }

/* 区块 */
.section { max-width: 1180px; margin: 0 auto; padding: 58px 20px; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head .kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-head h2 { font-size: 27px; margin-bottom: 10px; }
.section-head p { color: var(--text-3); font-size: 14.5px; max-width: 620px; margin: 0 auto; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #CFE0FA; }
.feature .f-icon {
  width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--brand-light); color: var(--brand);
  margin-bottom: 14px;
}
.feature .f-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 15.5px; margin-bottom: 7px; }
.feature p { font-size: 13.5px; color: var(--text-3); margin: 0; line-height: 1.75; }

.section-alt { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* 公开查询面板 */
.query-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.query-row { display: flex; gap: 10px; flex-wrap: wrap; }
.query-row .input { flex: 1 1 240px; }
.query-row .btn { flex: 0 0 auto; padding: 9.5px 26px; }

.result-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 10px;
  transition: border-color .16s, box-shadow .16s;
  flex-wrap: wrap;
}
.result-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.result-card .rc-avatar { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: 0 0 58px; }
.result-card .rc-body { flex: 1; min-width: 180px; }
.result-card .rc-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result-card .rc-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.result-card .rc-tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

.site-foot {
  background: #0C2A61;
  color: #93ADD6;
  padding: 36px 20px 28px;
  font-size: 13px;
}
.site-foot-inner { max-width: 1180px; margin: 0 auto; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-foot a { color: #C3D5EE; }
.site-foot .foot-right { margin-left: auto; }

/* --------------------------------------------------------------------------
   20. 登录 / 注册
   -------------------------------------------------------------------------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--surface);
}
.auth-side {
  background:
    radial-gradient(760px 420px at 78% 8%, rgba(93, 156, 255, .32), transparent 62%),
    linear-gradient(158deg, #0A2550 0%, #123C86 52%, #1D5FD0 100%);
  color: #fff;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-side::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 60% 20%, #000 15%, transparent 72%);
}
.auth-side > * { position: relative; z-index: 1; }
.auth-side h2 { color: #fff; font-size: 30px; line-height: 1.35; margin-bottom: 14px; }
.auth-side p { color: #C1D8F7; font-size: 14.5px; line-height: 1.85; }
.auth-side .auth-points { margin-top: 30px; display: flex; flex-direction: column; gap: 13px; }
.auth-point { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: #DCEAFB; }
.auth-point .ap-ico {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 26px;
  background: rgba(255, 255, 255, .16);
  display: grid; place-items: center;
}
.auth-point .ap-ico svg { width: 15px; height: 15px; }

.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 396px; }
.auth-card h1 { font-size: 25px; margin-bottom: 6px; }
.auth-card .auth-sub { color: var(--text-3); font-size: 13.5px; margin-bottom: 26px; }
.auth-card .field { margin-bottom: 15px; }
.auth-tip {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-lighter);
  border: 1px dashed #C9DCFB;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.75;
}
.auth-tip code {
  background: #fff;
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brand-dark);
  border: 1px solid var(--border);
}
.auth-foot { text-align: center; margin-top: 24px; font-size: 13.5px; color: var(--text-3); }

/* --------------------------------------------------------------------------
   21. 工具类
   -------------------------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.ml-auto { margin-left: auto; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-2 { color: var(--text-2); } .text-3 { color: var(--text-3); }
.text-sm { font-size: 12.5px; } .text-xs { font-size: 11.5px; }
.text-ok { color: var(--ok); } .text-warn { color: var(--warn); } .text-danger { color: var(--danger); }
.text-brand { color: var(--brand); }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hide-mobile { display: initial; }
.show-mobile { display: none; }

/* --------------------------------------------------------------------------
   22. 响应式 —— 手机端适配
   -------------------------------------------------------------------------- */

/* 平板 */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding: 48px 20px 56px; }
  .hero h1 { font-size: 34px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .form-grid .span-3 { grid-column: span 2; }
}

/* 手机 / 窄屏 */
@media (max-width: 860px) {
  /* 侧边栏转为抽屉 */
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    height: 100%;
    transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--shadow-lg);
    width: 264px;
    flex-basis: 264px;
  }
  .sidebar.open { transform: translateX(0); }
  .drawer-mask { display: block; pointer-events: none; }
  .drawer-mask.show { pointer-events: auto; }

  .hamburger { display: inline-flex; }

  /* 顶部栏紧凑 */
  .topbar { padding: 0 12px; gap: 9px; }
  .topbar-title h1 { font-size: 15.5px; }
  .topbar-title .crumb { display: none; }
  .user-chip .uc-text { display: none; }
  .user-chip { padding: 4px; }
  .topbar-actions .hide-mobile { display: none; }

  .content { padding: 14px 12px 78px; }

  /* 底部导航 */
  .bottom-nav { display: flex; }

  /* 统计卡两列 */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat .stat-value { font-size: 22px; }
  .stat .stat-label { font-size: 11.5px; }
  .stat-icon { width: 28px; height: 28px; border-radius: 8px; margin-bottom: 7px; }
  .stat-icon svg { width: 15px; height: 15px; }

  .card-head { padding: 12px 14px; }
  .card-body { padding: 14px; }
  .card-foot { padding: 10px 14px; }
  .pager { padding: 12px 14px; }
  /* 标签栏：移动端换行铺开，避免横向滚动把后面的分类藏起来 */
  .tabs {
    padding: 0 10px;
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 0;
  }
  .tabs a { padding: 10px 10px; font-size: 12.5px; }

  /* 筛选栏：多选芯片整行铺开，按钮铺满 */
  .filter-bar { gap: 12px 8px; }
  .filter-bar .field,
  .filter-bar .field.wide { flex: 1 1 100%; min-width: 0; }
  .filter-bar .fb-actions { flex: 1 1 100%; }
  .filter-bar .fb-actions .btn { flex: 1; justify-content: center; }
  .msel { max-height: 148px; }
  .msel-item > span { padding: 7px 13px; min-height: 34px; font-size: 13px; }

  /* 表单：单列 */
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: span 1; }
  .field > label { font-size: 12.5px; }
  .input, .select, .textarea { font-size: 16px; } /* ≥16px 避免 iOS 自动放大 */

  /* 筛选栏整行 */
  .filter-bar { gap: 8px; }
  .filter-bar .field { flex: 1 1 100%; }
  .filter-bar .field.half { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .filter-bar .fb-actions { flex: 1 1 100%; }
  .filter-bar .fb-actions .btn { flex: 1 1 auto; }

  /* 表格：横向滚动 + 更小内边距 */
  .table { font-size: 13px; min-width: 560px; }
  .table thead th { padding: 9px 11px; font-size: 12px; }
  .table tbody td { padding: 9px 11px; }

  /* 卡片化表格（用于关键列表） */
  .table-stack { min-width: 0; }
  .table-stack thead { display: none; }
  .table-stack tbody tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    padding: 6px 4px;
    background: var(--surface);
  }
  .table-stack tbody tr:hover { background: var(--surface); }
  .table-stack tbody td {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 10px;
    border-bottom: 1px dashed #EEF2F8;
    text-align: left !important;
  }
  .table-stack tbody tr td:last-child { border-bottom: none; }
  .table-stack tbody td::before {
    content: attr(data-label);
    flex: 0 0 82px;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 600;
  }
  .table-stack tbody td.col-actions { justify-content: flex-start; }
  .table-stack tbody td.col-actions::before { content: attr(data-label); }

  /* 档案头部 */
  .profile-head { padding: 16px; gap: 14px; }
  .profile-head .ph-avatar { width: 62px; height: 62px; flex-basis: 62px; }
  .profile-head h1 { font-size: 18px; }
  .profile-head .ph-actions { width: 100%; }
  .profile-head .ph-actions .btn { flex: 1 1 auto; }

  .dl { grid-template-columns: 1fr; }
  .dl-item { flex-direction: column; gap: 2px; }
  .dl-item dt { flex: none; }

  /* 前台 */
  .site-head-inner { padding: 10px 14px; }
  .site-logo strong { font-size: 14.5px; }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    position: absolute;
    top: var(--topbar-h);
    left: 0; right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px 12px 14px;
    gap: 2px;
  }
  .site-nav.open a { padding: 11px 12px; }
  .site-head .hamburger { display: inline-flex; margin-left: auto; }

  .hero-inner { padding: 38px 16px 44px; gap: 26px; }
  .hero h1 { font-size: 26px; line-height: 1.3; }
  .hero-lead { font-size: 14px; line-height: 1.8; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .hero-stat { padding: 13px 14px; }
  .hero-stat .hs-val { font-size: 22px; }

  .section { padding: 40px 16px; }
  .section-head h2 { font-size: 21px; }
  .section-head p { font-size: 13.5px; }
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature { padding: 18px; }

  .query-panel { padding: 16px; }
  .query-row .btn { flex: 1 1 100%; }

  .result-card { padding: 14px; gap: 12px; }
  .result-card .rc-avatar { width: 48px; height: 48px; flex-basis: 48px; }

  .site-foot { padding: 26px 16px 22px; }
  .site-foot-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-foot .foot-right { margin-left: 0; }

  .auth-form-side { padding: 26px 18px; }
  .auth-card h1 { font-size: 22px; }

  .hide-mobile { display: none !important; }
  .show-mobile { display: initial; }

  .modal-box { width: calc(100% - 28px); margin: 0 auto; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat .stat-value { font-size: 20px; }
  .hero h1 { font-size: 23px; }
  h1 { font-size: 20px; }
  .btn-group .btn { flex: 1 1 auto; }
}

/* --------------------------------------------------------------------------
   23. 弹窗
   -------------------------------------------------------------------------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(12, 28, 56, .5);
  z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(10px) scale(.98);
  transition: transform .2s;
}
.modal-mask.show .modal-box { transform: none; }
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; }
.modal-head .modal-close {
  margin-left: auto; background: none; border: none;
  font-size: 22px; line-height: 1; color: var(--text-3); padding: 0 4px;
}
.modal-body { padding: 18px; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* --------------------------------------------------------------------------
   24. 上传控件
   -------------------------------------------------------------------------- */
.upload-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  background: var(--surface-2);
  transition: border-color .16s, background .16s;
  cursor: pointer;
}
.upload-zone:hover { border-color: var(--brand); background: var(--brand-lighter); }
.upload-zone svg { width: 26px; height: 26px; color: var(--brand); margin: 0 auto 8px; }
.upload-zone .uz-txt { font-size: 13px; color: var(--text-2); }
.upload-zone .uz-hint { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.upload-zone input[type=file] { display: none; }
.upload-preview { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.upload-preview img { width: 74px; height: 74px; border-radius: var(--radius-xs); object-fit: cover; border: 1px solid var(--border); }
.cert-thumb { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; border: 1px solid var(--border); }

/* --------------------------------------------------------------------------
   25. 打印样式（迎检报表 A4 输出）
   -------------------------------------------------------------------------- */
@media print {
  .sidebar, .topbar, .bottom-nav, .drawer-mask, .no-print,
  .site-head, .site-foot, .hero { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .content { padding: 0; }
  .card { border: none; box-shadow: none; margin: 0; }
  .card-head { border-bottom: 2px solid #000; padding: 0 0 8px; }
  .table { min-width: 0; font-size: 11px; }
  .table thead th { background: #F2F2F2 !important; position: static; }
  .print-header { display: block !important; margin-bottom: 14px; }
  .print-header h1 { font-size: 18px; text-align: center; }
  .print-header .print-meta { text-align: center; font-size: 11px; color: #444; }
  table, tr, td, th { page-break-inside: avoid; }
  @page { size: A4; margin: 14mm 12mm; }
}
.print-header { display: none; }
.print-only { display: none; }
@media print { .print-only { display: block; } }
