/* ============ 登记OT - v2.3.0 视觉重构（零依赖） ============ */
/* 设计基调：沉静的专业感 —— 墨青主色 + 温白背景 + 柔和分层阴影 + 圆角卡片 */
:root {
  /* 色板 */
  --primary: #15496b;
  --primary-dark: #0e3550;
  --primary-mid: #2a6a94;
  --primary-light: #e8f1f7;
  --primary-glow: rgba(21, 73, 107, .18);

  --success: #12805c;
  --success-light: #e3f4ed;
  --warning: #9a6410;
  --warning-light: #fdf3e2;
  --danger: #b23b32;
  --danger-light: #fcebe9;
  --info: #2f6b9a;
  --info-light: #e9f2fa;

  --gray-1: #f4f6f8;
  --gray-2: #e7ebef;
  --gray-3: #c3cbd4;
  --gray-4: #6d7887;
  --gray-5: #3a4552;

  --text: #17212e;
  --bg: #eef1f5;
  --card: #ffffff;

  --radius: 12px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(23, 33, 46, .05);
  --shadow-sm: 0 1px 2px rgba(23, 33, 46, .05), 0 2px 6px rgba(23, 33, 46, .04);
  --shadow-md: 0 2px 4px rgba(23, 33, 46, .05), 0 8px 20px rgba(23, 33, 46, .06);
  --shadow-lg: 0 12px 32px rgba(23, 33, 46, .12);
  --border: 1px solid var(--gray-2);
  --border-soft: 1px solid var(--gray-1);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --topbar-h: 54px;
  --tabbar-h: 58px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
#app { min-height: 100%; }
button, input, select, textarea { font-family: inherit; font-size: 15px; color: inherit; outline: none; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
::selection { background: var(--primary-glow); }

/* 滚动条（桌面端） */
@media (min-width: 880px) {
  ::-webkit-scrollbar { width: 9px; height: 9px; }
  ::-webkit-scrollbar-thumb { background: var(--gray-3); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
  ::-webkit-scrollbar-thumb:hover { background: var(--gray-4); background-clip: content-box; }
  ::-webkit-scrollbar-track { background: transparent; }
}

/* ---------- 启动加载 ---------- */
.boot-loading { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--gray-4); font-size: 13px; letter-spacing: .5px; }
.spinner { width: 30px; height: 30px; border: 2.5px solid var(--gray-2); border-top-color: var(--primary); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 布局骨架 ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.sidebar { display: none; } /* 移动端隐藏，桌面端由媒体查询开启 */
.topbar {
  position: sticky; top: 0; z-index: 50; height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(135deg, var(--primary) 0%, #1b5a80 100%);
  color: #fff;
  box-shadow: 0 1px 12px rgba(14, 53, 80, .22);
}
.topbar .tb-title { flex: 1; font-size: 16.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .2px; }
.topbar .tb-icon-btn {
  position: relative; width: 38px; height: 38px; border: none; background: rgba(255,255,255,.1);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 10px;
  transition: background .18s var(--ease);
}
.topbar .tb-icon-btn:active, .topbar .tb-icon-btn:hover { background: rgba(255,255,255,.2); }
.topbar .tb-icon-btn svg { width: 20px; height: 20px; }
.badge-dot {
  position: absolute; top: 1px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px;
  background: #e2574c; color: #fff; border-radius: 9px; font-size: 10.5px; line-height: 17px; text-align: center; font-weight: 700;
  box-shadow: 0 0 0 2px var(--primary);
}
.tb-back { display: flex; align-items: center; gap: 2px; background: rgba(255,255,255,.1); border: none; color: #fff; font-size: 13.5px; cursor: pointer; padding: 7px 10px 7px 6px; border-radius: 10px; margin-right: 2px; }
.tb-back:active { background: rgba(255,255,255,.2); }
.tb-back svg { width: 18px; height: 18px; }
.main {
  flex: 1; padding: 16px 14px calc(var(--tabbar-h) + var(--safe-bottom) + 26px);
  max-width: 880px; width: 100%; margin: 0 auto;
  animation: pageIn .28s var(--ease);
}
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; justify-content: space-around;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(23,33,46,.07);
  box-shadow: 0 -2px 16px rgba(23,33,46,.05);
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
}
.tabbar .tab-item {
  flex: 1; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--gray-4); font-size: 10.5px; padding-top: 7px; font-weight: 500;
  transition: color .18s var(--ease); position: relative;
}
.tabbar .tab-item .tab-ico { display: flex; transition: transform .18s var(--ease); }
.tabbar .tab-item .tab-ico svg { width: 22px; height: 22px; }
.tabbar .tab-item.active { color: var(--primary); font-weight: 650; }
.tabbar .tab-item.active .tab-ico { transform: translateY(-1px); }
.tabbar .tab-item.add .tab-ico {
  background: linear-gradient(135deg, var(--primary) 0%, #1b5a80 100%);
  color: #fff; width: 46px; height: 32px; margin-top: -22px;
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 14px var(--primary-glow), 0 2px 4px rgba(14,53,80,.2);
  font-weight: 700; font-size: 20px;
}
.tabbar .tab-item.add .tab-ico svg { width: 20px; height: 20px; }
.tabbar .tab-item.add.active .tab-ico { filter: brightness(1.08); }

/* ---------- 卡片与通用 ---------- */
.card {
  background: var(--card); border-radius: var(--radius); border: var(--border-soft);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.card-title { font-size: 14.5px; font-weight: 700; margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; color: var(--text); letter-spacing: .1px; }
.card-title .more { font-size: 12.5px; color: var(--primary); font-weight: 600; cursor: pointer; padding: 2px 0 2px 6px; }
.card-title .more:hover { text-decoration: underline; }
.muted { color: var(--gray-4); font-size: 13px; }
.money { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--gray-4); padding: 38px 0; font-size: 13.5px; }
.empty .empty-ico { display: flex; justify-content: center; margin-bottom: 10px; }
.empty .empty-ico svg { width: 40px; height: 40px; color: var(--gray-3); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 18px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, #1b5a80 100%);
  color: #fff; font-size: 14.5px; font-weight: 650; cursor: pointer;
  letter-spacing: .2px; box-shadow: 0 2px 6px var(--primary-glow);
  transition: transform .12s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
}
.btn:active { transform: scale(.985); filter: brightness(.95); }
.btn:disabled { background: var(--gray-2) !important; color: var(--gray-4) !important; cursor: not-allowed; box-shadow: none; }
.btn.full { width: 100%; }
.btn.ghost { background: var(--primary-light); color: var(--primary); box-shadow: none; }
.btn.ghost:hover { background: #dce9f2; }
.btn.danger { background: linear-gradient(135deg, var(--danger) 0%, #9c2f27 100%); box-shadow: 0 2px 6px rgba(178,59,50,.22); }
.btn.danger-ghost { background: var(--danger-light); color: var(--danger); box-shadow: none; }
.btn.success { background: linear-gradient(135deg, var(--success) 0%, #0c6b4c 100%); box-shadow: 0 2px 6px rgba(18,128,92,.22); }
.btn.small { min-height: 31px; padding: 0 13px; font-size: 12.5px; border-radius: var(--radius-xs); font-weight: 650; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 13.5px; padding: 8px 4px; }

/* ---------- 表单 ---------- */
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 7px; color: var(--gray-5); letter-spacing: .1px; }
.form-item label .req { color: var(--danger); margin-left: 2px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 13px; border: 1.5px solid var(--gray-2);
  border-radius: var(--radius-sm); background: #fff; transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  -webkit-appearance: none; appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d7887' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.input::placeholder { color: var(--gray-3); }
.input:focus { border-color: var(--primary-mid); box-shadow: 0 0 0 4px var(--primary-glow); background: #fff; }
.input:disabled { background: var(--gray-1); color: var(--gray-4); cursor: not-allowed; }
textarea.input { min-height: 88px; resize: vertical; line-height: 1.6; }
.form-hint { font-size: 12px; color: var(--gray-4); margin-top: 6px; line-height: 1.6; }
.form-err { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; }
.form-err.show { display: block; }

/* 图片选择 */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.photo-add {
  aspect-ratio: 1; border: 1.5px dashed var(--gray-3); border-radius: var(--radius-sm); background: var(--gray-1);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--gray-4); font-size: 11px; cursor: pointer; transition: all .18s var(--ease);
}
.photo-add:active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.photo-add .pa-ico { display: flex; }
.photo-add .pa-ico svg { width: 24px; height: 24px; }
.photo-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--gray-1); border: var(--border-soft); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-del {
  position: absolute; top: 5px; right: 5px; width: 23px; height: 23px; border: none; border-radius: 7px;
  background: rgba(15, 23, 42, .62); color: #fff; font-size: 11px; line-height: 23px; text-align: center; cursor: pointer;
  backdrop-filter: blur(4px);
}

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); border: var(--border-soft);
  padding: 16px 12px; text-align: center; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gray-2);
}
.stat-card.c-blue::after { background: linear-gradient(90deg, var(--primary), var(--primary-mid)); }
.stat-card.c-orange::after { background: linear-gradient(90deg, #c98a1f, #e2b562); }
.stat-card.c-green::after { background: linear-gradient(90deg, var(--success), #34a37d); }
.stat-card .sc-num { font-size: 26px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.6px; }
.stat-card .sc-label { font-size: 11.5px; color: var(--gray-4); margin-top: 4px; letter-spacing: .3px; }
.stat-card.c-blue .sc-num { color: var(--primary); }
.stat-card.c-orange .sc-num { color: var(--warning); }
.stat-card.c-green .sc-num { color: var(--success); }

/* ---------- 条形统计 ---------- */
.bar-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--gray-1); }
.bar-row:last-child { border-bottom: none; }
.bar-row .br-name { width: 86px; flex-shrink: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gray-5); }
.bar-row .br-track { flex: 1; background: var(--gray-1); height: 10px; border-radius: 999px; overflow: hidden; }
.bar-row .br-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-mid)); border-radius: 999px; min-width: 4px; transition: width .5s var(--ease); }
.bar-row .br-val { width: 44px; text-align: right; font-size: 13px; font-weight: 700; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ---------- 列表条目 ---------- */
.record-card {
  display: block; background: var(--card); border-radius: var(--radius); border: var(--border-soft);
  padding: 12px 14px 12px 17px; margin-bottom: 10px; cursor: pointer; position: relative;
  box-shadow: var(--shadow-sm); transition: transform .14s var(--ease), box-shadow .18s var(--ease);
}
.record-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.record-card:active { transform: scale(.994); }
.record-card::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gray-3); }
.record-card.is-pending::before { background: #d99b2b; }
.record-card.is-done::before { background: var(--success); }
.record-card .rc-row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.record-card .rc-row1 .rc-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .1px; }
.record-card .rc-amount { flex-shrink: 0; font-size: 14.5px; }
.record-card .rc-row2 { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.record-card .rc-row2 .rc-meta { flex: 1; min-width: 0; font-size: 12px; color: var(--gray-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-card .rc-row2 .tag, .record-card .rc-row2 .rc-complete { flex-shrink: 0; }
.record-card .rc-complete { margin-left: 2px; }
.record-card.is-done .rc-row1 .rc-title { color: var(--gray-4); font-weight: 600; }
.record-card.is-done .rc-amount { color: var(--gray-4); font-weight: 600; }
.record-card.is-done .rc-row2 .tag { opacity: .85; }
.card .record-card { margin-bottom: 8px; box-shadow: none; border: 1px solid var(--gray-1); }
.card .record-card:last-child { margin-bottom: 0; }
.tag { display: inline-flex; align-items: center; padding: 2.5px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 650; white-space: nowrap; letter-spacing: .2px; }
.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-orange { background: var(--warning-light); color: var(--warning); }
.tag-green { background: var(--success-light); color: var(--success); }
.tag-gray { background: var(--gray-1); color: var(--gray-4); }

/* ---------- Tab 切换 ---------- */
.seg { display: flex; background: var(--card); border-radius: var(--radius); padding: 4px; margin-bottom: 12px; box-shadow: var(--shadow-xs); border: var(--border-soft); gap: 2px; }
.seg .seg-item {
  flex: 1; border: none; background: none; min-height: 36px; border-radius: 8px; color: var(--gray-4);
  font-size: 13.5px; cursor: pointer; font-weight: 550; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: all .18s var(--ease);
}
.seg .seg-item.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.seg .seg-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gray-2); color: var(--gray-5); font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.seg .seg-item.active .seg-count { background: var(--primary); color: #fff; }

/* ---------- 科室下拉 / chips ---------- */
.form-item-dept { position: relative; }
.dept-dropdown { display: none; background: #fff; border: var(--border); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); max-height: 240px; overflow-y: auto; box-shadow: var(--shadow-lg); margin-top: -1px; }
.dept-dropdown.open { display: block; }
.dept-option { padding: 11px 14px; font-size: 14.5px; color: var(--text); border-bottom: 1px solid var(--gray-1); cursor: pointer; }
.dept-option:last-child { border-bottom: none; }
.dept-option.on { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.dept-option:not(.on):active { background: var(--gray-1); }
.dept-empty { color: var(--gray-4); cursor: default; text-align: center; }

.dept-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 0 10px; }
.dept-chips.collapsed { max-height: 38px; overflow: hidden; }
.chip {
  border: 1px solid var(--gray-2); background: #fff; color: var(--gray-5); border-radius: var(--radius-pill);
  padding: 6px 14px; font-size: 13px; cursor: pointer; white-space: nowrap; font-weight: 550;
  transition: all .16s var(--ease);
}
.chip:active { background: var(--gray-1); transform: scale(.97); }
.chip.on { background: linear-gradient(135deg, var(--primary), #1b5a80); border-color: transparent; color: #fff; font-weight: 650; box-shadow: 0 2px 6px var(--primary-glow); }
.chip-toggle { order: -1; border-style: dashed; color: var(--primary); background: var(--primary-light); }

/* 科室搜索 + 快捷条（v2.5.0：34 个科室平铺太散，先搜后选） */
.dept-filter { margin: 0 0 10px; }
.dept-filter-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.dept-filter-head .dept-filter-kw { flex: 1; min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.dept-filter-head .chip-toggle { order: 0; flex: 0 0 auto; }
.dept-empty-tip { color: var(--gray-4); font-size: 13px; padding: 8px 2px; }

/* ---------- 筛选 ---------- */
.filter-bar { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.filter-bar .input { min-height: 40px; padding: 7px 12px; font-size: 14px; }
.filter-bar .fb-kw { flex: 1; }
.filter-sheet { background: var(--card); border-radius: var(--radius); border: var(--border-soft); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-actions { display: flex; gap: 10px; margin-top: 12px; }
.filter-actions .btn { flex: 1; }

/* ---------- 详情 ---------- */
.detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--gray-1); font-size: 14px; }
.detail-row:last-child { border-bottom: none; }
.detail-row .dr-label { color: var(--gray-4); flex-shrink: 0; width: 76px; }
.detail-row .dr-value { text-align: right; word-break: break-all; font-weight: 550; }
.detail-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.detail-photos img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); width: 100%; cursor: zoom-in; background: var(--gray-1); border: var(--border-soft); }
.log-item { padding: 10px 0; border-bottom: 1px solid var(--gray-1); font-size: 13px; }
.log-item:last-child { border-bottom: none; }
.log-item .li-head { display: flex; justify-content: space-between; gap: 8px; }
.log-item .li-time { color: var(--gray-4); font-size: 12px; flex-shrink: 0; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(circle at 15% 12%, rgba(42,106,148,.20), transparent 45%),
    radial-gradient(circle at 88% 88%, rgba(21,73,107,.16), transparent 45%),
    linear-gradient(160deg, #eef2f6 0%, #e4ebf1 100%);
}
.login-box {
  width: 100%; max-width: 386px; background: rgba(255,255,255,.92); border-radius: 20px;
  padding: 36px 26px 26px; border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 20px 50px rgba(23,33,46,.13), 0 2px 8px rgba(23,33,46,.05);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.login-logo { text-align: center; margin-bottom: 4px; }
.login-logo .ll-ico {
  width: 60px; height: 60px; border-radius: 17px;
  background: linear-gradient(135deg, var(--primary) 0%, #1b5a80 100%); display: inline-flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 8px 20px var(--primary-glow);
}
.login-logo .ll-ico svg { width: 30px; height: 30px; }
.login-box h1 { text-align: center; font-size: 20px; margin: 16px 0 5px; letter-spacing: 1px; font-weight: 750; }
.login-box .login-sub { text-align: center; color: var(--gray-4); font-size: 12.5px; margin-bottom: 26px; letter-spacing: .8px; }
.login-tip { margin-top: 16px; font-size: 12px; color: var(--gray-4); background: var(--gray-1); border-radius: var(--radius-sm); padding: 11px 13px; line-height: 1.75; }
.dl-app { text-align: center; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--gray-2); }
.dl-app-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 13.5px; font-weight: 650; text-decoration: none; padding: 6px 10px; border-radius: var(--radius-xs); }
.dl-app-link:active { opacity: .7; background: var(--primary-light); }
.dl-app-link svg { width: 15px; height: 15px; }

/* ---------- 管理菜单 ---------- */
.menu-list { display: flex; flex-direction: column; gap: 10px; }
.menu-list .menu-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  background: var(--card); border-radius: var(--radius); border: var(--border-soft);
  padding: 15px 16px; cursor: pointer; text-align: left; font-size: 15px; font-weight: 650;
  box-shadow: var(--shadow-sm); transition: transform .14s var(--ease), box-shadow .18s var(--ease);
}
.menu-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.menu-item:active { transform: scale(.995); }
.menu-item .mi-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-item .mi-ico svg { width: 20px; height: 20px; }
.menu-item .mi-arrow { margin-left: auto; color: var(--gray-3); display: flex; }
.menu-item .mi-arrow svg { width: 16px; height: 16px; }
.menu-item .mi-desc { display: block; font-size: 12px; color: var(--gray-4); font-weight: 400; margin-top: 2px; }
/* 超管专属入口：加一点金色标识 */
.menu-item.super-only { border-color: #ecd7ae; background: linear-gradient(135deg, #fffdf8 0%, #ffffff 60%); }
.menu-item.super-only .mi-ico { background: linear-gradient(135deg, #f6e6c6, #fbf3e2); color: #9a6410; }
.menu-item .mi-badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-pill); background: #f6e6c6; color: #8a5a0d; margin-left: 6px; vertical-align: 1px; }

/* ---------- 用户/科室行 ---------- */
.row-card { background: var(--card); border-radius: var(--radius); border: var(--border-soft); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.row-card .rc-main { display: flex; align-items: center; gap: 11px; }
.row-card .rc-info { flex: 1; min-width: 0; }
.row-card .rc-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-card .rc-sub { font-size: 12.5px; color: var(--gray-4); margin-top: 3px; }
.row-card .rc-ops { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.avatar {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #2a6a94 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0; letter-spacing: .5px;
}

/* ---------- 账号管理 ---------- */
.u-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.u-stat-grid .stat-card { padding: 12px 4px; }
.u-stat-grid .stat-card::after { height: 3px; }
.u-stat-grid .sc-num { font-size: 21px; }
.u-stat-grid .sc-label { font-size: 10.5px; }
.u-toolbar { display: flex; gap: 8px; margin-bottom: 9px; }
.u-toolbar .u-search { flex: 1; min-height: 42px; }
.u-toolbar .btn { min-height: 42px; white-space: nowrap; padding: 0 15px; }
.u-filters { display: flex; gap: 8px; margin-bottom: 12px; }
.u-filters .u-sel { flex: 1; min-height: 38px; padding: 6px 30px 6px 10px; font-size: 13px; }
.u-filters .btn { min-height: 38px; font-size: 12.5px; white-space: nowrap; }
.u-group-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; color: var(--gray-4); letter-spacing: .6px; margin: 16px 2px 9px; text-transform: none; }
.u-group-head::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--primary-mid); }
.u-group-head:first-child { margin-top: 2px; }
.u-group-head .muted { font-weight: 400; letter-spacing: 0; }
.u-card { cursor: pointer; }
.u-card:active { border-color: var(--primary-mid); }
.u-card .rc-name .tag { font-size: 10.5px; padding: 1px 7px; }
.u-unlock { white-space: nowrap; }
.notice-card {
  background: linear-gradient(135deg, #fffaf0 0%, #fdf6e8 100%); border: 1px solid #f0d9a8;
  border-radius: var(--radius); padding: 13px 15px; margin-bottom: 12px; box-shadow: var(--shadow-xs);
}
.notice-card .nc-head { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--warning); }
.notice-card .nc-head svg { width: 16px; height: 16px; flex-shrink: 0; }
.notice-card .nc-body { font-size: 12.5px; color: var(--gray-5); margin-top: 8px; line-height: 1.7; }
.lock-chip { display: inline-block; background: #fff; border: 1px solid #f0d9a8; border-radius: var(--radius-xs); padding: 2px 8px; margin: 2px 5px 2px 0; font-size: 12px; }
@media (max-width: 400px) {
  .u-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .u-filters { flex-wrap: wrap; }
  .u-filters .u-sel { flex: 1 1 40%; }
}

/* ---------- 开关 ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--gray-1); gap: 12px; }
.switch-row:last-child { border-bottom: none; }
.switch-row .sw-label { font-size: 14.5px; font-weight: 650; }
.switch-row .sw-desc { font-size: 12px; color: var(--gray-4); margin-top: 2px; }
.switch { position: relative; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { display: none; }
.switch .sl { position: absolute; inset: 0; background: var(--gray-3); border-radius: var(--radius-pill); cursor: pointer; transition: background .22s var(--ease); }
.switch .sl::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; transition: left .22s var(--ease); box-shadow: 0 1px 4px rgba(0,0,0,.22); }
.switch input:checked + .sl { background: var(--success); }
.switch input:checked + .sl::after { left: 23px; }

/* ---------- 科室多选 ---------- */
.dept-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.dept-checks .dc-item {
  display: flex; align-items: center; gap: 5px; background: var(--card); border: 1.5px solid var(--gray-2);
  border-radius: var(--radius-pill); padding: 7px 13px; font-size: 13px; cursor: pointer; user-select: none; color: var(--gray-5);
  transition: all .16s var(--ease);
}
.dept-checks .dc-item.on { background: var(--primary-light); border-color: var(--primary-mid); color: var(--primary); font-weight: 650; }
.dept-checks .dc-item input { display: none; }

/* ---------- Toast / 弹层 ---------- */
#toast-box { position: fixed; top: 16%; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(23, 33, 46, .93); color: #fff; padding: 12px 22px; border-radius: 12px;
  font-size: 14px; max-width: 82vw; text-align: center; animation: fadeIn .22s var(--ease);
  box-shadow: 0 10px 28px rgba(23,33,46,.25); backdrop-filter: blur(6px); font-weight: 500;
}
.toast.err { background: rgba(178, 59, 50, .96); }
.toast.ok { background: rgba(18, 128, 92, .96); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; } }

.modal-mask { position: fixed; inset: 0; background: rgba(23, 33, 46, .5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(2px); }
.modal-mask[hidden] { display: none !important; }
.modal-sheet {
  background: #fff; width: 100%; max-width: 560px; border-radius: 20px 20px 0 0;
  padding: 20px 18px calc(18px + var(--safe-bottom)); max-height: 86vh; overflow-y: auto;
  animation: slideUp .26s var(--ease); box-shadow: 0 -8px 40px rgba(23,33,46,.18);
}
@keyframes slideUp { from { transform: translateY(48px); opacity: .3; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.sheet-head h3 { font-size: 16.5px; font-weight: 750; }
.sheet-close { border: none; background: var(--gray-1); width: 32px; height: 32px; border-radius: 10px; font-size: 14px; cursor: pointer; color: var(--gray-4); }

.img-viewer { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.img-viewer img { max-width: 96vw; max-height: 90vh; border-radius: 6px; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 10px; }
.pager button { min-width: 78px; }
.pager .pg-info { font-size: 12.5px; color: var(--gray-4); }

/* ---------- 通知 ---------- */
.notif-item { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--gray-1); }
.notif-item:last-child { border-bottom: none; }
.notif-item .ni-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-item .ni-ico svg { width: 18px; height: 18px; }
.notif-item.unread .ni-ico { background: linear-gradient(135deg, var(--primary), #2a6a94); color: #fff; }
.notif-item.unread .ni-title { font-weight: 750; }
.notif-item .ni-time { font-size: 12px; color: var(--gray-4); }
.notif-item .ni-title { font-size: 14px; }
.notif-item .ni-body { font-size: 13px; color: var(--gray-5); margin-top: 2px; }

/* ---------- 我的页面 ---------- */
.profile-head {
  display: flex; align-items: center; gap: 15px; padding: 24px 18px;
  background: linear-gradient(135deg, var(--primary) 0%, #1b5a80 100%);
  border-radius: var(--radius); color: #fff; margin: 0 0 14px;
  box-shadow: 0 8px 22px var(--primary-glow); position: relative; overflow: hidden;
}
.profile-head::after {
  content: ''; position: absolute; right: -40px; top: -60px; width: 170px; height: 170px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); border-radius: 50%;
}
.profile-head .avatar { width: 56px; height: 56px; font-size: 21px; background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.35); border-radius: 16px; backdrop-filter: blur(4px); }
.profile-head .ph-name { font-size: 18.5px; font-weight: 800; letter-spacing: .4px; }
.profile-head .ph-role { font-size: 11.5px; background: rgba(255,255,255,.2); padding: 3px 11px; border-radius: var(--radius-pill); margin-top: 6px; display: inline-block; letter-spacing: .4px; }

/* ================= 服务器监视器（超管专属） ================= */
.mon-hero {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  background: linear-gradient(135deg, #0f2f45 0%, #1b4f6e 55%, #22617f 100%);
  border-radius: var(--radius); color: #fff; margin-bottom: 12px;
  box-shadow: 0 10px 26px rgba(15,47,69,.28); position: relative; overflow: hidden;
}
.mon-hero::after { content: ''; position: absolute; right: -50px; bottom: -70px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,255,255,.10), transparent 65%); border-radius: 50%; }
.mon-hero .mh-ring { flex-shrink: 0; position: relative; width: 82px; height: 82px; }
.mon-hero .mh-ring svg { transform: rotate(-90deg); width: 82px; height: 82px; }
.mon-hero .mh-ring .mh-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.mon-hero .mh-ring .mh-val small { font-size: 9.5px; font-weight: 500; opacity: .75; letter-spacing: .5px; margin-top: -2px; }
.mon-hero .mh-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.mon-hero .mh-host { font-size: 17px; font-weight: 800; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
.mon-hero .mh-host .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.22); flex-shrink: 0; }
.mon-hero .mh-host .dot.bad { background: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.22); }
.mon-hero .mh-meta { font-size: 11.5px; opacity: .78; margin-top: 5px; line-height: 1.75; word-break: break-all; }

.mon-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
.mon-card { background: var(--card); border-radius: var(--radius); border: var(--border-soft); padding: 15px; box-shadow: var(--shadow-sm); }
.mon-card .mc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.mon-card .mc-title { font-size: 12.5px; font-weight: 750; color: var(--gray-4); letter-spacing: .8px; display: flex; align-items: center; gap: 6px; }
.mon-card .mc-title svg { width: 15px; height: 15px; }
.mon-card .mc-big { font-size: 26px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.mon-card .mc-big small { font-size: 12px; font-weight: 600; color: var(--gray-4); letter-spacing: 0; margin-left: 3px; }
.mon-card .mc-sub { font-size: 11.5px; color: var(--gray-4); margin-top: 3px; }

.mon-bar { height: 9px; border-radius: var(--radius-pill); background: var(--gray-1); overflow: hidden; margin: 10px 0 7px; }
.mon-bar > i { display: block; height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, #1b5a80, #2a8fb8); transition: width .6s var(--ease); }
.mon-bar.warn > i { background: linear-gradient(90deg, #c98a1f, #e2b562); }
.mon-bar.crit > i { background: linear-gradient(90deg, #b23b32, #e06b60); }
.mon-legend { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--gray-4); }
.mon-legend b { color: var(--gray-5); font-weight: 650; font-variant-numeric: tabular-nums; }

.mon-kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-1); font-size: 13px; gap: 10px; }
.mon-kv:last-child { border-bottom: none; }
.mon-kv .k { color: var(--gray-4); flex-shrink: 0; }
.mon-kv .v { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; word-break: break-all; }

.mon-kpi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mon-kpi .kpi { background: var(--gray-1); border-radius: var(--radius-sm); padding: 10px 12px; }
.mon-kpi .kpi .n { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.mon-kpi .kpi .l { font-size: 11px; color: var(--gray-4); margin-top: 1px; }

.mon-svc { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--gray-1); font-size: 13px; }
.mon-svc:last-child { border-bottom: none; }
.mon-svc .sdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--gray-3); }
.mon-svc .sdot.ok { background: #19a974; box-shadow: 0 0 0 3px rgba(25,169,116,.14); }
.mon-svc .sdot.bad { background: #dc5b50; box-shadow: 0 0 0 3px rgba(220,91,80,.14); }
.mon-svc .sname { font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.mon-svc .sstate { margin-left: auto; font-size: 11px; padding: 1.5px 8px; border-radius: var(--radius-pill); background: var(--gray-1); color: var(--gray-4); font-weight: 650; }
.mon-svc .sstate.ok { background: var(--success-light); color: var(--success); }
.mon-svc .sstate.bad { background: var(--danger-light); color: var(--danger); }

.mon-proc { font-size: 12px; }
.mon-proc .pr { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-1); align-items: center; }
.mon-proc .pr:last-child { border-bottom: none; }
.mon-proc .pr .pn { min-width: 0; overflow: hidden; }
.mon-proc .pr .pn b { font-weight: 650; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-proc .pr .pn span { color: var(--gray-4); font-size: 10.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-proc .pr .pc { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--primary); white-space: nowrap; }
.mon-proc .pr .pm { font-variant-numeric: tabular-nums; color: var(--gray-4); white-space: nowrap; font-size: 11px; }

.mon-log {
  background: #11181f; color: #dbe6ef; border-radius: var(--radius-sm); padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.75;
  max-height: 340px; overflow: auto; white-space: pre-wrap; word-break: break-all;
}
.mon-log .lg-err { color: #ff9c90; }
.mon-log .lg-warn { color: #f7d488; }
.mon-log .lg-ok { color: #8fe0b4; }
.mon-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.mon-tabs button {
  border: 1px solid var(--gray-2); background: #fff; color: var(--gray-5); border-radius: var(--radius-pill);
  padding: 5px 12px; font-size: 12px; cursor: pointer; font-weight: 600; transition: all .16s var(--ease);
}
.mon-tabs button.on { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 6px var(--primary-glow); }
.mon-refresh-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.mon-refresh-bar .auto { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-4); margin-left: auto; }
.mon-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #19a974; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
/* 实时推送状态灯：on=绿(推送中) / wait=黄(连接中) / off=灰(已退回轮询) */
.mon-live {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 11px; border-radius: var(--radius-pill); background: var(--gray-1); color: var(--gray-4);
  transition: all .2s var(--ease);
}
.mon-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.mon-live.on { background: rgba(25, 169, 116, .12); color: #12805a; }
.mon-live.on i { animation: pulse 1.8s infinite; }
.mon-live.wait { background: rgba(214, 158, 46, .14); color: #a37515; }
.mon-live.wait i { animation: pulse 1.8s infinite; }
/* 刷新按钮：图标与文字强制横排 */
.mon-refresh-bar .btn { flex-direction: row !important; white-space: nowrap; }
.mon-refresh-bar .btn svg { width: 14px; height: 14px; flex-shrink: 0; }
/* 监视器内空状态：图标 + 两行说明 */
.mon-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 22px 10px; color: var(--gray-4); font-size: 12.5px; text-align: center; line-height: 1.6;
}
.mon-empty svg { width: 26px; height: 26px; color: var(--gray-3); }
.mon-empty small { color: var(--gray-3); font-size: 11px; }

/* ---------- 桌面端适配（≥880px 侧边栏布局） ---------- */
@media (min-width: 880px) {
  :root { --tabbar-h: 0px; }
  .shell { flex-direction: row; }
  .sidebar { display: flex; }
  .sidebar {
    position: sticky; top: 0; height: 100vh; width: 232px; flex-shrink: 0;
    background: #fff; border-right: var(--border-soft);
    flex-direction: column; padding: 20px 14px; box-shadow: 1px 0 0 rgba(23,33,46,.03);
  }
  .sidebar .sb-logo { display: flex; align-items: center; gap: 11px; font-weight: 750; font-size: 15.5px; padding: 4px 6px 22px; color: var(--text); letter-spacing: .4px; }
  .sidebar .sb-logo .ll-ico {
    width: 38px; height: 38px; border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), #1b5a80); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 4px 10px var(--primary-glow);
  }
  .sidebar .sb-logo .ll-ico svg { width: 19px; height: 19px; }
  .sidebar .sb-item {
    display: flex; align-items: center; gap: 11px; border: none; background: none; width: 100%;
    padding: 11px 13px; border-radius: var(--radius-sm); font-size: 14px; color: var(--gray-5);
    cursor: pointer; margin-bottom: 3px; text-align: left; font-weight: 550; transition: all .16s var(--ease);
  }
  .sidebar .sb-item svg { width: 19px; height: 19px; }
  .sidebar .sb-item:hover { background: var(--gray-1); }
  .sidebar .sb-item.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
  .sidebar .sb-item.super-only { color: #8a5a0d; }
  .sidebar .sb-item.super-only:hover { background: #fdf6e8; }
  .sidebar .sb-item.super-only.active { background: linear-gradient(135deg, #fbf3e2, #f8ecd4); color: #8a5a0d; font-weight: 700; }
  .sidebar .sb-user { margin-top: auto; padding: 13px 8px 4px; font-size: 12.5px; color: var(--gray-4); border-top: var(--border-soft); display: flex; align-items: center; gap: 9px; }
  .sidebar .sb-user .avatar { width: 32px; height: 32px; font-size: 13px; border-radius: 9px; }
  .shell-right { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
  .main { padding-bottom: 34px; max-width: 940px; padding-left: 22px; padding-right: 22px; }
  .tabbar { display: none; }
  .topbar { position: sticky; background: rgba(255,255,255,.9); color: var(--text); border-bottom: var(--border-soft); padding-top: 0; box-shadow: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); height: var(--topbar-h); }
  .topbar .tb-title { font-size: 17px; font-weight: 700; }
  .topbar .tb-icon-btn { color: var(--gray-5); background: var(--gray-1); }
  .topbar .tb-icon-btn:hover { background: var(--gray-2); }
  .topbar .tb-back { color: var(--gray-5); background: var(--gray-1); }
  .topbar .badge-dot { box-shadow: 0 0 0 2px #fff; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .photo-grid { grid-template-columns: repeat(6, 1fr); max-width: 560px; }
  .mon-grid { grid-template-columns: repeat(2, 1fr); }
  .mon-grid .mon-col2 { grid-column: span 2; }
  .mon-kpi { grid-template-columns: repeat(4, 1fr); }
}

/* 加载更多提示 */
.loading-tip { text-align: center; color: var(--gray-4); padding: 22px; font-size: 13px; }
.section-gap { height: 8px; }

/* ============ v2.6.0 分次扣款（部分核销） ============ */
/* 记录卡片：已扣/总额 + 进度条 + 部分扣款橙标 */
.record-card .rc-paid { color: var(--primary); }
.record-card .rc-of { font-size: 12px; color: var(--gray-4); font-weight: 600; }
.record-card .rc-progress { height: 3px; border-radius: 2px; background: var(--gray-2); overflow: hidden; margin-top: 6px; }
.record-card .rc-progress i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #e0a13a, var(--warning)); }
.record-card.is-partial::before { background: var(--warning); }
.tag-gray { background: var(--gray-1); color: var(--gray-4); }

/* 详情页金额区 */
.pay-block { margin: 2px 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--primary-light); }
.pay-main { display: flex; align-items: baseline; gap: 7px; }
.pay-label { font-size: 12px; color: var(--primary); font-weight: 700; letter-spacing: .5px; }
.pay-paid { font-size: 22px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.pay-of { font-size: 12.5px; color: var(--gray-4); font-weight: 600; }
.pay-bar { height: 6px; border-radius: 4px; background: #fff; overflow: hidden; margin: 9px 0 7px; box-shadow: inset 0 0 0 1px rgba(21, 73, 107, .08); }
.pay-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary-mid), var(--primary)); transition: width .25s ease; }
.pay-sub { font-size: 12.5px; color: var(--gray-4); }
.pay-sub b { color: var(--text); }

/* 扣款流水 */
.pay-list { display: flex; flex-direction: column; }
.pay-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--gray-2); }
.pay-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.pay-item.is-void { opacity: .55; }
.pay-item .pi-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pi-amt { font-size: 15px; }
.pay-item.is-void .pi-amt { text-decoration: line-through; }
.pi-meta { font-size: 12px; color: var(--gray-4); }
.pi-remark { flex-basis: 100%; font-size: 12.5px; color: var(--gray-4); }

/* 扣款弹窗 */
.pay-quick { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pay-quick .chip { font-size: 12.5px; padding: 6px 12px; }
.pay-after { font-size: 13px; color: var(--primary); font-weight: 600; margin: 2px 0 14px; }
.pay-after.err { color: var(--danger); }
