/* ============================================================
   无忧医伴通 · 管理后台  (Modern SaaS theme)
   设计语言：Linear / Vercel 风格 · 暖橙品牌 · Lucide 图标
   ============================================================ */

:root {
  --brand: #1e5bb8;
  --brand-strong: #123f7e;
  --brand-tint: #cfe0f5;
  --brand-soft: #eaf2fb;
  --ink: #1a1b1f;
  --ink-2: #555860;
  --ink-3: #9b9ea8;
  --line: #ebecef;
  --bg: #f6f7f9;
  --card: #ffffff;
  --sidebar: #123f7e;
  --sidebar-2: #0f2f5e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 6px 16px -4px rgba(16, 24, 40, 0.10);
  --shadow-brand: 0 8px 20px -6px rgba(30, 91, 184, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.ui-icon { flex-shrink: 0; display: inline-block; vertical-align: middle; }

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

/* ============================================================
   工作台布局
   ============================================================ */
.db-shell { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.db-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: #c9cbd3;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}

.db-logo { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }

.db-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-brand);
  overflow: hidden;
}
.db-logo-mark img { width: 33px; height: 33px; display: block; }

.db-logo-text { display: flex; flex-direction: column; line-height: 1.3; }
.db-logo-text b { color: #fff; font-size: 15px; letter-spacing: .2px; }
.db-logo-text small { color: #9db9e2; font-size: 11px; }

.db-side-label {
  font-size: 11px;
  color: #7fa3d4;
  letter-spacing: 1px;
  padding: 6px 10px;
}

.db-nav { flex: 1; display: flex; flex-direction: column; gap: 3px; }

.db-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  color: #c6d7f0;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.db-nav-item .ui-icon { color: #8fb0dd; transition: color .15s; }
.db-nav-item:hover { background: rgba(255, 255, 255, 0.055); color: #fff; }
.db-nav-item:hover .ui-icon { color: #e3edfb; }

.db-nav-on { background: rgba(255, 255, 255, 0.16); color: #fff; }
.db-nav-on .ui-icon { color: #fff; }
.db-nav-on:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

.db-side-foot { border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 10px; }

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

.db-topbar {
  height: 62px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.db-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  height: 38px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-3);
  transition: border-color .15s, background .15s;
}
.db-search:focus-within { border-color: var(--brand-tint); background: #fff; }
.db-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--ink);
}

.db-top-right { display: flex; align-items: center; gap: 10px; }

.db-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-2);
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  transition: border-color .15s, color .15s;
}
.db-chip:hover { border-color: var(--brand-tint); color: var(--brand); }

.db-user { display: flex; align-items: center; gap: 9px; padding: 5px 6px 5px 5px; }
.db-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2e6fd1, #123f7e);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.db-user-name { font-size: 13.5px; color: var(--ink); font-weight: 500; }

/* ---------- 内容 ---------- */
.db-content { padding: 28px; flex: 1; }

/* 欢迎横幅 */
.db-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 34px;
  margin-bottom: 30px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(120deg, #2e6fd1 0%, #1e5bb8 45%, #123f7e 100%);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.db-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.db-hero-info { position: relative; z-index: 1; }
.db-hero h1 { margin: 0 0 8px; font-size: 23px; font-weight: 700; }
.db-hero p { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, 0.88); }
.db-hero-art {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.28);
  margin-right: 30px;
}

/* 工作台访问量统计（域名 / 小程序 今日 + 累计） */
.db-hero-stats {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 10px;
  margin-left: 24px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}
.db-hero-stat {
  min-width: 0;
  padding: 8px 12px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: background .18s, transform .18s;
}
.db-hero-stat:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.db-hero-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}
.db-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-block;
}
.db-dot-web { background: #8ec5ff; box-shadow: 0 0 0 3px rgba(142, 197, 255, 0.18); }
.db-dot-mini { background: #7ef0c2; box-shadow: 0 0 0 3px rgba(126, 240, 194, 0.18); }
.db-hero-stat b {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .3px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1180px) {
  .db-hero { flex-wrap: wrap; gap: 18px; }
  .db-hero-stats {
    width: 100%;
    margin-left: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .db-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 功能分组 */
.db-group { margin-bottom: 32px; scroll-margin-top: 80px; }
.db-group-head { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; }
.db-group-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.db-group-head h2 { margin: 0; font-size: 16.5px; font-weight: 700; color: var(--ink); }

.db-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
  gap: 16px;
}

/* 功能卡片 */
.db-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.db-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-tint);
  transform: translateY(-2px);
}

.db-card-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, color .18s;
}
.db-card:hover .db-card-icon {
  background: linear-gradient(135deg, #2e6fd1, #123f7e);
  color: #fff;
}

.db-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.db-card-info b { color: var(--ink); font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.db-card-info small {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-card-arrow { color: #c8cad2; transition: color .18s, transform .18s; }
.db-card:hover .db-card-arrow { color: var(--brand); transform: translateX(2px); }

/* ============================================================
   Django Admin 内页美化（列表 / 表单 / 详情）
   ============================================================ */
#header {
  background: var(--sidebar);
  color: #c9cbd3;
  border-bottom: none;
}
#header a:link, #header a:visited { color: #e8eaf0; }
#site-name a:link, #site-name a:visited { color: #fff; font-weight: 600; }
#user-tools a { border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
#user-tools a:hover { color: var(--brand-tint); }

.breadcrumbs {
  background: #fff;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.breadcrumbs a { color: var(--brand-strong); }
.breadcrumbs a:hover { color: var(--brand); }

#container { background: var(--bg); min-height: calc(100vh - 0px); }
#content { padding: 24px 28px; color: var(--ink); }
#content h1, #content h2 { color: var(--ink); font-weight: 600; }
#content h1 { font-size: 20px; margin: 0 0 18px; }

/* 卡片化模块 */
.module, .inline-group {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.module h2, .module caption, .inline-group h2 {
  background: #fafbfc;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.module.aligned > h2, .module.ordered > h2 { color: var(--ink); }

/* 表格 */
table { border-collapse: collapse; }
/* 列宽按表头/内容自适应（紧凑），不再强制铺满 */
#result_list { width: auto; min-width: 0; }
.module table { width: 100%; }
/* 表头：原生 padding 在 .text span/a 内（th 本身 padding:0），按结构覆盖 */
#result_list thead th, .module table thead th {
  background: #fafbfc;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
#result_list thead th .text span,
#result_list thead th .text a {
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}
#result_list thead th.action-checkbox-column { padding: 7px 12px; }
#result_list tbody td, .module table tbody td {
  padding: 5px 12px;
  font-size: 13.5px;
  border-bottom: 1px solid #f1f2f4;
  color: var(--ink);
  vertical-align: middle;
}
/* 行内输入框/下拉同步缩小，避免撑高行 */
#result_list td input, #result_list td select {
  padding: 5px 9px;
  font-size: 13px;
  height: auto;
  line-height: 1.4;
}
#result_list tbody tr:hover { background: var(--brand-soft); }
#result_list tbody tr:last-child td { border-bottom: none; }
.row1 { background: #fff; }
.row2 { background: #fcfcfd; }

th a:link, th a:visited { color: var(--ink-2); }
th.sorted { background: var(--brand-soft) !important; }
th.sorted a { color: var(--brand-strong); }

/* 表单 */
.form-row { padding: 14px 16px; border-bottom: 1px solid #f3f4f6; }
.form-row:last-child { border-bottom: none; }
.form-row label, label { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.help, .help-text, p.file-upload { color: var(--ink-3); font-size: 12px; }
.help-tooltip { color: var(--brand); }

input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="url"], input[type="search"],
input[type="date"], input[type="datetime-local"], select, textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30, 91, 184, 0.14);
}
/* 修复：Django 原生 select 固定 height:1.875rem 与本表 padding 冲突导致文字只显示半块 */
select:not([multiple]) { height: auto; min-height: 34px; }

/* 按钮 */
.button, input[type="submit"], input[type="button"], .submit-row input, a.button,
a.addlink, a.view-related-button {
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.button:hover, input[type="submit"]:hover, a.button:hover {
  background: var(--brand-soft);
  border-color: var(--brand-tint);
  color: var(--brand);
}
.button.default, input[type="submit"].default, .submit-row input.default, a.button.default {
  background: linear-gradient(135deg, #2e6fd1, #123f7e);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-brand);
}
.button.default:hover, input[type="submit"].default:hover { filter: brightness(1.05); color: #fff; }

.submit-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 20px;
}
.deletelink {
  background: #fff1f0;
  color: #d9363e;
  border: 1px solid #ffd6d4;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
}
.deletelink:hover { background: #d9363e; color: #fff; }

/* 搜索栏 / 对象工具 */
#toolbar { margin-bottom: 16px; }
#toolbar #searchbar {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 13px;
  min-width: 0;
}
.object-tools a:link, .object-tools a:visited {
  background: linear-gradient(135deg, #2e6fd1, #123f7e);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 15px;
  font-size: 12.5px;
  font-weight: 500;
  text-transform: none;
}
.object-tools a:hover { color: #fff; filter: brightness(1.05); }

/* 分页 */
.paginator {
  padding: 14px 4px 4px;
  font-size: 13px;
  color: var(--ink-2);
}
.paginator a:link, .paginator a:visited {
  display: inline-block;
  min-width: 32px;
  text-align: center;
  padding: 6px 10px;
  margin: 0 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  background: #fff;
}
.paginator a:hover { border-color: var(--brand-tint); color: var(--brand); }
.paginator .this-page {
  display: inline-block;
  min-width: 32px;
  text-align: center;
  padding: 6px 10px;
  margin: 0 3px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

/* 右侧过滤器 */
#changelist-filter {
  background: #fff;
  border-left: 1px solid var(--line);
  padding: 16px;
}
#changelist-filter h2, #changelist-filter h3 {
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 600;
}
#changelist-filter li.selected a { color: var(--brand) !important; font-weight: 600; }
#changelist-filter a:hover { color: var(--brand); }

#changelist { background: transparent; }
#changelist-form { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }

/* 消息 */
.success, .warning, .error { border-radius: var(--radius-sm); }
ul.messagelist li {
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 13.5px;
}
ul.messagelist li.success { background: #edfdf2; color: #15803d; }
ul.messagelist li.warning { background: #fff7e8; color: #b45309; }
ul.messagelist li.error { background: #fff1f0; color: #d9363e; }

/* 徽章/状态色保持语义 */
.field-status, td.field-status { white-space: nowrap; }

/* ============================================================
   登录页
   ============================================================ */
body.login {
  background: linear-gradient(135deg, #0d2b57 0%, #123f7e 55%, #1e4f9c 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.login #container {
  background: transparent;
  border: none;
  width: 400px;
  max-width: calc(100vw - 40px);
}
body.login #header { display: none; }
body.login .breadcrumbs { display: none; }
body.login #content {
  background: #fff;
  border-radius: 16px;
  padding: 36px 34px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
body.login #content h1 {
  text-align: center;
  font-size: 20px;
  margin: 0 0 4px;
  color: var(--ink);
}

/* ============================================================
   admin-upload.js 注入的上传/清空按钮
   ============================================================ */
.adm-up-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.adm-up-btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
  line-height: 1.4;
}
.adm-up-btn:disabled { cursor: not-allowed; opacity: .7; }
.adm-up-up {
  background: linear-gradient(135deg, #2e6fd1, #123f7e);
  color: #fff;
  border-color: var(--brand-strong);
  box-shadow: var(--shadow-brand);
}
.adm-up-up:hover:not(:disabled) { filter: brightness(1.05); }
.adm-up-clr {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line);
}
.adm-up-clr:hover:not(:disabled) { border-color: #9dbce4; color: var(--brand-strong); }
.adm-up-busy::after {
  content: ""; display: inline-block; width: 10px; height: 10px;
  margin-left: 6px; border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: adm-spin .8s linear infinite; vertical-align: middle;
}
@keyframes adm-spin { to { transform: rotate(360deg); } }

/* =============== 多图/视频 缩略图网格（JSON 数组字段） =============== */
.adm-up-bar {
  display: flex; gap: 8px; margin: 10px 0 8px; align-items: center;
}
.adm-up-grid {
  display: grid; grid-template-columns: repeat(auto-fill, 108px); gap: 10px;
  padding: 10px; background: #f7f9fc; border: 1px dashed #c9d8ef;
  border-radius: 8px; min-height: 60px;
}
.adm-up-cell {
  position: relative; width: 108px; height: 108px;
  border-radius: 8px; overflow: hidden; background: #fff;
  border: 1px solid #e0e8f4; cursor: pointer; transition: transform .15s;
}
.adm-up-cell:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(18,63,126,.12); }
.adm-up-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.adm-up-del {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.65); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.adm-up-cell:hover .adm-up-del { opacity: 1; }
.adm-up-del:hover { background: #c0272d; }
.adm-up-tag {
  position: absolute; top: 3px; left: 3px;
  font-size: 11px; padding: 1px 6px; border-radius: 3px;
  line-height: 1.4;
}
.adm-up-tag-main { background: #1e5bb8; color: #fff; }
.adm-up-tag-video { background: rgba(0,0,0,.55); color: #fff; font-size: 10px; }
.adm-up-empty {
  grid-column: 1 / -1; text-align: center; color: #8c9ab5;
  font-size: 12px; padding: 24px 0;
}

body.login #content::before { content: none; }
body.login .login-brand { text-align: center; margin-bottom: 12px; }
body.login .login-brand img { width: 86px; height: 86px; }
body.login .login-sub {
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  margin: 2px 0 22px;
}
body.login .form-row { padding: 8px 0; border: none; }
body.login .form-row label { display: none; }
body.login input[type="text"], body.login input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
}
body.login .submit-row {
  border: none;
  padding: 14px 0 0;
  text-align: center;
}
body.login .submit-row input { width: 100%; padding: 11px; font-size: 14.5px; }
body.login .password-reset-link { text-align: center; font-size: 12.5px; }
body.login .errornote {
  background: #fff1f0;
  color: #d9363e;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
}
body.login .login-form .form-row:has(#id_username) input { margin-bottom: 10px; }

/* TabularInline: 隐藏 __str__ 浮层标题（曾两度与输入框重叠）
   Django 默认把 td.original p 绝对定位浮在行首，靠 has_original td 的
   padding-top 预留空间；主题下任何盒模型/缓存偏差都会造成重叠。
   直接隐藏浮层（td 内 pk/fk 隐藏域不受影响），恢复正常行距。 */
.inline-group .tabular thead th.original { display: none !important; }
.inline-group .tabular tbody tr td.original { display: none !important; }
.inline-group .tabular tbody tr.has_original > td { padding-top: 12px !important; }

/* 中间动作页（审核驳回填原因等） */
.intermediate #content { max-width: 640px; margin: 0 auto; }

/* ============================================================
   布尔字段：政务蓝开关（admin-switch.js 注入，参考政务后台风格）
   ============================================================ */
input[type="checkbox"].adm-switch {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #c9cdd4;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  vertical-align: middle;
  border: none;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}
input[type="checkbox"].adm-switch:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 91, 184, 0.14);
}
input[type="checkbox"].adm-switch::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
input[type="checkbox"].adm-switch:checked { background: var(--brand); }
input[type="checkbox"].adm-switch:checked::before { left: 20px; }

/* 列表页布尔列：原生勾选框 / √× 图标，统一政务蓝强调色 */
#result_list td input[type="checkbox"] {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
#result_list td img[src*="icon-yes"], #result_list td img[src*="icon-no"] { width: 16px; height: 16px; }
/* 行首多选框同样统一 */
#result_list .action-checkbox, #action-toggle { accent-color: var(--brand); width: 15px; height: 15px; }

/* 列表内联编辑（list_editable）：输入框按类型收敛宽度，避免占满整列 */
#result_list td input[type="text"],
#result_list td input[type="url"],
#result_list td input[type="email"],
#result_list td input[type="password"] {
  width: auto;
  min-width: 130px;
  max-width: 260px;
  box-sizing: border-box;
}
#result_list td input[type="number"] {
  width: auto;
  min-width: 72px;
  max-width: 110px;
  box-sizing: border-box;
}
#result_list td select { width: auto; max-width: 240px; }

/* ============================================================
   编辑/添加表单：短字段两列并排，大字段独占整行
   label 在上、输入框在下，左对齐整齐排列
   ============================================================ */
fieldset.module.aligned {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  column-gap: 24px;
  min-width: 0;
}
/* 标题/错误提示/说明 跨整行 */
fieldset.module.aligned > h2,
fieldset.module.aligned > .errornote,
fieldset.module.aligned > p.description { grid-column: 1 / -1; }

/* 每行：label 上、控件下 */
fieldset.module.aligned > .form-row { overflow: visible; }
fieldset.module.aligned > .form-row > div > .flex-container,
fieldset.module.aligned > .form-row > .flex-container {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
fieldset.module.aligned .flex-container > label,
fieldset.module.aligned .flex-container > .field-box > label {
  width: auto !important;
  min-width: 0 !important;
  padding: 0;
  float: none;
  text-align: left;
}
/* 控件占满列宽 */
fieldset.module.aligned .form-row input[type="text"],
fieldset.module.aligned .form-row input[type="url"],
fieldset.module.aligned .form-row input[type="number"],
fieldset.module.aligned .form-row input[type="email"],
fieldset.module.aligned .form-row input[type="password"],
fieldset.module.aligned .form-row select {
  width: 100%;
  max-width: none;
  margin-left: 0;
}
fieldset.module.aligned .form-row input.vDateField,
fieldset.module.aligned .form-row input.vTimeField { width: 140px !important; }
/* 整行内的 textarea 占满 */
fieldset.module.aligned > .form-row:has(textarea) textarea { max-width: none; }
/* 帮助文字/只读内容顶格 */
fieldset.module.aligned .form-row p.help,
fieldset.module.aligned .form-row div.help,
fieldset.module.aligned .form-row .readonly { margin-left: 0; padding-left: 0; }

/* 大字段独占整行：textarea / 穿梭框 / checkbox 组 / 多字段组合行 / 文件上传 / 媒体上传按钮 */
fieldset.module.aligned > .form-row:has(textarea),
fieldset.module.aligned > .form-row:has(.selector),
fieldset.module.aligned > .form-row:has(ul),
fieldset.module.aligned > .form-row:has(.file-upload),
fieldset.module.aligned > .form-row:has(.adm-up-row),
fieldset.module.aligned > .form-row.form-multiline,
fieldset.module.aligned > .form-row.checkbox-row {
  grid-column: 1 / -1;
}

/* ============================================================
   列表页：顶部横排下拉筛选条（替代右侧竖排过滤器）
   ============================================================ */
.adm-filterbar {
  order: 3;
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 4px 0 12px;
}
.adm-filter-item { display: flex; flex-direction: column; gap: 4px; }
.adm-filter-item label { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.adm-filter-item select {
  height: 32px;
  min-width: 130px;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}
.adm-filter-item select:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 91, 184, 0.14);
}
.adm-filter-clear { font-size: 12px; color: var(--ink-3); padding-bottom: 9px; }
.adm-filter-clear:hover { color: var(--brand); }

/* ============================================================
   列表页：搜索 + 动作 合并为一行（紧凑布局）
   原理：form 用 display:contents，让 .actions 与 #toolbar 成为
   同一 flex 容器的子项排在同一行，表单提交逻辑不受影响。
   ============================================================ */
.changelist-form-container { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#changelist-form { display: contents; }
#changelist-form > .hiddenfields, #changelist-form > .adm-mgmt { display: none; }  /* 隐藏表单位 */
#changelist-form > .results { order: 4; flex: 1 1 100%; }
#changelist .date_hierarchy { order: 3; flex: 1 1 100%; margin: 0 !important; border: none !important; padding: 0 !important; }
/* Django 6.1 起日期钻取改为 <nav class="toplinks">（原 .date_hierarchy 不再渲染） */
#changelist .toplinks { order: 3; flex: 1 1 100%; margin: 0 !important; border: none !important; padding: 4px 0 !important; }
#changelist #result_list { order: 4; flex: 1 1 100%; }
#changelist .paginator { order: 5; flex: 1 1 100%; margin-top: 8px; }

#toolbar { order: 1; flex: 0 0 auto; margin: 0 !important; padding: 0; background: none; border: none; min-width: 0; }
#changelist-search { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
#changelist-search > div { display: flex; align-items: center; gap: 6px; }
#toolbar #searchbar { width: 200px; margin: 0; }
#changelist-search input[type="submit"] { margin: 0; }

#changelist .actions {
  order: 2;
  flex: 0 1 auto;
  width: auto !important;  /* 覆盖原生 width:100%，否则独占一行 */
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  min-height: 0;
}
#changelist .actions label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  margin: 0;
}
#changelist .actions select {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px;
  font-size: 13px;
  max-width: 160px;
  background: #fff;
  color: var(--ink);
  margin: 0;
}
#changelist .actions .button { margin: 0; }
#changelist .actions .action-counter,
#changelist .actions .all,
#changelist .actions .question { font-size: 12px; color: var(--ink-3); margin: 0; }
#changelist .actions .question { display: none; }  /* 「选中x个中的0个」由 action-counter 承担，避免重复 */

/* Django 6.1 兼容：原生 changelists.css 的
   #changelist .changelist-form-container > div { flex:1 1 auto } 及
   :not(:has(#changelist-filter)) > div { width:100% }
   会把 #toolbar 撑满整行、动作栏被挤到第二行；用双 ID 前缀提高优先级压回一行 */
#content #changelist .changelist-form-container { align-items: center; }
#content #changelist .changelist-form-container > div#toolbar { flex: 0 0 auto; width: auto; }
#content #changelist .changelist-form-container > div.adm-filterbar { flex: 1 1 100%; width: auto; }

/* Django 6.1 responsive.css（≤1024px 视口生效）会把搜索框宽度压成 0、
   动作栏子项改为独占整行，与同行布局冲突；用更高优先级压回 */
@media (max-width: 1024px) {
  #toolbar form input#searchbar { flex: 0 0 auto; width: 160px; height: auto; margin: 0; }
  #changelist .actions label { flex: 0 0 auto; }
  #changelist .actions select { flex: 0 0 auto; width: auto; }
  #changelist .actions span { flex: 0 0 auto; }
  #changelist .actions .button { min-width: 0; margin: 0; }
}

/* ============================================================
   编辑表单页：政务分区卡片
   ============================================================ */
/* fieldset 标题栏加左侧蓝色强调条 */
.module h2, .inline-group h2 {
  position: relative;
  padding-left: 26px !important;
}
.module h2::before, .inline-group h2::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  background: var(--brand);
  border-radius: 2px;
}
/* 折叠 fieldset */
fieldset.collapsed h2, .inline-group.collapsed h2 { background: #f5f7fa; }
.collapse-toggle { color: var(--brand); font-size: 12px; margin-left: 8px; }

/* Django 6.1 的无障碍隐藏标题（如「搜索 提现记录」「提现记录分页」）
   上面的 .module h2 { position: relative; padding } 会破坏 .visually-hidden，
   导致其显示成带蓝色竖条的小方块，这里强制恢复隐藏 */
.visually-hidden,
.module h2.visually-hidden,
#content h2.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}
.module h2.visually-hidden::before { display: none !important; }

/* 表单行优化 */
.form-row { position: relative; }
.form-row:hover { background: #fafcfe; }
.aligned label { font-weight: 500; color: var(--ink); }
.aligned label.required { font-weight: 600; }
/* 必填星号 */
.required label::before, label.required::before {
  content: "* ";
  color: #c0272d;
  font-weight: 700;
}
/* 字段错误 */
.errorlist { margin: 4px 0 0 !important; padding: 0 !important; list-style: none; }
.errorlist li { color: #c0272d; font-size: 12.5px; padding: 2px 0; }
.errornote {
  background: #fff1f0;
  border: 1px solid #ffccc7;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  color: #c0272d;
  font-size: 13px;
  margin-bottom: 16px;
}
/* 输入框合理宽度 */
.form-row input[type="text"]:not(.vDateField):not(.vTimeField),
.form-row input[type="url"], .form-row input[type="number"],
.form-row textarea, .form-row select {
  max-width: 560px;
}
.form-row textarea { width: 100%; min-height: 80px; }
/* 日期时间字段 */
input.vDateField, input.vTimeField { width: 140px !important; }
.datetimeshortcuts { font-size: 12px; margin-left: 6px; }
.datetimeshortcuts a { color: var(--brand); }

/* ============================================================
   上传按钮行：紧贴字段，不孤立
   ============================================================ */
.adm-up-row {
  display: inline-flex !important;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 2px;
  align-items: center;
}

/* ============================================================
   关联选择器图标按钮（select 旁的 加/改/删 小图标）
   ============================================================ */
.related-widget-wrapper { display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; width: 100%; }
.related-widget-wrapper select { flex: 1 1 auto; min-width: 0; }
.related-widget-wrapper a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  transition: all .15s;
}
.related-widget-wrapper a:hover { border-color: var(--brand); background: var(--brand-soft); }
.related-widget-wrapper a img { width: 14px; height: 14px; }
.related-widget-wrapper a.add-related:hover { border-color: var(--brand); }
.related-widget-wrapper a.delete-related:hover { border-color: #ffa39e; background: #fff1f0; }
.related-widget-wrapper .related-lookup:hover { border-color: var(--brand); }

/* ============================================================
   多对多穿梭框（selector widget）
   ============================================================ */
.selector { width: 100% !important; max-width: 860px; }
.selector select {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  font-size: 13px !important;
}
.selector h2 {
  background: var(--brand-soft) !important;
  color: var(--brand-strong) !important;
  border: 1px solid var(--brand-tint) !important;
  border-bottom: none !important;
  border-radius: 8px 8px 0 0;
  font-size: 13px !important;
  font-weight: 600;
  padding: 8px 12px !important;
}
.selector .selector-available, .selector .selector-chosen { background: #fff; }
.selector .selector-filter { border: 1px solid var(--line); border-bottom: none; padding: 6px 8px; }
.selector .selector-filter input { border: none !important; box-shadow: none !important; padding: 2px 4px; }
.selector ul.selector-chooser { align-self: center; padding: 0 6px; }
.selector .selector-add, .selector .selector-remove,
.selector .selector-chooseall, .selector .selector-clearall {
  background: var(--brand-soft);
  border: 1px solid var(--brand-tint);
  border-radius: 6px;
  color: var(--brand-strong);
  font-size: 12px;
}
.selector .selector-add:hover, .selector .selector-remove:hover,
.selector .selector-chooseall:hover, .selector .selector-clearall:hover {
  background: var(--brand);
  color: #fff;
}
.selector .help-icon { display: none; }

/* ============================================================
   复选框列表（权限等 checkbox 矩阵）
   ============================================================ */
.aligned ul { list-style: none; padding: 0; margin: 0; }
.aligned ul li { padding: 3px 0; }
.aligned ul li label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 5px;
  transition: background .12s;
}
.aligned ul li label:hover { background: var(--brand-soft); }
.aligned ul input[type="checkbox"] {
  accent-color: var(--brand);
  width: 15px;
  height: 15px;
  margin: 0;
  flex-shrink: 0;
}
.aligned ul input[type="radio"] {
  accent-color: var(--brand);
  width: 15px;
  height: 15px;
  margin: 0;
  flex-shrink: 0;
}

/* ============================================================
   Stacked Inline / Tabular Inline
   ============================================================ */
.inline-related { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.inline-related h3 {
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-2);
  margin: 0;
}
.inline-related h3 b { color: var(--ink); }
.add-row { padding: 10px 14px; border-top: 1px dashed var(--line); }
.add-row a { color: var(--brand); font-size: 13px; }
.add-row a:hover { text-decoration: underline; }
/* tabular inline 表头 */
.tabular table thead th {
  background: #fafbfc;
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 600;
}
.tabular .add-row td { background: #fafcfe; }

/* ============================================================
   删除确认页
   ============================================================ */
.delete-confirmation #content h1 { color: #c0272d; font-size: 18px; }
.delete-confirmation #content h2 { font-size: 14px; color: var(--ink); margin: 18px 0 8px; }
.delete-confirmation #content > p { font-size: 13.5px; color: var(--ink-2); }
.delete-confirmation input[type="submit"] {
  background: #c0272d;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 22px;
  font-size: 13.5px;
}
.delete-confirmation input[type="submit"]:hover { background: #a01f24; filter: none; }
.delete-confirmation .cancel-link {
  display: inline-block;
  margin-left: 10px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  background: #fff;
  font-size: 13.5px;
}
.delete-confirmation .cancel-link:hover { border-color: var(--brand-tint); color: var(--brand); background: #fff; }
.delete-confirmation ul { background: #fff7e6; border: 1px solid #ffe7ba; border-radius: var(--radius-sm); padding: 12px 16px 12px 32px; }
.delete-confirmation ul#deleted-objects { background: #fff; border-color: var(--line); }
.delete-confirmation ul li { padding: 3px 0; font-size: 13.5px; }
.delete-confirmation ul li a { color: var(--brand-strong); }

/* ============================================================
   只读字段 / 密码修改 / 弹窗
   ============================================================ */
.form-row .readonly { padding: 8px 0; color: var(--ink); font-size: 13.5px; }
.form-row .readonly img { border-radius: 6px; }
/* 修改密码页 */
#password_change_form, form[id$="password"] { max-width: 520px; }
/* 弹窗页面 */
.is-popup #container { min-width: 0; }
.is-popup #content { padding: 16px 20px; }
.is-popup .module h2::before { left: 10px; }

/* ============================================================
   对象历史 / 杂项
   ============================================================ */
#change-history tbody td { font-size: 13px; }
/* 面包屑下的 h1 区域 */
#content > h1 { border-bottom: 2px solid var(--brand); padding-bottom: 8px; display: inline-block; }
/* 提交行按钮间距 */
.submit-row input + input, .submit-row input + a { margin-left: 8px; }
/* 文件上传字段 */
p.file-upload { margin-top: 4px; }
p.file-upload a { color: var(--brand); }
/* 图片预览 */
.file-upload img, .readonly img { max-width: 200px; border-radius: 6px; border: 1px solid var(--line); }

/* ============================================================
   左侧导航栏（#nav-sidebar）政务蓝
   覆盖 Django 原生 table 结构：module/caption/td/addlink
   ============================================================ */
:root {
  --selected-row: #eaf2fb;  /* 原 #ffc 浅黄 → 政务浅蓝（表格选中行同步生效） */
}

#nav-sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  border-right: none;
}
#nav-sidebar .sticky { padding: 14px 12px; }

/* 筛选输入框 */
#nav-filter {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  padding: 7px 12px;
  font-size: 13px;
  margin-bottom: 10px;
}
#nav-filter::placeholder { color: rgba(255, 255, 255, 0.55); }
#nav-filter:focus { background: #fff; color: var(--ink); border-color: var(--brand-tint); outline: none; }
#nav-filter:focus::placeholder { color: var(--ink-3); }
#nav-filter.no-results { background: rgba(192, 39, 45, 0.25); color: #fff; }

/* 应用分组卡片：去掉白底卡片化 */
#nav-sidebar .module {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  margin-bottom: 6px;
  overflow: visible;
}
#nav-sidebar .module caption,
#nav-sidebar .module th {
  background: none !important;
  color: #7fa3d4 !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 6px 6px;
  border: none;
  text-align: left;
}
#nav-sidebar .module caption a,
#nav-sidebar .module caption .section,
#nav-sidebar .current-app .section:link,
#nav-sidebar .current-app .section:visited {
  color: #7fa3d4 !important;
  font-weight: 600;
}

/* 菜单项（table 结构：th=菜单链接，td=增加按钮；tr 原生有浅灰底需清除） */
#nav-sidebar .module tr,
#nav-sidebar .module tbody tr { background: none !important; }
#nav-sidebar .module td { border: none; padding: 0; background: none !important; }
#nav-sidebar .module th { border: none; padding: 0; background: none !important; }
#nav-sidebar .module td a,
#nav-sidebar .module th a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: #c6d7f0;
  font-size: 13.5px;
  line-height: 1.4;
  transition: background .15s, color .15s;
}
#nav-sidebar .module td a:hover,
#nav-sidebar .module th a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* 当前选中项：政务蓝高亮块 */
#nav-sidebar .current-model td { background: none !important; }
#nav-sidebar .current-model td a,
#nav-sidebar .current-model th a {
  background: var(--brand) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: var(--shadow-brand);
}
#nav-sidebar .current-model td a:hover { background: #2e6fd1 !important; }

/* 行内「增加」按钮：隐藏（入口保留在列表页右上角） */
#nav-sidebar .addlink,
#nav-sidebar .module td { display: none !important; }
#nav-sidebar .module th { width: 100%; }

/* 侧栏收窄 275px → 200px，内容区联动 */
#nav-sidebar { flex: 0 0 200px; left: -201px; margin-left: -201px; }
.main.shifted > #nav-sidebar + .content { max-width: calc(100% - 224px); }

/* 收起/展开按钮适配深蓝 */
.toggle-nav-sidebar {
  background: var(--sidebar);
  color: #c6d7f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.toggle-nav-sidebar:hover, .toggle-nav-sidebar:focus { background: var(--sidebar-2); color: #fff; }

/* ============================================================
   侧栏菜单图标（政务单色线条，mask 继承文字色）
   ============================================================ */
#nav-sidebar .module th a { position: relative; padding-left: 34px; }
#nav-sidebar .module th a::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  background-color: currentColor;
  opacity: .8;
  -webkit-mask-image: var(--mi, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E"));
  mask-image: var(--mi, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E"));
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
#nav-sidebar .current-model th a::before { opacity: 1; }

/* 人/账户类 */
#nav-sidebar .model-user th a, #nav-sidebar .model-userprofile th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }
#nav-sidebar .model-group th a, #nav-sidebar .model-socialworkerapplication th a, #nav-sidebar .model-teamapplication th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
#nav-sidebar .model-staffprofile th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Ccircle cx='8' cy='11' r='2'/%3E%3Cpath d='M5.5 16a2.5 2.5 0 0 1 5 0'/%3E%3Cpath d='M14 9h5'/%3E%3Cpath d='M14 13h5'/%3E%3C/svg%3E"); }
#nav-sidebar .model-companion th a, #nav-sidebar .model-counselor th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E"); }

/* 机构/医院类 */
#nav-sidebar .model-organization th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z'/%3E%3Cpath d='M2 22h20'/%3E%3Cpath d='M10 6h4'/%3E%3Cpath d='M10 10h4'/%3E%3Cpath d='M10 14h4'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E"); }
#nav-sidebar .model-hospital th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 22h18'/%3E%3Cpath d='M5 22V7l7-4 7 4v15'/%3E%3Cpath d='M12 10v6'/%3E%3Cpath d='M9 13h6'/%3E%3C/svg%3E"); }

/* 服务/订单类 */
#nav-sidebar .model-service th a, #nav-sidebar .model-servicecategory th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M12 11h4'/%3E%3Cpath d='M12 16h4'/%3E%3Cpath d='M8 11h.01'/%3E%3Cpath d='M8 16h.01'/%3E%3C/svg%3E"); }
#nav-sidebar .model-order th a, #nav-sidebar .model-ordertimeline th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v5h5'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E"); }

/* 商城类 */
#nav-sidebar .model-product th a, #nav-sidebar .model-productsku th a, #nav-sidebar .model-productcategory th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/%3E%3Cpath d='M3.3 7 12 12l8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C/svg%3E"); }
#nav-sidebar .model-productorder th a, #nav-sidebar .model-cartitem th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E"); }
#nav-sidebar .model-productrefundrequest th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7v6h6'/%3E%3Cpath d='M21 17a9 9 0 0 0-15-6.7L3 13'/%3E%3C/svg%3E"); }

/* 内容/营销类 */
#nav-sidebar .model-banner th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/%3E%3C/svg%3E"); }
#nav-sidebar .model-article th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0V9'/%3E%3Cpath d='M18 14h-8'/%3E%3Cpath d='M15 18h-5'/%3E%3Cpath d='M10 6h8v4h-8V6Z'/%3E%3C/svg%3E"); }
#nav-sidebar .model-announcement th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E"); }
#nav-sidebar .model-coupontemplate th a, #nav-sidebar .model-usercoupon th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z'/%3E%3Cpath d='M13 5v2'/%3E%3Cpath d='M13 17v2'/%3E%3Cpath d='M13 11v2'/%3E%3C/svg%3E"); }
#nav-sidebar .model-liveroom th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 8-6 4 6 4V8Z'/%3E%3Crect x='2' y='6' width='14' height='12' rx='2'/%3E%3C/svg%3E"); }

/* 会员/财务类 */
#nav-sidebar .model-memberlevel th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.477 12.89 17 22l-5-3-5 3 1.523-9.11'/%3E%3C/svg%3E"); }
#nav-sidebar .model-insurancepolicy th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3C/svg%3E"); }
#nav-sidebar .model-withdrawal th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12V7H5a2 2 0 0 1 0-4h14v4'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h16v-5'/%3E%3Cpath d='M18 12a2 2 0 0 0 0 4h4v-4Z'/%3E%3C/svg%3E"); }
#nav-sidebar .model-pointslog th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M18.09 10.37A6 6 0 1 1 10.34 18'/%3E%3Cpath d='M7 6h1v4'/%3E%3Cpath d='m16.71 13.88.7.71-2.82 2.82'/%3E%3C/svg%3E"); }
#nav-sidebar .model-orgsettlement th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z'/%3E%3Cpath d='M8 7h8'/%3E%3Cpath d='M8 11h8'/%3E%3Cpath d='M8 15h5'/%3E%3C/svg%3E"); }

/* 互动/反馈类 */
#nav-sidebar .model-feedback th a, #nav-sidebar .model-chatmessage th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
#nav-sidebar .model-review th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E"); }

/* 入驻/预约类 */
#nav-sidebar .model-familysign th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E"); }
#nav-sidebar .model-cooperationapply th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E"); }
#nav-sidebar .model-trainingrecord th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 10v6'/%3E%3Cpath d='M2 10l10-5 10 5-10 5z'/%3E%3Cpath d='M6 12v5c3 3 9 3 12 0v-5'/%3E%3C/svg%3E"); }
#nav-sidebar .model-useraddress th a, #nav-sidebar .model-vaccinesite th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
#nav-sidebar .model-counselingappointment th a, #nav-sidebar .model-vaccineappointment th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E"); }
#nav-sidebar .model-vaccine th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 2 4 4'/%3E%3Cpath d='m17 7 3-3'/%3E%3Cpath d='M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5'/%3E%3Cpath d='m9 11 4 4'/%3E%3Cpath d='m5 19-3 3'/%3E%3Cpath d='m14 4 6 6'/%3E%3C/svg%3E"); }

/* 系统类 */
#nav-sidebar .model-adminsession th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
#nav-sidebar .model-siteconfig th a { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 1v4'/%3E%3Cpath d='M12 19v4'/%3E%3Cpath d='M4.2 4.2l2.8 2.8'/%3E%3Cpath d='M17 17l2.8 2.8'/%3E%3Cpath d='M1 12h4'/%3E%3Cpath d='M19 12h4'/%3E%3Cpath d='M4.2 19.8 7 17'/%3E%3Cpath d='M17 7l2.8-2.8'/%3E%3C/svg%3E"); }

/* ============================================================
   侧栏分组折叠菜单（2026-10-25）
   大类（details/summary）+ 二级类链接，深蓝底白字
   ============================================================ */
.adm-nav-group { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.adm-nav-summary {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; cursor: pointer; list-style: none;
  color: #c6d7f0; font-size: 13px; font-weight: 600;
  border-radius: 6px; user-select: none;
}
.adm-nav-summary::-webkit-details-marker { display: none; }
.adm-nav-summary:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.adm-nav-summary .ui-icon { flex: 0 0 auto; opacity: 0.85; }
.adm-nav-caret {
  margin-left: auto; display: inline-flex;
  color: rgba(255, 255, 255, 0.45); transition: transform 0.15s;
}
.adm-nav-group[open] > .adm-nav-summary .adm-nav-caret { transform: rotate(90deg); }
.adm-nav-group[open] > .adm-nav-summary { color: #fff; }
.adm-nav-list { list-style: none; margin: 0; padding: 0 0 6px; }
.adm-nav-list li { margin: 0; }
.adm-nav-link {
  display: block; padding: 7px 12px 7px 36px;
  color: #a9c2e4; font-size: 13px; border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.adm-nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.adm-nav-link.adm-nav-on {
  background: var(--brand) !important; color: #fff !important;
  font-weight: 600; box-shadow: var(--shadow-brand);
}
.adm-hide { display: none !important; }
