/* 养老院管理系统 — 界面样式（扁平化科技感，蓝/青主色） */
:root {
  --brand: #0e7c86;
  --brand-2: #12a3b0;
  --brand-ink: #0a5c64;
  --accent: #2b6cb0;
  --ink: #1c2b36;
  --ink-2: #4a5b68;
  --ink-3: #7c8b98;
  --line: #e2e9ef;
  --line-2: #eef3f7;
  --bg: #f2f6f9;
  --card: #ffffff;
  --ok: #1a9c6b;
  --warn: #d98517;
  --danger: #d2402f;
  --info: #2b6cb0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(28, 43, 54, .05), 0 8px 24px rgba(28, 43, 54, .05);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.app {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4 { margin: 0 0 8px; font-weight: 600; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: 0 0 236px; background: linear-gradient(180deg, #0d3d47 0%, #0a2f38 100%);
  color: #d5e6e9; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand-2), #16c0cf);
  color: #04262c; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
}
.brand-txt strong { display: block; font-size: 15px; color: #fff; letter-spacing: .5px; }
.brand-txt small { color: #8fb6bc; font-size: 11px; }
.nav { flex: 1; overflow-y: auto; padding: 8px 8px 20px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }
.nav-head {
  display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; color: #9fc3c8;
  font-size: 12px; padding: 9px 10px 5px; cursor: pointer; letter-spacing: 1px; font-family: inherit;
}
.nav-head:hover { color: #fff; }
.nav-ico { font-size: 13px; }
.nav-caret { margin-left: auto; transition: transform .18s; font-size: 10px; }
.nav-group.collapsed .nav-items { display: none; }
.nav-group.collapsed .nav-caret { transform: rotate(-90deg); }
.nav-item {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 7px 10px 7px 26px; border-radius: 8px; color: #cfe3e7; font-size: 13px; margin: 1px 0;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.on { background: linear-gradient(90deg, rgba(18,163,176,.35), rgba(18,163,176,.10)); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--brand-2); }
.nav-badge { background: var(--danger); color: #fff; border-radius: 9px; font-size: 10px; padding: 1px 6px; font-style: normal; }
.user-box { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.u-name { color: #fff; font-weight: 600; font-size: 13px; }
.u-role { color: #8fb6bc; margin-bottom: 6px; }
.u-links a { color: #9fc3c8; margin-right: 12px; }
.u-links a:hover { color: #fff; }
.u-corp { margin-top: 7px; padding-top: 7px; border-top: 1px dashed rgba(255,255,255,.10); }
.u-corp .corp-link { color: #7ea7ad; font-size: 11.5px; }
.u-corp .corp-link:hover { color: #fff; }
.nav-mask { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 22px; background: #fff;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-size: 17px; margin: 0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { background: #fff; border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.topbar .nav-toggle { display: none; }
html[data-sidebar="collapsed"] .topbar .nav-toggle { display: inline-flex; }
.content { padding: 18px 22px 34px; max-width: 1500px; width: 100%; }
.site-foot { padding: 14px 22px 26px; color: var(--ink-3); font-size: 12px; }
.site-foot .dot { margin: 0 6px; }
.corp-link { color: var(--ink-3); text-decoration: none; }
.corp-link:hover { color: var(--brand); text-decoration: underline; }

/* ---------- 卡片 / 网格 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.card-h h2, .card-h h3 { margin: 0; font-size: 14px; }
.card-h .sub { color: var(--ink-3); font-size: 12px; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 16px; }
.card-b.tight { padding: 0; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1200px) { .grid.c6, .grid.c5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .grid.c4, .grid.c3, .grid.c2, .grid.c5, .grid.c6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- KPI ---------- */
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px; border-radius: 50%; background: rgba(18,163,176,.07); }
.kpi .k-label { color: var(--ink-3); font-size: 12px; }
.kpi .k-val { font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi .k-val small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.kpi .k-sub { color: var(--ink-3); font-size: 12px; }
.kpi.danger .k-val { color: var(--danger); }
.kpi.warn .k-val { color: var(--warn); }
.kpi.ok .k-val { color: var(--ok); }
.kpi.brand .k-val { color: var(--brand); }
.kpi a { font-size: 12px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th, table.tb td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
table.tb th { background: #f7fafc; color: var(--ink-2); font-weight: 600; font-size: 12px; position: sticky; top: 0; }
table.tb tbody tr:hover { background: #f9fcfd; }
table.tb td.num, table.tb th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
table.tb td.wrap, table.tb th.wrap { white-space: normal; min-width: 160px; }
table.tb tfoot td { font-weight: 700; background: #f7fafc; }
table.tb .muted { color: var(--ink-3); }
.empty { text-align: center; color: var(--ink-3); padding: 34px 12px; }

/* ---------- 徽章 / 状态 ---------- */
.badge { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 12px; background: #eef3f7; color: var(--ink-2); border: 1px solid var(--line); }
.badge.ok, .badge.已付, .badge.已收, .badge.已回, .badge.已完工, .badge.已执行, .badge.已核销, .badge.已付款, .badge.已对账, .badge.已退回, .badge.已入库, .badge.已出库, .badge.已调整, .badge.已核验, .badge.已结清, .badge.已结算, .badge.已缴, .badge.已分账, .badge.已回款, .badge.已关闭, .badge.已核销关闭, .badge.已退回待验证, .badge.正常, .badge.有效, .badge.验证通过, .badge.已开, .badge.已收票 { background: #e7f6ef; color: var(--ok); border-color: #c4e8d7; }
.badge.warn, .badge.部分付, .badge.部分收, .badge.部分回, .badge.待处理, .badge.待确认, .badge.待审批, .badge.待对账, .badge.待入库, .badge.待出库, .badge.待触发, .badge.部分, .badge.部分退回, .badge.部分验证, .badge.待核验, .badge.未验证, .badge.处理中, .badge.跟进中, .badge.试算, .badge.待报名, .badge.待跟进 { background: #fdf3e3; color: var(--warn); border-color: #f3ddb8; }
.badge.danger, .badge.未付, .badge.未收, .badge.未回, .badge.已红冲, .badge.作废, .badge.已触发, .badge.逾期, .badge.待退回, .badge.未缴, .badge.核验异常, .badge.已驳回 { background: #fdeceb; color: var(--danger); border-color: #f6cdc8; }
.badge.info, .badge.进行中, .badge.已开, .badge.已收票, .badge.报价中, .badge.已报价, .badge.已报名, .badge.已登记, .badge.已中标, .badge.未中标, .badge.已放弃 { background: #e9f1fb; color: var(--info); border-color: #cddff5; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; background: #f0f5f8; color: var(--ink-2); }
.star { color: var(--warn); }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-size: 13px; font-family: inherit; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.06); color: #fff; }
.btn.danger { border-color: #f0c6c1; color: var(--danger); }
.btn.danger:hover { background: #fdeceb; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.c1 { grid-template-columns: 1fr; }
.fld { display: flex; flex-direction: column; gap: 5px; }
.fld.full { grid-column: 1 / -1; }
.fld label { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.fld label .req { color: var(--danger); font-style: normal; }
.fld input[type=text], .fld input[type=number], .fld input[type=date], .fld input[type=search],
.fld input[type=password], .fld input[type=month], .fld select, .fld textarea {
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 13px; font-family: inherit; background: #fff; color: var(--ink);
}
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18,163,176,.12); }
.fld textarea { min-height: 74px; resize: vertical; }
.fld .hint { font-size: 11px; color: var(--ink-3); }
.radio-row { display: flex; gap: 14px; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: 5px; font-weight: 400; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: #fbfdfe; }
.filters .fld { min-width: 130px; }
/* 页内标签页（消息与待办 / 评估单等列表用它切换口径） */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 16px 0; border-bottom: 1px solid var(--line-2); background: #fbfdfe; }
.tabs .tab { padding: 7px 12px; border-radius: 8px 8px 0 0; color: var(--ink-2); font-size: 13px; border: 1px solid transparent; border-bottom: none; }
.tabs .tab:hover { background: #f2f8f9; }
.tabs .tab.on { background: #fff; border-color: var(--line); color: var(--brand-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand-2); }
.tabs .tab-n { font-style: normal; margin-left: 5px; font-size: 11px; background: #eef3f7; color: var(--ink-3); border-radius: 9px; padding: 1px 6px; }
.tabs .tab.on .tab-n { background: #e2f4f6; color: var(--brand-ink); }
/* 待办清单（顶栏下拉 / 独立页共用） */
.todo-list { display: flex; flex-direction: column; }
.todo-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 2px; border-bottom: 1px dashed var(--line-2); }
.todo-item:last-child { border-bottom: none; }
.todo-item.late { background: #fff8f7; box-shadow: inset 3px 0 0 var(--danger); padding-left: 9px; border-radius: 4px; }
.m-card.late { box-shadow: inset 3px 0 0 var(--danger); }
.todo-item .ti-main { flex: 1; min-width: 0; }
.todo-item .ti-title { font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.todo-item .ti-sub { margin-top: 3px; }
.todo-item .ti-meta { margin-top: 2px; }
.todo-item .ti-act { display: flex; gap: 6px; align-items: center; }
.todo-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line-2); }
.form-actions { margin-top: 16px; display: flex; gap: 10px; }

/* ---------- 提示 ---------- */
.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; }
.alert-success { background: #e7f6ef; color: #12734f; border: 1px solid #c4e8d7; }
.alert-error { background: #fdeceb; color: #a83326; border: 1px solid #f6cdc8; }
.alert-info { background: #e9f1fb; color: #1f4f86; border: 1px solid #cddff5; }
.alert-warn { background: #fdf3e3; color: #8a5a12; border: 1px solid #f3ddb8; }
.note { background: #f7fafc; border-left: 3px solid var(--brand-2); padding: 9px 12px; border-radius: 6px; color: var(--ink-2); font-size: 12.5px; margin: 10px 0; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.danger-txt { color: var(--danger); }
.ok-txt { color: var(--ok); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.tag { display: inline-block; background: #eef3f7; border-radius: 6px; padding: 1px 7px; font-size: 11px; color: var(--ink-2); margin-right: 4px; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 6px; align-items: center; padding: 12px 16px; flex-wrap: wrap; }
.pager a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; color: var(--ink-2); }
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .pg-info { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.pager .pg-gap { color: var(--ink-3); }
.pager .pg-size { color: var(--ink-3); font-size: 12px; display: inline-flex; align-items: center; gap: 5px; }
.pager .pg-size select { width: auto; padding: 3px 6px; border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; background: #fff; }

/* ---------- 时间线 / 步骤 ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 15px 14px; }
.timeline li::before { content: ""; position: absolute; left: -23px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.timeline .t-time { color: var(--ink-3); font-size: 12px; }
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step-list li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.step-list .s-no { flex: 0 0 96px; color: var(--brand-ink); font-weight: 600; font-size: 12.5px; }
.step-list .s-body { flex: 1; }
.step-list .s-amt { font-family: var(--mono); font-weight: 700; }
.settle-steps { width: 100%; border-collapse: collapse; font-size: 13px; }
.settle-steps th { background: #f7fafc; color: var(--ink-2); font-weight: 600; font-size: 12px; padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line-2); }
.settle-steps td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); }
.settle-steps td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.settle-steps th.num { text-align: right; }
.settle-steps tr.total td { background: #f0f9fa; font-weight: 700; }
.settle-steps tr.hl td { background: #fff8e6; font-weight: 700; }
.settle-steps tbody tr:hover td { background: #f9fcfd; }
.cash-check { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mini-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; align-items: end; }

/* ---------- 描述列表 ---------- */
.dl { display: grid; grid-template-columns: 132px 1fr; gap: 7px 12px; font-size: 13px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; }
.section-title { font-size: 13px; font-weight: 700; color: var(--brand-ink); margin: 18px 0 8px; padding-left: 9px; border-left: 3px solid var(--brand-2); }
.section-title:first-child { margin-top: 0; }

/* ---------- 异常页 ---------- */
.err-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.err-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 40px 48px; text-align: center; box-shadow: var(--shadow); }

/* ---------- 移动端 ---------- */
body.mobile { padding-bottom: calc(66px + env(safe-area-inset-bottom)); font-size: 15px; }
body.mobile .content { padding: 12px 12px 80px; max-width: 100%; }
.m-topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: linear-gradient(135deg, #0e7c86, #12a3b0); color: #fff;
  box-shadow: 0 2px 10px rgba(14,124,134,.22);
}
.m-back { background: rgba(255,255,255,.16); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 10px; font-size: 20px; line-height: 1; cursor: pointer; }
.m-title { font-size: 16px; font-weight: 600; }
.m-user { margin-left: auto; text-align: right; font-size: 12.5px; line-height: 1.25; }
.m-user span { display: block; color: #cdeef1; font-size: 11px; }
.m-content { padding: 12px 12px 20px; }

/* 底部 4 Tab + 中间新建 */
.mobile-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff;
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr);
  align-items: end; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 12px rgba(28,43,54,.06);
}
.mobile-tabs a {
  position: relative; text-align: center; padding: 8px 0 10px; font-size: 11px; color: var(--ink-3); font-weight: 500;
}
.mobile-tabs a.on { color: var(--brand); font-weight: 700; }
.mobile-tabs .mi { display: block; font-size: 19px; line-height: 1.25; }
.mobile-tabs .m-plus {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; box-shadow: 0 6px 16px rgba(14,124,134,.38);
}
.mobile-tabs .m-plus span { display: block; margin-top: -2px; }
.m-dot { position: absolute; top: 4px; right: 22%; background: var(--danger); color: #fff; border-radius: 9px; font-size: 10px; padding: 0 5px; font-style: normal; }

/* 家属门户：只读 Tab（首页 / 服务 / 账单 / 探视 / 相册 / 退出），列数按实际数量自适应 */
.mobile-tabs.fam { grid-auto-flow: column; grid-auto-columns: 1fr; }
.mobile-tabs.fam a { padding: 9px 0 11px; }
.m-user .fam-bell { position: relative; display: inline-block; font-size: 16px; line-height: 1; margin-right: 8px; vertical-align: middle; text-decoration: none; }
.m-user .fam-bell-dot { position: absolute; top: -6px; right: -8px; background: var(--danger); color: #fff; border-radius: 9px; font-size: 10px; font-style: normal; line-height: 1; padding: 2px 4px; }
.m-topbar .m-title .fam-sub { display: block; font-size: 11.5px; color: #cdeef1; font-weight: 400; margin-top: 1px; }
.fam-foot { text-align: center; padding: 12px 6px 4px; line-height: 1.65; }
.fam-kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.fam-kv:last-child { border-bottom: 0; }
.fam-kv .k { color: var(--ink-3); font-size: 12.5px; flex: 0 0 auto; }
.fam-kv .v { text-align: right; font-size: 13px; word-break: break-word; }
.fam-kv .v.num { font-variant-numeric: tabular-nums; }
.fam-day { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 6px; }
.fam-day b { font-size: 13.5px; }
.fam-day .muted { font-size: 11.5px; margin-left: auto; }
.fam-tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #eef3f7; color: var(--ink-2); margin-left: 6px; }
.m-card.unread { box-shadow: inset 3px 0 0 var(--brand); }
.fam-media { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; background: #0b1b1f; margin: 4px 0 8px; }
.fam-pre { white-space: pre-wrap; line-height: 1.7; font-size: 13px; color: var(--ink-2); }

.m-sheet-mask { position: fixed; inset: 0; background: rgba(10,30,35,.45); opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 50; }
body.sheet-open .m-sheet-mask { opacity: 1; pointer-events: auto; }
.m-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff;
  border-radius: 18px 18px 0 0; padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(102%); transition: transform .22s; max-height: 84vh; overflow-y: auto;
}
body.sheet-open .m-sheet { transform: translateY(0); }
.m-sheet-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; margin-bottom: 10px; }
.m-sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.m-sheet-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 12px;
  background: #f5fafb; border: 1px solid #e2eef0; color: var(--ink); font-size: 12px; text-align: center;
}
.m-sheet-item span { font-size: 22px; }
.m-sheet-foot { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.m-sheet-corp { text-align: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.m-sheet-corp .corp-link { font-size: 12px; }

/* 移动卡片与表单 */
.m-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.m-card .row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.m-card .row .lb { color: var(--ink-3); font-size: 12.5px; }
.m-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.m-card-h strong { font-size: 14.5px; }
.m-card-h .m-act { margin-left: auto; display: flex; gap: 6px; }
.m-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.m-kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; box-shadow: var(--shadow); }
.m-kpi .lb { color: var(--ink-3); font-size: 12px; }
.m-kpi .vl { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.m-kpi .vl.brand { color: var(--brand); }
.m-kpi .vl.ok { color: var(--ok); }
.m-kpi .vl.warn { color: var(--warn); }
.m-kpi .vl.danger { color: var(--danger); }
.m-big { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.m-big a, .m-big button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px;
  border-radius: 14px; border: 0; background: linear-gradient(135deg, #0e7c86, #12a3b0); color: #fff;
  font-size: 14px; font-weight: 600; box-shadow: 0 4px 14px rgba(14,124,134,.22); cursor: pointer;
}
.m-big a.ghost, .m-big button.ghost { background: #fff; color: var(--brand-ink); border: 1px solid #cfe9ec; box-shadow: var(--shadow); }
.m-big a span, .m-big button span { font-size: 24px; }
body.mobile .fld input[type=text], body.mobile .fld input[type=number], body.mobile .fld input[type=date],
body.mobile .fld input[type=search], body.mobile .fld input[type=password], body.mobile .fld select, body.mobile .fld textarea {
  padding: 11px 12px; font-size: 16px; min-height: 46px;
}
body.mobile .form-grid, body.mobile .form-grid.c3 { grid-template-columns: 1fr; }
body.mobile .btn { min-height: 42px; justify-content: center; }
body.mobile .btn.block { width: 100%; }
.m-submit { position: sticky; bottom: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(4px); padding: 10px 0; margin-top: 12px; }
.m-seg { display: flex; gap: 6px; background: #eef3f7; padding: 4px; border-radius: 10px; margin-bottom: 12px; }
.m-seg a { flex: 1; text-align: center; padding: 7px 0; border-radius: 8px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.m-seg a.on { background: #fff; color: var(--brand); font-weight: 700; box-shadow: var(--shadow); }
.m-net { display: flex; align-items: baseline; gap: 8px; background: #f2fbfc; border: 1px dashed #a9dfe4; border-radius: 10px; padding: 10px 12px; margin: 4px 0 10px; }
.m-net b { font-size: 22px; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.photo-drop { border: 1px dashed var(--brand-2); border-radius: 12px; padding: 22px; text-align: center; color: var(--ink-3); background: #f7fdfe; }
.photo-drop input { width: 100%; font-size: 13px; }
.scan-box { border: 2px dashed var(--line); border-radius: 12px; height: 180px; display: flex; align-items: center; justify-content: center; color: var(--ink-3); background: #fbfdfe; }

/* ---------- 宣传介绍 ---------- */
.intro-body { background: #fff; }
.intro-hero { background: radial-gradient(1200px 400px at 20% -10%, rgba(18,163,176,.35), transparent), linear-gradient(135deg, #0d3d47, #0a2f38); color: #eaf5f6; padding: 54px 26px; }
.intro-hero h1 { font-size: 30px; margin-bottom: 10px; }
.intro-hero p { color: #a9cdd2; max-width: 760px; }
.intro-wrap { max-width: 1080px; margin: 0 auto; padding: 30px 26px 60px; }
.intro-wrap .grid { margin-top: 8px; }
.intro-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.intro-card h3 { color: var(--brand-ink); }
.intro-card ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); }
.intro-card li { margin: 4px 0; }
.intro-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 10px; }
.intro-step { background: #f4fafb; border: 1px solid #d9edef; border-radius: 12px; padding: 14px; }
.intro-step b { color: var(--brand-ink); }
/* 宣传页底部商务联系：左边电话与按钮，右边企业微信二维码 */
.intro-contact {
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 10px;
  padding: 20px 22px; border: 1px solid #d9edef; border-radius: 14px;
  background: linear-gradient(135deg, #f4fafb, #fff 60%);
}
.intro-contact .ic-main { flex: 1 1 300px; min-width: 260px; }
.intro-contact .ic-phone { font-size: 24px; font-weight: 700; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.intro-contact .ic-phone a { color: inherit; text-decoration: none; }
.intro-contact .ic-phone a:hover { text-decoration: underline; }
.intro-contact .ic-tag { font-size: 12px; font-weight: 400; color: #fff; background: var(--brand-2); border-radius: 20px; padding: 2px 10px; margin-left: 8px; vertical-align: middle; }
.intro-contact .ic-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.intro-contact .ic-qr { margin: 0; text-align: center; flex: 0 0 auto; }
.intro-contact .ic-qr img { display: block; width: 150px; height: 150px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 5px; }
.intro-contact .ic-qr figcaption { color: var(--ink-3); font-size: 12px; margin-top: 6px; }
@media (max-width: 620px) { .intro-contact .ic-qr img { width: 130px; height: 130px; } }

@media (max-width: 960px) {
  #yl-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s; z-index: 40; height: 100vh;
  }
  body.nav-open #yl-sidebar { transform: translateX(0); }
  body.nav-open .nav-mask { display: block; position: fixed; inset: 0; background: rgba(10,30,35,.42); z-index: 35; }
  #yl-sidebar ~ .main .topbar .nav-toggle { display: inline-flex; }
  .content { padding: 14px; }
}

/* ==========================================================================
   1. 主题皮肤 / 信息密度 / 侧栏收起（个人与全局均可设置，登录即生效）
   ========================================================================== */
/* 配色方案：只换品牌色与侧栏底色，不改布局，避免用户迷失 */
html[data-skin="teal"] { --brand: #0e7c86; --brand-2: #12a3b0; --brand-ink: #0a5c64; --accent: #2b6cb0; }
html[data-skin="navy"] { --brand: #2c4a7c; --brand-2: #3f6bb0; --brand-ink: #22395f; --accent: #0e7c86; }
html[data-skin="amber"] { --brand: #b26a12; --brand-2: #d98a17; --brand-ink: #8a5210; --accent: #0e7c86; }
html[data-skin="graphite"] { --brand: #3d4a55; --brand-2: #5a6b78; --brand-ink: #2b343c; --accent: #0e7c86; }

html[data-skin="navy"] body.app .sidebar { background: linear-gradient(180deg, #1c3050 0%, #16263f 100%); }
html[data-skin="amber"] body.app .sidebar { background: linear-gradient(180deg, #4a3416 0%, #38260f 100%); }
html[data-skin="graphite"] body.app .sidebar { background: linear-gradient(180deg, #28313a 0%, #1e252b 100%); }
html[data-skin="amber"] .brand-mark { background: linear-gradient(135deg, #d98a17, #f0ab3c); color: #3a250a; }
html[data-skin="graphite"] .brand-mark { background: linear-gradient(135deg, #5a6b78, #7d8d99); color: #fff; }
html[data-skin="navy"] .brand-mark { background: linear-gradient(135deg, #3f6bb0, #5d8ad4); color: #fff; }

/* 信息密度 */
html[data-density="compact"] table.tb th, html[data-density="compact"] table.tb td { padding: 5px 9px; }
html[data-density="compact"] .card-b { padding: 10px 12px; }
html[data-density="compact"] .content { padding: 12px 16px 26px; }
html[data-density="compact"] body.app { font-size: 13px; }
html[data-density="compact"] .kpi { padding: 10px 12px; }
html[data-density="compact"] .kpi .k-val { font-size: 21px; }
html[data-density="comfortable"] table.tb th, html[data-density="comfortable"] table.tb td { padding: 13px 14px; }
html[data-density="comfortable"] body.app { font-size: 14.5px; }
html[data-density="comfortable"] .content { padding: 22px 26px 40px; }

/* 侧栏收起：整栏显示/隐藏，状态记忆在本地 */
html[data-sidebar="collapsed"] #yl-sidebar { width: 0; flex: 0 0 0; overflow: hidden; border-right: 0; }
.side-collapse { width: 26px; height: 26px; margin-left: auto; background: rgba(255,255,255,.08); border-color: transparent; color: #bfe0e4; font-size: 15px; }
.side-collapse:hover { background: rgba(255,255,255,.18); color: #fff; border-color: transparent; }
html[data-sidebar="collapsed"] .side-collapse { display: none; }
.side-tools { display: flex; gap: 6px; padding: 8px 12px 2px; }
.side-tool { flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); color: #a8cbd0; border-radius: 7px; font-size: 11px; padding: 4px 0; cursor: pointer; font-family: inherit; }
.side-tool:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ==========================================================================
   2. 顶栏：角色化快捷区 + 下拉菜单 + 用户胶囊
   ========================================================================== */
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow: visible; }
.quick-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 13px; cursor: pointer; font-family: inherit; text-decoration: none; position: relative; white-space: nowrap;
}
.quick-btn:hover { border-color: var(--brand); color: var(--brand); background: #fbfefe; }
.quick-btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.quick-btn.primary:hover { filter: brightness(1.06); color: #fff; }
.qb-ico { font-size: 14px; line-height: 1; }
.qb-caret { font-size: 9px; opacity: .7; margin-left: 1px; }
.qb-badge { position: absolute; top: -5px; right: -5px; background: var(--danger); color: #fff; border-radius: 9px; font-size: 10px; padding: 0 5px; font-style: normal; line-height: 15px; }
.quick-menu { position: relative; }
.quick-drop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 196px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 34px rgba(28,43,54,.16); padding: 6px; z-index: 60; display: none;
}
.quick-menu.open .quick-drop { display: block; }
.quick-drop a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 13px; }
.quick-drop a:hover { background: #f3f9fa; color: var(--brand-ink); }
.quick-drop .qd-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 5px; display: flex; flex-direction: column; gap: 2px; }
.quick-drop-user { min-width: 224px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-family: inherit; }
.user-chip:hover { border-color: var(--brand); }
.uc-avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.uc-name { font-size: 13px; color: var(--ink); }

/* 角色切换（演示用，一键切换身份） */
.role-switch { display: inline-flex; align-items: center; gap: 6px; }
.role-switch .rs-list { display: flex; gap: 5px; flex-wrap: wrap; }
.role-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--ink-2); cursor: pointer; font-family: inherit; }
.role-chip:hover { border-color: var(--brand); color: var(--brand); }
.role-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ==========================================================================
   3. 抽屉（页面说明 / 我的外观 / 手机二维码）与弹层
   ========================================================================== */
.drawer { position: fixed; inset: 0; z-index: 200; }
.drawer[hidden] { display: none; }
.drawer-mask { position: absolute; inset: 0; background: rgba(12,32,38,.40); backdrop-filter: blur(1px); }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 92vw); background: #fff;
  box-shadow: -14px 0 40px rgba(20,40,48,.18); display: flex; flex-direction: column; animation: drawer-in .18s ease-out;
}
.drawer-panel-sm { width: min(360px, 92vw); }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.drawer-h h3 { margin: 0; font-size: 15px; }
.drawer-h .icon-btn { margin-left: auto; }
.drawer-b { padding: 16px 18px; overflow-y: auto; flex: 1; }
.drawer-b.prose p { margin: 0 0 10px; color: var(--ink-2); }
.deflist { margin: 0; padding-left: 18px; color: var(--ink-2); }
.deflist li { margin: 6px 0; }
.drawer-b .form-actions { position: sticky; bottom: -16px; background: #fff; padding-top: 10px; }

.modal { position: fixed; inset: 0; z-index: 220; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(12,32,38,.42); }
.modal-panel { position: relative; background: #fff; border-radius: 14px; padding: 20px 22px; width: min(400px, 92vw); box-shadow: 0 20px 50px rgba(20,40,48,.24); }
.modal-panel h3 { margin: 0 0 8px; font-size: 16px; }
.modal-panel .form-actions { margin-top: 16px; justify-content: flex-end; }

/* 提示气泡 */
.toast-wrap { position: fixed; top: 74px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: 10px 14px; font-size: 13px; box-shadow: 0 8px 24px rgba(28,43,54,.14); animation: toast-in .18s ease-out; }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
@keyframes toast-in { from { transform: translateY(-6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ==========================================================================
   4. 外观设置组件（皮肤选择 / 分段控件）
   ========================================================================== */
.skin-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.skin-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 12px; }
.skin-opt input { position: absolute; opacity: 0; pointer-events: none; }
.skin-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(18,163,176,.16); }
.skin-swatch { width: 100%; height: 26px; border-radius: 7px; }
.skin-teal .skin-swatch, .skin-default .skin-swatch { background: linear-gradient(135deg, #0e7c86, #12a3b0); }
.skin-navy .skin-swatch { background: linear-gradient(135deg, #2c4a7c, #3f6bb0); }
.skin-amber .skin-swatch { background: linear-gradient(135deg, #b26a12, #d98a17); }
.skin-graphite .skin-swatch { background: linear-gradient(135deg, #3d4a55, #5a6b78); }
.seg { display: inline-flex; gap: 4px; background: #eef3f7; padding: 3px; border-radius: 9px; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-block; padding: 5px 12px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.seg-opt:has(input:checked) span { background: #fff; color: var(--brand-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(28,43,54,.10); }

/* 手机填报二维码 */
.qr-box { text-align: center; }
.qr-img { display: flex; justify-content: center; margin: 12px 0 14px; }
.qr-img svg { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.qr-link { text-align: left; }
.qr-linkrow { display: flex; gap: 8px; margin-top: 5px; }
.qr-linkrow input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 12px; font-family: var(--mono); background: #fbfdfe; }

/* ==========================================================================
   5. 列表工具条 / 批量操作条 / 返回
   ========================================================================== */
.page-foot-back { margin-top: 18px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar .tb-search { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.toolbar .tb-search input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-family: inherit; width: 176px; }
.batch-bar {
  display: none; align-items: center; gap: 10px; padding: 9px 16px; background: #f0f9fa; border-bottom: 1px solid #d5eef0;
  font-size: 13px; color: var(--brand-ink); position: sticky; top: 57px; z-index: 5;
}
.batch-bar.on { display: flex; }
.batch-bar .bb-count { font-weight: 700; }
.batch-bar .bb-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
table.tb td.pick, table.tb th.pick { width: 34px; text-align: center; }
table.tb tr.picked { background: #f2fbfc; }
.tb-tools { display: flex; gap: 6px; align-items: center; }
.io-tip { color: var(--ink-3); font-size: 12px; }

/* ==========================================================================
   6. 懒加载与骨架屏
   ========================================================================== */
[data-lazy] { min-height: 60px; }
.lazy-skel { padding: 14px 16px; }
.lazy-skel span { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eef3f7 25%, #f7fafc 37%, #eef3f7 63%); background-size: 400% 100%; animation: skel 1.2s ease-in-out infinite; margin-bottom: 9px; }
.lazy-skel span:nth-child(2) { width: 82%; }
.lazy-skel span:nth-child(3) { width: 64%; }
.lazy-skel span:nth-child(4) { width: 74%; }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.lazy-err { padding: 16px; color: var(--danger); font-size: 13px; }
.load-more { text-align: center; padding: 12px; }

/* ==========================================================================
   7. 表单细节：校验态 / 日期与区域级联 / 只读
   ========================================================================== */
.fld .err-msg { color: var(--danger); font-size: 11.5px; display: none; }
.fld.bad input, .fld.bad select, .fld.bad textarea { border-color: var(--danger); background: #fffafa; }
.fld.bad .err-msg { display: block; }
.fld .ok-mark { color: var(--ok); font-size: 11.5px; display: none; }
.fld.good .ok-mark { display: block; }
.region-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fld input:disabled, .fld select:disabled { background: #f6f9fb; color: var(--ink-3); }
.req-mark { color: var(--danger); }

/* 打印/导出入口小图标按钮 */
.link-btn { background: none; border: 0; color: var(--brand); cursor: pointer; font-size: 12.5px; padding: 0 2px; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }

/* ==========================================================================
   8. 大屏 / 一屏化看板
   ========================================================================== */
.screen-wrap { background: linear-gradient(160deg, #071b23 0%, #0a2a35 100%); border-radius: 14px; color: #dff2f5; padding: 18px 22px 22px; min-height: calc(100vh - 150px); }
.screen-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.screen-head h1 { font-size: 22px; color: #fff; letter-spacing: 1px; margin: 0; }
.screen-head .sd-time { margin-left: auto; font-family: var(--mono); color: #7fc4cc; }
.screen-grid { display: grid; gap: 14px; }
.screen-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.screen-card { background: linear-gradient(180deg, rgba(18,163,176,.10), rgba(7,27,35,.2)); border: 1px solid rgba(18,163,176,.24); border-radius: 12px; padding: 13px 15px; }
.screen-card .sc-label { color: #8fc3ca; font-size: 12.5px; }
.screen-card .sc-val { font-size: 27px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.screen-card .sc-val small { font-size: 12px; color: #8fc3ca; font-weight: 500; margin-left: 4px; }
.screen-card a { color: #4fd0dd; font-size: 12px; }
.screen-panel { background: rgba(9,32,40,.72); border: 1px solid rgba(18,163,176,.20); border-radius: 12px; padding: 13px 15px; display: flex; flex-direction: column; min-height: 0; }
.screen-panel h3 { color: #cfeef1; font-size: 14px; margin: 0 0 9px; }
.screen-panel .fill { flex: 1; min-height: 0; overflow: hidden; }
.bar-list { list-style: none; margin: 0; padding: 0; }
.bar-list li { display: grid; grid-template-columns: 92px 1fr 74px; gap: 9px; align-items: center; padding: 4px 0; font-size: 12.5px; }
.bar-list .bl-bar { background: rgba(18,163,176,.18); border-radius: 4px; height: 9px; overflow: hidden; }
.bar-list .bl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #12a3b0, #4fd0dd); }
.bar-list .bl-val { text-align: right; font-family: var(--mono); color: #b7e2e7; }
.screen-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.screen-table th { color: #8fc3ca; font-weight: 500; text-align: left; padding: 5px 8px; border-bottom: 1px solid rgba(18,163,176,.20); }
.screen-table td { padding: 5px 8px; border-bottom: 1px solid rgba(18,163,176,.10); color: #d5eef1; }
.screen-table td.num { text-align: right; font-family: var(--mono); }
.screen-foot { margin-top: 14px; color: #6fa9b1; font-size: 12px; text-align: center; }
/* 一屏化：控制台页面不出现超长空白，面板高度自适应 */
.dash-fit .card { margin-bottom: 12px; }
.dash-fit .grid { gap: 12px; }
.dash-fit table.tb th, .dash-fit table.tb td { padding: 6px 10px; }
.dash-fit .kpi { padding: 11px 14px; }
.dash-fit .kpi .k-val { font-size: 21px; }
@media (max-width: 1400px) { .screen-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== 报废汽车回收拆解：车辆档案 / 回用件 / 危废 状态配色 =====
 * status_badge() 用状态名当 class 兜底，所以新增状态必须在这里登记颜色，
 * 否则台账里的状态会全部退化成灰底（看不出风险）。 */
.badge.已注销 { background: #e7f6ef; color: var(--ok); border-color: #c4e8d7; }
.badge.未注销 { background: #fdf3e3; color: var(--warn); border-color: #f3ddb8; }
.badge.注销中 { background: #e9f1fb; color: var(--info); border-color: #cddff5; }
.badge.无需注销 { background: #eef3f7; color: var(--ink-2); border-color: var(--line); }
.badge.在库 { background: #e9f1fb; color: var(--info); border-color: #cddff5; }
.badge.已售 { background: #e7f6ef; color: var(--ok); border-color: #c4e8d7; }
.badge.已转移 { background: #e7f6ef; color: var(--ok); border-color: #c4e8d7; }
.badge.待转移 { background: #fdf3e3; color: var(--warn); border-color: #f3ddb8; }
.badge.已处置 { background: #e7f6ef; color: var(--ok); border-color: #c4e8d7; }
.badge.已拆解报废 { background: #fdeceb; color: var(--danger); border-color: #f6cdc8; }
.badge.维修自用 { background: #e9f1fb; color: var(--info); border-color: #cddff5; }
/* 证件/回用件小标签：不给颜色时不至于看不见 */
.tag.warn { background: #fdf3e3; color: var(--warn); }
.tag.ok { background: #e7f6ef; color: var(--ok); }
.tag.danger { background: #fdeceb; color: var(--danger); }
/* 台账行内快捷操作（回用件改状态、危废转移登记） */
.row-form { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.row-form select, .row-form input { padding: 3px 6px; font-size: 12px; }

/* ==========================================================================
 * 养老院管理系统：状态配色 + 登录/介绍页 + 打印
 * status_badge() 用状态名当 class 兜底，新状态必须在这里登记颜色，
 * 否则台账里的状态会全部退化成灰底（看不出风险）。
 * ========================================================================== */
.badge.意向 { background: #eef3f7; color: var(--ink-2); border-color: var(--line); }
.badge.预订, .badge.预定, .badge.待入住 { background: #fdf3e3; color: var(--warn); border-color: #f3ddb8; }
.badge.在住, .badge.生效中, .badge.已通过, .badge.已提交, .badge.已收, .badge.已交接, .badge.已清点, .badge.已终止, .badge.已释放, .badge.已封存, .badge.已回访, .badge.已返回, .badge.已转正, .badge.已归档, .badge.已签字, .badge.已完成, .badge.已同步, .badge.启用, .badge.有效, .badge.进行中, .badge.已派发, .badge.已执行 { background: #e7f6ef; color: var(--ok); border-color: #c4e8d7; }
.badge.外出, .badge.住院, .badge.清洁中, .badge.维修, .badge.逾期, .badge.待审批, .badge.待交接, .badge.待清点, .badge.未释放, .badge.未封存, .badge.待回访, .badge.草稿, .badge.新登记, .badge.PENDING { background: #fdf3e3; color: var(--warn); border-color: #f3ddb8; }
.badge.离院, .badge.死亡, .badge.停用, .badge.已终止, .badge.已驳回, .badge.已流失, .badge.已过期, .badge.已取消, .badge.失效 { background: #eef3f7; color: var(--ink-3); border-color: var(--line); }
.badge.占用 { background: #e9f1fb; color: var(--info); border-color: #cddff5; }
.badge.空床 { background: #e7f6ef; color: var(--ok); border-color: #c4e8d7; }
.badge.高, .badge.严重 { background: #fdeceb; color: var(--danger); border-color: #f6cdc8; }
.badge.中 { background: #fdf3e3; color: var(--warn); border-color: #f3ddb8; }
.badge.低 { background: #e7f6ef; color: var(--ok); border-color: #c4e8d7; }

/* --------------------------- 登录 / 产品介绍 --------------------------- */
.auth-page { background: linear-gradient(140deg, #073036 0%, #0d5560 46%, #0a7d8a 100%); }
/* body.app 的背景声明优先级更高，登录页必须显式覆盖，否则深色底会退化成浅灰、浅色文字看不见 */
body.app.auth-page { background: linear-gradient(140deg, #073036 0%, #0d5560 46%, #0a7d8a 100%); }
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 520px); gap: 0; min-height: calc(100vh - 60px); max-width: 1320px; margin: 0 auto; padding: 32px 24px; align-items: center; }
.auth-aside { color: #e6f5f7; padding: 12px 40px 12px 8px; }
.auth-brand { font-size: 15px; letter-spacing: 2px; color: #7fd6e0; font-weight: 700; margin-bottom: 18px; }
.auth-h1 { font-size: 30px; line-height: 1.45; margin: 0 0 14px; color: #fff; font-weight: 600; }
.auth-h1 b { color: #6fe0ed; font-weight: 700; }
.auth-sub { color: #a9d3d8; font-size: 13.5px; line-height: 1.9; margin: 0 0 18px; }
.auth-points { list-style: none; padding: 0; margin: 0; }
.auth-points li { background: rgba(255,255,255,.06); border-left: 3px solid #35c3d1; border-radius: 8px; padding: 10px 14px; margin-bottom: 9px; font-size: 12.8px; line-height: 1.8; color: #cfe9ec; }
.auth-points b { color: #8ce6f0; }
.auth-foot { margin-top: 20px; color: #7fb4bb; font-size: 12px; }
.auth-foot .corp-link { color: #9ccbd1; }
.auth-main { display: flex; justify-content: center; }
.auth-box { background: #fff; border-radius: 16px; padding: 28px 30px; width: 100%; max-width: 460px; box-shadow: 0 24px 60px rgba(3,28,33,.36); }
.auth-box h2 { margin: 0 0 6px; font-size: 20px; }
.auth-demo { display: flex; flex-wrap: wrap; gap: 7px; }
.auth-demo .role-chip { font-size: 12px; }
.auth-demo .role-chip span { font-weight: 400; font-size: 11.5px; }
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; padding: 16px; }
  .auth-aside { padding: 8px 4px 18px; }
  .auth-h1 { font-size: 22px; }
  .auth-box { max-width: 100%; }
}

/* --------------------------- 产品介绍页 --------------------------- */
.intro-wrap { max-width: 1180px; margin: 0 auto; padding: 26px 22px 40px; }
.intro-hero { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px 34px; box-shadow: var(--shadow); }
.intro-hero h1 { font-size: 26px; margin: 0 0 10px; }
.intro-hero p { color: var(--ink-2); line-height: 1.95; margin: 0 0 8px; font-size: 14px; }
.intro-mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; margin-top: 18px; }
.intro-mod { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.intro-mod h3 { margin: 0 0 8px; font-size: 15px; color: var(--brand-ink); }
.intro-mod ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 1.95; }
.intro-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* --------------------------- 打分表 / 树 / 打印 --------------------------- */
.score-tbl input[type=number] { width: 76px; padding: 4px 6px; }
.score-tbl .item-name { white-space: normal; min-width: 200px; }
.score-tbl tr.dom td { background: #f0f9fa; font-weight: 700; }
.tree-list { list-style: none; margin: 0; padding-left: 0; }
.tree-list ul { list-style: none; margin: 4px 0 4px 14px; padding-left: 12px; border-left: 1px dashed var(--line); }
.tree-list li { padding: 3px 0; font-size: 13px; }
.tree-badge { display: inline-block; min-width: 34px; text-align: center; border-radius: 6px; padding: 0 6px; font-size: 11px; margin-left: 6px; }
.matrix-tbl td { text-align: center; }
.matrix-tbl td.yes { background: #e7f6ef; color: var(--ok); font-weight: 700; }
.matrix-tbl td.no { background: #f4f7fa; color: var(--ink-3); }
@media print {
  .sidebar, .topbar, .site-foot, .btn, .pager, .filters, .card-h .right { display: none !important; }
  .layout { display: block; }
  .content { max-width: none; padding: 0; }
  .card { border: 0; box-shadow: none; margin: 0 0 12px; }
  body { background: #fff; }
}


/* ==========================================================================
 * 养老院管理系统 · 易用性增强（弹层最大化 / 信息面板 / 大屏 / 打印 / 导入导出）
 * ========================================================================== */

/* ---------- 1. 弹层与抽屉：最大化 ---------- */
.modal-panel { max-height: 92vh; overflow: auto; }
.modal-panel.panel-max { width: min(1440px, 96vw); height: min(900px, 92vh); max-height: 92vh; border-radius: 14px; }
.drawer-panel.panel-max { width: min(1180px, 96vw); }
.panel-tools { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; z-index: 2; }
.panel-max-btn { background: #fff; }
.modal-panel.panel-max .modal-wide { max-width: none; }
.drawer-panel.panel-max .drawer-b { max-width: 1180px; }
/* 抽屉里的表单在最大化后自动两列/三列，避免长条留白 */
.drawer-panel.panel-max .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .drawer-panel.panel-max .form-grid { grid-template-columns: 1fr; } }
.print-body { background: #fff; padding: 18px 22px; }

/* ---------- 2. 顶栏：角色化快捷区（消息 / 待办 / 我的） ---------- */
.quick-btn .qb-txt { white-space: nowrap; }
.quick-menu.align-right .quick-drop { left: auto; right: 0; }
.qd-foot { border-top: 1px solid var(--line-2); margin-top: 5px; padding: 6px 4px 2px; }
.qd-foot a { justify-content: center; color: var(--brand); }
.qd-list { max-height: 340px; overflow-y: auto; }
.qd-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.qd-item:hover { background: #f3f9fa; }
.qd-item .qdi-main { flex: 1; min-width: 0; }
.qd-item .qdi-title { font-size: 12.8px; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qd-item .qdi-meta { font-size: 11.5px; color: var(--ink-3); }
.qd-empty { padding: 14px 10px; text-align: center; color: var(--ink-3); font-size: 12.5px; }
.quick-drop .qd-head-row { display: flex; align-items: center; justify-content: space-between; }
.link-mini { font-size: 12px; color: var(--brand); }

/* ---------- 3. 右侧「本页说明」信息面板 ---------- */
.drawer-h .dh-tag { margin-left: 6px; font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.help-sec { margin-bottom: 14px; }
.help-sec h4 { font-size: 13px; color: var(--brand-ink); margin: 0 0 6px; }
.help-kv { display: grid; grid-template-columns: 92px 1fr; gap: 5px 10px; font-size: 12.5px; }
.help-kv dt { color: var(--ink-3); }

/* ---------- 4. 列表工具条：导入 / 导出 / 打印 / 批量 ---------- */
.list-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line-2); background: #fbfdfe; }
.list-tools .lt-search { display: flex; align-items: center; gap: 6px; }
.list-tools .lt-search input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; width: 190px; font-family: inherit; }
.list-tools .lt-right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.io-hint { font-size: 11.5px; color: var(--ink-3); }
.sortable th[data-sort] { cursor: pointer; user-select: none; }
.sortable th[data-sort]:hover { color: var(--brand); }
.import-box { padding: 4px 0; }
.import-box .fld { margin-bottom: 10px; }
.import-box code { background: #f2f6f9; padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* ---------- 5. 数据字典管理 ---------- */
.dict-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .dict-wrap { grid-template-columns: 1fr; } }
.dict-list { list-style: none; margin: 0; padding: 0; }
.dict-list li { border-bottom: 1px dashed var(--line-2); }
.dict-list a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: var(--ink); }
.dict-list a:hover { background: #f5fbfc; }
.dict-list a.on { background: #eef9fa; color: var(--brand-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand-2); }
.dict-list .dl-code { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.dict-list .dl-count { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.dict-editable { font-size: 11px; }
table.tb.dense th, table.tb.dense td { padding: 6px 9px; }

/* ---------- 6. 大屏 / 仪表板下钻 ---------- */
.board-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.board-top h1 { font-size: 20px; margin: 0; }
.board-grid { display: grid; gap: 12px; }
.board-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.board-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.board-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1200px) { .board-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .board-grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .board-grid.c4, .board-grid.c3, .board-grid.c2 { grid-template-columns: 1fr; } }
.drill-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.drill-card .dc-head { display: flex; align-items: center; gap: 8px; }
.drill-card .dc-title { font-size: 12.5px; color: var(--ink-3); }
.drill-card .dc-val { font-size: 26px; font-weight: 700; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.drill-card .dc-val small { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.drill-card .dc-foot { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.drill-card.danger .dc-val { color: var(--danger); }
.drill-card.warn .dc-val { color: var(--warn); }
.drill-card.ok .dc-val { color: var(--ok); }
.drill-card.brand .dc-val { color: var(--brand); }
.drill-hint { color: var(--ink-3); font-size: 11.5px; }
.drill-link { color: var(--brand); }
.drill-link:hover { text-decoration: underline; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; }
.screen-card.drillable, .drill-card.drillable { transition: border-color .15s, box-shadow .15s; }
.screen-card.drillable:hover, .drill-card.drillable:hover { border-color: var(--brand-2); box-shadow: 0 8px 22px rgba(14,124,134,.14); }

/* ---------- 7. 打印模板 ---------- */
.print-sheet { background: #fff; color: #1c2b36; }
.print-sheet .ps-head { text-align: center; border-bottom: 2px solid #1c2b36; padding-bottom: 10px; margin-bottom: 14px; }
.print-sheet .ps-head h1 { font-size: 19px; margin: 0 0 4px; }
.print-sheet .ps-head .ps-sub { font-size: 12px; color: #4a5b68; }
.print-sheet .ps-title { font-size: 15px; font-weight: 700; margin: 14px 0 8px; border-left: 3px solid #0e7c86; padding-left: 8px; }
.print-sheet table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.print-sheet table th, .print-sheet table td { border: 1px solid #c8d4dd; padding: 6px 8px; text-align: left; vertical-align: top; }
.print-sheet table th { background: #f2f6f9; font-weight: 600; }
.print-sheet .ps-sign { margin-top: 22px; display: flex; justify-content: space-between; font-size: 12.5px; }
.print-sheet .ps-foot { margin-top: 16px; font-size: 11.5px; color: #7c8b98; text-align: center; }
.print-sheet.page-break { page-break-after: always; }

/* 套打（overlay）：只在预印表单上打数据。抬头/说明/页脚在套打时整块隐藏，定位交给模板 mm 偏移 */
.print-sheet .ps-anchor { display: none; font-size: 10.5px; color: #b6c2cc; margin-bottom: 8px; }
.print-sheet .ps-copy { text-align: right; font-size: 11px; color: #7c8b98; letter-spacing: 1px; }
body.print-overlay .print-sheet .ps-head,
body.print-overlay .print-sheet .ps-note,
body.print-overlay .print-sheet .ps-foot { display: none; }
/* 屏幕上也按套打页边距摆放，所见即所得（打印时由 @media print 再确认一次） */
body.print-overlay .print-sheet { padding: var(--ps-mt, 12mm) var(--ps-mr, 10mm) var(--ps-mb, 12mm) var(--ps-ml, 10mm); }
body.print-overlay .print-sheet.ps-overlay .ps-anchor { display: block; }
body.print-norule .print-sheet table th,
body.print-norule .print-sheet table td { border-left: 0; border-right: 0; border-top: 0; }
body.print-norule .print-sheet table th { background: transparent; }
/* 屏幕上显示套打对位参考线（不打印），用来校准页边距 */
body.print-guide .print-sheet { position: relative; outline: 1px dashed #e879a8; }
body.print-guide .print-sheet::before { content: ''; position: absolute; inset: var(--ps-mt, 12mm) var(--ps-mr, 10mm) var(--ps-mb, 12mm) var(--ps-ml, 10mm); border: 1px dashed #12a3b0; pointer-events: none; }
body.print-guide .print-sheet::after { content: '版心 上' attr(data-mt) ' 左' attr(data-ml); position: absolute; top: 2px; left: 2px; font-size: 10px; color: #12a3b0; }
.print-bar .pb-opt select { border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; font-size: 12.5px; background: #fff; }
.print-sheet-wrap.page-break { page-break-after: always; }

@media print {
  @page { margin: 12mm 10mm; }
  .print-sheet table th, .print-sheet table td { border-color: #999; }
  .print-sheet.page-break, .print-sheet-wrap.page-break { page-break-after: always; }
  .print-sheet .ps-copy { display: none; }
  /* 套打：只有内容落到模板指定位置，不出现任何辅助文字 */
  body.print-overlay .print-sheet { padding: var(--ps-mt, 12mm) var(--ps-mr, 10mm) var(--ps-mb, 12mm) var(--ps-ml, 10mm); border: 0; outline: 0; }
  body.print-overlay .print-sheet .ps-anchor { display: none; }
}

/* ---------- 8. 系统设置中心 ---------- */
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(226px, 1fr)); gap: 14px; }
.set-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.set-card h3 { font-size: 14px; margin: 0; display: flex; align-items: center; gap: 8px; }
.set-card p { color: var(--ink-3); font-size: 12.5px; margin: 0; flex: 1; }
.set-ico { width: 30px; height: 30px; border-radius: 9px; background: #eef9fa; color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.matrix-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.matrix-tbl th, .matrix-tbl td { border-bottom: 1px solid var(--line-2); padding: 6px 8px; }
.matrix-tbl th { background: #f7fafc; text-align: left; position: sticky; top: 0; }
.matrix-tbl td.c { text-align: center; }
.row-on { background: #f2fbfc; }
.perm-group-row td { background: #eef4f7; font-weight: 600; color: var(--brand-ink); }
.log-detail { max-width: 720px; white-space: normal; font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
.rp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; padding: 0 2px 10px; border-bottom: 1px dashed var(--line-2); margin-bottom: 12px; }
.role-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 12px 0; }
/* 角色权限：数据范围说明板 + 快捷操作条 */
.perm-scope-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; padding: 10px 0 4px; }
.psg-item { border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 10px; display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; background: #fbfdfe; }
.psg-item b { font-family: var(--mono); color: var(--brand-ink); }
.psg-item span { color: var(--ink-3); line-height: 1.55; }
.psg-item.on { border-color: var(--brand-2); background: #f2fbfc; box-shadow: 0 0 0 2px rgba(18,163,176,.1); }
.perm-presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0 2px; }
/* 外观设置：皮肤 / 密度选择卡 */
.skin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.skin-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; cursor: pointer; background: #fff; position: relative; }
.skin-card:hover { border-color: var(--brand-2); }
.skin-card.on { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18,163,176,.12); }
.skin-card input { position: absolute; opacity: 0; pointer-events: none; }
.skin-card .sk-name { font-weight: 600; font-size: 13px; }
.skin-card .sk-desc { line-height: 1.6; }
.sk-preview { display: block; height: 26px; border-radius: 7px; }
.sk-teal { background: linear-gradient(90deg, #0e7c86, #12a3b0 60%, #e6f6f8); }
.sk-navy { background: linear-gradient(90deg, #1f3a67, #34558b 60%, #e8eef7); }
.sk-amber { background: linear-gradient(90deg, #b46a12, #e09a34 60%, #fdf3e3); }
.sk-graphite { background: linear-gradient(90deg, #3b454d, #6b7883 60%, #eef1f3); }
/* 制度参数：行内编辑 */
.param-form { display: flex; gap: 6px; align-items: center; }
.param-form .input { width: 130px; }

/* ---------- 9. 手机端（养老院业务动作） ---------- */
.m-qr { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.m-qr svg { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.m-step { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-2); margin: 4px 0; }
.m-step em { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: 0 0 auto; }

/* ---------- 10. 表单细节补齐 ---------- */
.form-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fld.col-full { grid-column: 1 / -1; }
.region-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .region-row { grid-template-columns: 1fr; } }
.thumb { max-width: 96px; max-height: 96px; border-radius: 8px; border: 1px solid var(--line); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kv-inline { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; }
.kv-inline span { color: var(--ink-3); }
.empty-mini { color: var(--ink-3); font-size: 12.5px; padding: 8px 0; }

/* ---------- 11. 大屏（深色）细节 ---------- */
.screen-head .btn.sm.ghost { color: #cfeef1; border-color: rgba(18,163,176,.42); background: rgba(9,32,40,.55); }
.screen-head .btn.sm.ghost:hover { border-color: var(--brand-2); color: #fff; }
.screen-card .drill-hint { color: #7fb4bb; }
.screen-card a { display: inline-block; margin-top: 6px; }
.screen-panel .tag-list { gap: 6px; }
.screen-panel .drill-link { color: #6fd7e2; font-size: 11.5px; }
.dash-fit .screen-card .sc-val { font-size: 22px; }
.dash-fit .screen-panel { padding: 11px 13px; }
.dash-fit .bar-list li { padding: 3px 0; font-size: 12px; }
.dash-fit .screen-wrap { min-height: calc(100vh - 40px); }
.screen-wrap .lazy-skel span { background: linear-gradient(90deg, rgba(18,163,176,.14) 25%, rgba(18,163,176,.3) 37%, rgba(18,163,176,.14) 63%); background-size: 400% 100%; }
.screen-wrap .lazy-err { color: #ffb3ac; }
.screen-wrap .empty-mini { color: #8fc3ca; }
@media (max-width: 1400px) { .screen-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .screen-grid.c4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .screen-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 数据展板：投影/大屏「一屏显示」 ----------
 * 展板页 body 加 .dash-body：视口高度内布局，页脚隐藏，KPI 行等高，
 * 面板区吃掉剩余高度并各自内部滚动——任何 1920×1080/2K 屏都不会出现上下滚动条。 */
body.dash-body { height: 100vh; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
body.dash-body .site-foot { display: none; }
body.dash-body .screen-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 0;
  padding: 14px 18px 16px;
}
body.dash-body .screen-head { margin-bottom: 0; flex: 0 0 auto; }
body.dash-body .screen-grid { flex: 0 0 auto; grid-auto-rows: 1fr; }
body.dash-body .screen-grid .screen-card { display: flex; flex-direction: column; }
body.dash-body .board-grid { flex: 1 1 auto; min-height: 0; }
body.dash-body .screen-panel { min-height: 0; }
body.dash-body .screen-panel .fill { overflow: auto; }

/* ---------- P1 合规工作台（预收费/安全/数据安全）----------
 * 通用实体页之外的专属工作台：行内打卡表单、行内展开的异常上报表单。 */
.inline-form { display: inline-block; vertical-align: middle; margin: 0 4px 3px 0; }
.inline-form .btn { margin: 0; }
details.inline-details { display: inline-block; vertical-align: top; position: relative; margin-bottom: 3px; }
details.inline-details > summary { cursor: pointer; color: var(--brand-2); list-style: none; user-select: none; }
details.inline-details > summary::-webkit-details-marker { display: none; }
details.inline-details > summary::after { content: ' ▾'; font-size: 10px; }
details.inline-details[open] > summary::after { content: ' ▴'; }
details.inline-details form { position: relative; z-index: 3; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); box-shadow: 0 6px 18px rgba(15, 40, 46, .12); }
.kpi.danger .k-val, .kpi.danger .k-label { color: #b3261e; }
.kpi.warn .k-val, .kpi.warn .k-label { color: #8a5a00; }
.kpi.danger { border-color: #f0c4c0; }
.kpi.warn { border-color: #f2ddb4; }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }
.card-h .sub a { white-space: nowrap; }

/* ==========================================================================
   指标中心 / 图表（工作台 N0 驾驶舱）
   纯 CSS + 内联 SVG，不依赖任何图表库与 CDN，离线与院内网均可正常渲染。
   ========================================================================== */

/* ---------- 合规红绿灯 ---------- */
.lights { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; margin-bottom: 16px; }
.lights-lead { font-size: 12px; color: var(--ink-3); letter-spacing: 1px; }
.lights-tail { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.light { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); background: #f8fbfc; }
.light:hover { border-color: var(--brand-2); color: var(--brand-ink); }
.light i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: 0 0 8px; }
.light b { font-weight: 600; }
.light span { color: var(--ink-3); }
.light-ok { background: #eef8f3; border-color: #cfeadd; }
.light-ok i { background: var(--ok); box-shadow: 0 0 0 3px rgba(26,156,107,.16); }
.light-warn { background: #fdf6e9; border-color: #f2ddb4; }
.light-warn i { background: var(--warn); box-shadow: 0 0 0 3px rgba(217,133,23,.16); }
.light-danger { background: #fdefed; border-color: #f0c4c0; }
.light-danger i { background: var(--danger); box-shadow: 0 0 0 3px rgba(210,64,47,.16); }

/* ---------- 分组标题 ---------- */
.mhead { display: flex; align-items: flex-end; gap: 12px; margin: 4px 0 12px; }
.mhead-t { font-size: 16px; margin: 0; }
.mhead-s { color: var(--ink-3); font-size: 12px; }
.mhead .right { margin-left: auto; display: flex; gap: 8px; }
.mgroup { margin-bottom: 16px; }
.mgroup-h { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; padding-left: 2px; }
.mgroup-h .mg-ico { font-size: 15px; }
.mgroup-h b { font-size: 13.5px; }
.mgroup-h .mg-hint { color: var(--ink-3); font-size: 12px; }
.mgroup-h .mg-count { margin-left: auto; color: var(--ink-3); font-size: 12px; }

/* ---------- 指标卡 ---------- */
.mcards { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mcard { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 30px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink); overflow: hidden; transition: border-color .15s, transform .15s; }
.mcard:hover { border-color: var(--brand-2); transform: translateY(-1px); color: var(--ink); }
.mcard .m-label { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard .m-val { font-size: 23px; font-weight: 700; letter-spacing: -.4px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.mcard .m-val small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.mcard .m-sub { color: var(--ink-3); font-size: 11.5px; line-height: 1.45; }
.mcard .m-spark { position: absolute; right: 10px; bottom: 4px; width: 110px; pointer-events: none; }
.mcard .m-spark svg { display: block; width: 110px; height: 28px; }
.mcard.tone-brand .m-val { color: var(--brand); }
.mcard.tone-ok .m-val { color: var(--ok); }
.mcard.tone-warn { border-color: #f2ddb4; }
.mcard.tone-warn .m-val { color: #8a5a00; }
.mcard.tone-danger { border-color: #f0c4c0; }
.mcard.tone-danger .m-val { color: var(--danger); }

/* ---------- 图表排版 ---------- */
.chart-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chart-grid .span2 { grid-column: span 2; }
.chart-box { width: 100%; }
.chart-svg, .gauge-svg, .donut-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 6px; font-size: 12px; color: var(--ink-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; }
.chart-note { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.chart-donut { display: flex; align-items: center; gap: 14px; }
.chart-donut .donut-svg { width: 150px; flex: 0 0 150px; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; font-size: 12.5px; }
.donut-legend li { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 7px; align-items: center; padding: 3px 0; }
.donut-legend i { width: 9px; height: 9px; border-radius: 2px; }
.donut-legend .dl-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend b { font-variant-numeric: tabular-nums; }
.donut-legend em { font-style: normal; color: var(--ink-3); font-size: 11.5px; min-width: 42px; text-align: right; }

/* ---------- 热力格 ---------- */
table.heat { border-collapse: separate; border-spacing: 3px; font-size: 11.5px; width: 100%; }
table.heat th { color: var(--ink-3); font-weight: 500; text-align: center; padding: 2px 4px; white-space: nowrap; }
table.heat tbody th { text-align: left; white-space: nowrap; }
table.heat td { height: 22px; border-radius: 4px; text-align: center; color: #fff; font-variant-numeric: tabular-nums; }
table.heat td.h0 { background: #f1f5f8; }
table.heat td.h1 { background: rgba(18,163,176,.25); }
table.heat td.h2 { background: rgba(18,163,176,.45); }
table.heat td.h3 { background: rgba(18,163,176,.68); }
table.heat td.h4 { background: rgba(18,163,176,.92); }

/* ---------- 仪表盘 ---------- */
.gauge-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gauge-cell { display: block; text-align: center; color: inherit; text-decoration: none; padding: 4px 2px; border-radius: 8px; }
.gauge-cell:hover { background: rgba(18,163,176,.06); }
.gauge-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

@media (max-width: 1360px) { .mcards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid .span2 { grid-column: span 2; }
  .mcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gauge-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .chart-grid { grid-template-columns: 1fr; }
  .chart-grid .span2 { grid-column: auto; }
  .mcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gauge-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-donut { flex-direction: column; align-items: stretch; }
  .chart-donut .donut-svg { width: 100%; flex: 0 0 auto; }
}
