/* 参考 test.png：浅色后台，保留 Layui 图标可见 */
:root {
  --bg-page: #f5f6f8;
  --bg-panel: #ffffff;
  --bg-side: #f7f8fa;
  --border: #ebebeb;
  --text: #333333;
  --text-secondary: #8c8c8c;
  --text-muted: #b0b0b0;
  --accent: #5b8ff9;
  --accent-soft: #edf2f7;
  --icon-blue: #6aa1ff;
  --icon-green: #52c41a;
  --icon-orange: #fa8c16;
  --header-h: 50px;
  --side-w: 240px;
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ===== Header ===== */
.layui-layout-admin {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}
.layui-layout-admin .layui-header {
  height: var(--header-h);
  line-height: var(--header-h);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  position: relative;
  z-index: 1000;
  overflow: visible; /* 避免挡住中线上的悬浮钮 */
}
.layui-layout-admin .layui-logo {
  width: var(--side-w);
  height: var(--header-h);
  line-height: var(--header-h);
  background: var(--bg-panel);
  border-right: none; /* 竖线改由 .side-rail 统一绘制，方便悬浮钮压在中线上 */
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  padding: 0 28px 0 12px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}
.layui-layout-admin .layui-logo .brand-dots {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.layui-layout-admin .layui-logo .brand-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
}
.layui-layout-admin .layui-logo .brand-divider {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}
.layui-layout-admin .layui-logo .brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.layui-layout-admin .layui-header .layui-nav {
  background: transparent;
  padding: 0;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item {
  height: var(--header-h);
  line-height: var(--header-h);
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item > a {
  color: #666 !important;
  padding: 0 14px;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item > a:hover {
  color: var(--accent) !important;
}
.layui-layout-admin .layui-header .layui-nav .layui-this:after,
.layui-layout-admin .layui-header .layui-nav .layui-nav-bar {
  display: none !important;
}
.layui-layout-admin .layui-header .layui-layout-left {
  display: none;
}

/* 顶栏右侧：仅圆形头像 + 气泡菜单 */
.header-user {
  position: absolute;
  right: 16px;
  top: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  z-index: 1003;
}
.header-avatar-btn {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: block;
  overflow: hidden;
  box-shadow: 0 0 0 1px #e5e6eb;
}
.header-avatar-btn:hover {
  box-shadow: 0 0 0 1px #c9d4e3;
}
.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  background: #e8eef5;
}
.avatar-mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.header-avatar-btn:hover .avatar-mask,
.header-avatar-btn[aria-expanded="true"] .avatar-mask {
  opacity: 1;
}
.avatar-mask i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  display: block;
}
.user-bubble {
  position: absolute;
  top: calc(100% - 6px);
  right: 0;
  width: 240px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(31, 45, 61, 0.14);
  border: 1px solid #eef0f3;
  padding: 0;
  z-index: 1004;
}
.user-bubble[hidden] {
  display: none !important;
}
.user-bubble-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.user-bubble-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.user-bubble-org {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.user-bubble-list {
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
}
.user-bubble-foot {
  padding: 6px 0;
}
.user-bubble-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
}
.user-bubble-item:hover {
  background: #f7f8fa;
  color: var(--text);
}
.user-bubble-item .layui-icon {
  font-size: 16px;
  color: #666;
  width: 18px;
  text-align: center;
}

/*
 * 竖中线 + 悬浮折叠（压在中线上，不被顶栏盖住）
 */
.side-rail {
  position: fixed;
  left: var(--side-w);
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -1px;
  background: var(--border);
  z-index: 1001;
  pointer-events: none;
}
.side-fold-float {
  position: fixed;
  left: var(--side-w);
  top: calc(var(--header-h) / 2);
  transform: translate(-50%, -50%);
  z-index: 1002;
  width: 26px;
  height: 26px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 1px solid #dde1e7;
  border-radius: 4px;
  background: #f5f7fa;
  color: #4e5969;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  line-height: 1;
  user-select: none;
  outline: none;
  opacity: 1;
  visibility: visible;
}
.side-fold-float:hover {
  background: #fff;
  color: var(--accent);
  border-color: #c9d4e3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}
.side-fold-float:focus-visible {
  box-shadow: 0 0 0 2px rgba(91, 143, 249, 0.35);
}
.side-fold-float .fold-svg {
  display: block;
  pointer-events: none;
  flex-shrink: 0;
}
body.side-folded .side-rail {
  left: 0;
  margin-left: 0;
}
body.side-folded .side-fold-float {
  left: 14px;
  transform: translate(0, -50%);
}
body.side-folded .side-fold-float .fold-svg {
  transform: scaleX(-1);
}

/* ===== Sidebar ===== */
.layui-layout-admin .layui-side {
  position: absolute;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  width: var(--side-w) !important;
  background: var(--bg-side) !important;
  border-right: none;
  box-shadow: none;
  z-index: 999;
  overflow: hidden;
}
.layui-layout-admin .layui-side .layui-side-scroll.side-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0; /* 非管理员无底部操作栏 */
  width: var(--side-w) !important;
  height: auto !important;
  background: var(--bg-side);
  overflow: hidden;
  padding-bottom: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
body.is-admin .layui-layout-admin .layui-side .layui-side-scroll.side-wrap {
  bottom: 56px; /* 管理员：给底部操作栏留位 */
}
/* 上半：流程中心 + 搜索；高度随展开/收起自适应，无滚动条；收起后搜索栏仍可见 */
.side-panel-top {
  flex: 0 0 auto;
  height: auto;
  overflow: hidden;
}
/* 下半：模块菜单，占满剩余空间并可独立滚动 */
.side-panel-bottom {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}
.layui-layout-admin .layui-side .layui-nav {
  background: transparent !important;
  width: 100% !important;
  padding: 0 !important;
}

/*
 * 侧栏所有菜单项行高统一 40px（一级、二级、有无子菜单的标题行）
 */
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-item,
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-child dd {
  margin: 0 !important;
  padding: 0 !important;
}

/* 未展开的一级项：整行容器就是 40px */
.layui-layout-admin .layui-side .layui-nav-tree > .layui-nav-item:not(.layui-nav-itemed) {
  height: 40px !important;
  line-height: 40px !important;
  overflow: hidden;
}

/* 已展开：容器随子菜单变高，但每一行仍是 40px */
.layui-layout-admin .layui-side .layui-nav-tree > .layui-nav-item.layui-nav-itemed {
  height: auto !important;
  line-height: normal !important;
  overflow: visible !important;
}

.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-child {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-child dd {
  height: 40px !important;
  line-height: 40px !important;
  overflow: hidden;
}

/* 所有可点菜单链接统一 40px
 * 注意：Layui 默认有 padding-top/bottom:5px，content 高 40 + 上下 5 = 视觉 50，必须清掉 */
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-item > a,
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-item a {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  line-height: 40px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 16px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden;
  color: var(--text) !important;
}

/* 二级菜单相对一级再缩进 24px → 左内边距 40px，层次更分明 */
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-child dd > a,
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-child dd a {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  line-height: 40px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 40px !important; /* 16 + 24 */
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden;
  color: var(--text) !important;
}

.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-item > a:hover,
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-child dd > a:hover {
  background: var(--accent-soft) !important;
  color: var(--text) !important;
}

.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-itemed > a {
  background: transparent !important;
  color: var(--text) !important;
}

.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-child dd.layui-this,
.layui-layout-admin .layui-side .layui-nav-tree .layui-this {
  background: var(--accent-soft) !important;
}
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-child dd.layui-this > a,
.layui-layout-admin .layui-side .layui-nav-tree .layui-this > a {
  background: transparent !important;
  color: var(--text) !important;
}

.layui-layout-admin .layui-side .layui-nav .layui-nav-bar {
  display: none !important;
}

/* 展开箭头：在 40px 行内垂直居中（Layui2.9 用 icon-down，勿再用旧三角边框定位） */
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-item > a .layui-nav-more,
.layui-side .layui-nav-tree .layui-nav-item > a .layui-nav-more {
  position: absolute !important;
  top: 50% !important;
  right: 15px !important;
  left: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 16px !important;
  height: 16px !important;
  line-height: 16px !important;
  font-size: 12px !important;
  transform: translateY(-50%) !important;
  display: inline-block !important;
  vertical-align: middle !important;
  color: #999 !important;
  border: none !important;
  background: none !important;
}
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-itemed > a .layui-nav-more,
.layui-side .layui-nav-tree .layui-nav-itemed > a .layui-nav-more {
  transform: translateY(-50%) rotate(180deg) !important;
}

/* 侧栏菜单左侧图标（不含展开箭头） */
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-item > a > .layui-icon:not(.layui-nav-more),
.layui-layout-admin .layui-side .layui-nav-tree .layui-nav-child dd > a > .layui-icon {
  margin-right: 8px;
  font-size: 16px;
  line-height: 1;
  display: inline-block;
  vertical-align: -2px;
}
.layui-layout-admin .layui-side .icon-blue { color: var(--icon-blue) !important; }
.layui-layout-admin .layui-side .icon-green { color: var(--icon-green) !important; }
.layui-layout-admin .layui-side .icon-orange { color: var(--icon-orange) !important; }
.layui-layout-admin .layui-side .icon-gray { color: #8c96a5 !important; }

/* 再次覆盖 Layui：.layui-nav-tree .layui-nav-item>a{padding-top:5px;padding-bottom:5px} → 总高会变成 50 */
.layui-side .layui-nav-tree .layui-nav-item > a {
  height: 40px !important;
  line-height: 40px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}

.side-search {
  padding: 10px 20px;
  box-sizing: border-box;
}
.side-search .layui-input {
  width: 100%;
  height: 32px;
  line-height: 32px;
  border-radius: 16px;
  background: #fff;
  border-color: #e5e6eb;
  font-size: 12px;
  box-sizing: border-box;
}

/* 固定在侧栏视口底部，不随菜单滚动；仅管理员可见 */
.side-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  display: none;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  background: var(--bg-side);
  z-index: 5;
}
body.is-admin .side-footer:not([hidden]) {
  display: flex;
}
.side-footer a {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
  line-height: 1.25;
  text-decoration: none;
}
.side-footer a .layui-icon {
  display: block;
  font-size: 18px;
  margin: 0 0 2px;
  color: #666;
}
.side-footer a:hover,
.side-footer a:hover .layui-icon {
  color: var(--accent);
}

.layui-layout-admin .layui-body {
  position: absolute;
  left: calc(var(--side-w) + 10px);
  right: 10px;
  top: calc(var(--header-h) + 10px);
  bottom: 0;
  width: auto;
  overflow: hidden;
  background: transparent;
  z-index: 998;
}
.main-frame {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 1px 0 rgba(31, 45, 61, 0.04);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

body.side-folded .layui-side,
body.side-folded .layui-logo {
  width: 0 !important;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  border: none;
}
body.side-folded .layui-body {
  left: 10px;
}

/* ===== Login ===== */
.login-page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eef3f8 0%, #f7f8fa 50%, #e8eef5 100%);
}
.login-card {
  width: 380px;
  padding: 36px 32px 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(31, 45, 61, 0.08);
  border: 1px solid var(--border);
}
.login-card h1 { margin: 0; font-size: 22px; color: var(--text); text-align: center; }
.login-sub { margin: 8px 0 28px; text-align: center; color: var(--text-secondary); font-size: 13px; }
.login-switch {
  margin: 16px 0 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}
.login-switch a {
  color: var(--primary, #1e9fff);
  text-decoration: none;
}
.login-switch a:hover { text-decoration: underline; }

/* ===== Content ===== */
.page-wrap {
  padding: 16px;
  background: #fff;
  min-height: 100vh;
  box-sizing: border-box;
}

/* 列表页：整页高度自适应，表格区占满剩余空间 */
html.list-page-html,
html.list-page-html body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.page-wrap.list-page {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.page-wrap.list-page > .page-back,
.page-wrap.list-page > h2,
.page-wrap.list-page > .tip,
.page-wrap.list-page > .list-toolbar {
  flex-shrink: 0;
}
.page-wrap.list-page .list-table-wrap,
.page-wrap.list-page .user-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.page-wrap.list-page .list-pager {
  flex-shrink: 0;
  margin-top: 8px;
  padding-top: 10px;
}
/* 子页返回设置中心 */
.page-back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: auto;
  max-width: max-content;
  gap: 6px;
  margin: 0 0 14px;
  padding: 6px 12px 6px 8px;
  border-radius: 8px;
  border: 1px solid #e8ecf1;
  background: #f7f9fc;
  color: #5a6a7a;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}
.page-back .layui-icon {
  font-size: 14px;
  color: #8a96a5;
}
.page-back:hover {
  color: var(--accent);
  border-color: #c9d8ef;
  background: #eef5ff;
}
.page-back:hover .layui-icon {
  color: var(--accent);
}
.page-back .page-back-sep {
  color: #c5ccd6;
  font-weight: 300;
}
.page-back .page-back-here {
  color: #1f2d3d;
  font-weight: 500;
}
.page-back:hover .page-back-here {
  color: var(--accent);
}

/* 列表底部分页栏（对齐参考图） */
.list-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  padding: 10px 4px 0;
  border-top: 1px solid #eef0f3;
  flex-wrap: wrap;
}
.list-pager-left,
.list-pager-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.list-pager-size {
  height: 28px;
  padding: 0 8px;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  background: #fff;
  color: #5a6a7a;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}
.list-pager-total {
  color: #8c8c8c;
  font-size: 12px;
}
.list-pager-curr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8c8c8c;
  font-size: 12px;
  margin-right: 4px;
}
.list-pager-curr b {
  display: inline-block;
  min-width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  background: #fff;
  color: #1f2d3d;
  font-weight: 500;
  box-sizing: border-box;
  padding: 0 6px;
}
.list-pager-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  background: #fff;
  color: #5a6a7a;
  font-size: 12px;
  cursor: pointer;
  line-height: 26px;
}
.list-pager-btn:hover:not(:disabled) {
  color: var(--accent);
  border-color: #c9d8ef;
}
.list-pager-btn:disabled {
  color: #c5ccd6;
  cursor: not-allowed;
  background: #fafafa;
}

.empty-state {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--text-secondary);
}
.empty-state .empty-icon {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background: #e8f1fb;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin-bottom: 16px;
  position: relative;
}
.empty-state .empty-icon .layui-icon {
  font-size: 48px;
  color: var(--accent);
}
.empty-state .empty-text {
  font-size: 14px;
  color: #9aa3af;
}
.toolbar { margin-bottom: 12px; }
.toolbar .layui-form-item {
  margin-bottom: 0;
  display: inline-block;
  margin-right: 8px;
}
.page-wrap .layui-btn-normal { background-color: var(--accent); }
.page-wrap .layui-btn-normal:hover { background-color: #4a7fe0; }

/* ===== Desktop-only fold controls; mobile uses .m-app ===== */
.header-menu-btn { display: none; }
.side-mask { display: none; }
.m-app { display: none; }

/* ===== Mobile ≤768：仿参考图宫格工作台；桌面壳层隐藏 ===== */
@media (max-width: 768px) {
  .layui-layout-admin {
    display: none !important;
  }
  .m-app {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 3000;
  }
  .m-header {
    flex-shrink: 0;
    height: 48px;
    padding: 0 10px 0 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #1f1f1f;
    color: #fff;
    box-sizing: border-box;
  }
  .m-back {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #fff;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .m-back .layui-icon { font-size: 20px; color: #fff; }
  .m-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
  }
  .m-more {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
  }
  .m-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #333;
  }
  .m-panel {
    position: absolute;
    top: 48px;
    right: 10px;
    z-index: 3010;
    min-width: 132px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    overflow: hidden;
  }
  .m-panel a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
  }
  .m-panel a:last-child { border-bottom: none; }
  .m-panel a:active { background: #f5f6f8; }
  .m-body {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #fff;
  }
  .m-home {
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px;
  }
  .m-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
  }
  .m-section { margin: 0; }
  .m-section-loose {
    padding: 14px 8px 6px;
  }
  .m-section-hd {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    border: none;
    background: #f2f3f5;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
  }
  .m-section-hd .layui-icon {
    font-size: 12px;
    color: #999;
    transition: transform 0.2s ease;
  }
  .m-section.is-open .m-section-hd .layui-icon {
    transform: rotate(180deg);
  }
  .m-section-bd {
    display: none;
    padding: 12px 8px 8px;
  }
  .m-section.is-open .m-section-bd {
    display: block;
  }
  .m-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 6px;
  }
  .m-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #333;
    min-width: 0;
  }
  .m-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .m-tile-icon .layui-icon {
    font-size: 24px;
  }
  .m-c-blue {
    background: #e8f1ff;
  }
  .m-c-blue .layui-icon { color: #4a8cff !important; }
  .m-c-green {
    background: #e7f7ee;
  }
  .m-c-green .layui-icon { color: #2fbf6b !important; }
  .m-c-orange {
    background: #fff1e6;
  }
  .m-c-orange .layui-icon { color: #fa8c16 !important; }
  .m-c-gray {
    background: #f0f1f3;
  }
  .m-c-gray .layui-icon { color: #8c96a5 !important; }
  .m-tile-text {
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    word-break: break-all;
    padding: 0 2px;
  }
  .m-empty {
    padding: 48px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
  }

  /* 登录页 & iframe 内业务页窄屏 */
  .login-card {
    width: auto;
    max-width: 100%;
    margin: 16px;
    padding: 28px 20px 32px;
    box-sizing: border-box;
  }
  .login-card h1 {
    font-size: 18px;
    line-height: 1.35;
  }
  .page-wrap { padding: 12px; }
  .list-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  .list-toolbar-left,
  .list-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    width: 100%;
  }
  .list-toolbar-right .tb-search,
  .list-toolbar-right .layui-input,
  .list-toolbar .tb-search input,
  .list-toolbar input.layui-input {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .list-table-wrap,
  .user-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .page-wrap .layui-form-item .layui-form-label {
    float: none;
    display: block;
    width: auto !important;
    padding: 0 0 6px;
    text-align: left;
  }
  .page-wrap .layui-form-item .layui-input-block,
  .page-wrap .layui-form-item .layui-input-inline {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100%;
  }
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .toolbar .layui-form-item {
    display: block;
    width: 100%;
    margin-right: 0;
  }
  .toolbar .layui-input {
    width: 100% !important;
    box-sizing: border-box;
  }
}

