html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* 根字号整体收小一档：Bootstrap 的 rem 尺寸（控件、间距、表格）随之内聚，
   向 land 后台 13px 的紧凑观感靠拢；页面里写死的 px 细节不受影响 */
html {
  font-size: 15px;
}

body {
  background: #f3f5f9;
  color: #202b3d;
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.page-title {
  font-size: 16px;
  font-weight: 600;
  color: #202b3d;
  letter-spacing: .2px;
  margin-bottom: 12px;
}

.tips {
  color: #6a778b;
  font-size: 12px;
  line-height: 1.6;
}

/* 列表表头排序 */
th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th.sortable .sort-mark {
  color: #c0c4cc;
  font-size: 11px;
  margin-left: 2px;
}

th.sortable.active .sort-mark {
  color: var(--bs-primary);
}

/* 设计器：字段列表放进有界容器里自己滚，字段再多也不会把整页拉得很长
   （230px = 导航 56 + 容器上下边距 24 + 标题行 40 + 提示行 60 + 卡片头 50 的实测占用） */
.des-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 230px);
  min-height: 240px;
  padding-right: 6px;
}

.des-scroll::-webkit-scrollbar {
  width: 10px;
}

.des-scroll::-webkit-scrollbar-thumb {
  background: #c9d2e0;
  border-radius: 5px;
}

.des-scroll::-webkit-scrollbar-track {
  background: #f0f2f5;
}

/* 右侧属性面板跟着列表一起顶住导航下方，左侧滚到哪个字段都能直接看到 */
.des-sticky-top {
  position: sticky;
  top: 68px;
}

/* 设计器：分类 chip */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #f8fafc;
}

/* 分类 chip 等宽平铺、撑满整行，分类多时自动换行，不再挤成一团排在左栏角落 */
.des-cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.des-cat-bar .cat-chip {
  flex: 1 1 220px;
  min-width: 0;
}

/* chip 被拉宽后由名称输入框吃掉剩余宽度，↑↓删除照旧跟在后面 */
.des-cat-bar .cat-chip input {
  flex: 1 1 auto;
  min-width: 0;
}

/* 新增按钮维持自身宽度，别跟着 chip 一起被拉长 */
.des-cat-bar .cat-add {
  flex: 0 0 auto;
}

/* 设计器：分组 */
.des-group-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  margin-bottom: 6px;
  background: #eef3fb;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
}

/* 分组标题在自己的滚动容器里吸顶：字段翻到一半也不会丢掉“现在在哪个分类”的坐标 */
.des-scroll .des-group-hd {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: inset 0 -1px 0 #dbe3ef;
}

.des-group-hd .g-name {
  font-weight: 600;
  color: #303133;
}

.des-tail {
  padding: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: #c0c4cc;
  text-align: center;
  border: 1px dashed #dee2e6;
  border-radius: 4px;
}

.des-tail.drag-over,
.des-item.drag-over {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
  border-style: dashed;
  background: #eef6ff;
}

.des-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #fff;
  cursor: pointer;
}

.des-item:hover {
  border-color: #c6e2ff;
}

.des-item.active {
  border-color: var(--bs-primary);
  background: #eef6ff;
}

/* 已禁用字段：置灰斜纹，仍可选中/拖拽以恢复 */
.des-item.des-disabled {
  background: #f5f6f8;
  border-style: dashed;
  border-color: #d5d9e0;
}

.des-item.des-disabled .meta .name,
.des-item.des-disabled .meta .sub {
  color: #a4abb6;
}

.des-item.des-disabled .handle {
  color: #c4c9d2;
}

.des-item .handle {
  color: #909399;
  cursor: move;
}

.des-item .meta {
  flex: 1;
  min-width: 0;
}

.des-item .meta .name {
  font-weight: 600;
  color: #303133;
}

.des-item .meta .sub {
  font-size: 12px;
  color: #909399;
}

/* 字段行右侧操作区按内容取宽，剩余宽度才给名称与字段名 */
.des-item .ops {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* 迷你操作按钮不参与 flex 压缩，否则“删除”两个汉字会被挤成上下两行 */
.des-mini {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 保存/定位后闪一下，眼睛能跟得住刚被选中（可能滚到视野里）的那个字段 */
.des-item.des-flash {
  animation: desFlash 1.5s ease-out 1;
}

@keyframes desFlash {
  0% { background: #fff3cd; border-color: #ffecb5; }
  60% { background: #fff3cd; border-color: #ffecb5; }
  100% { background: #eef6ff; border-color: var(--bs-primary); }
}

/* 评分控件 */
.rate-stars .rate-star {
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #c0c4cc;
  user-select: none;
}

.rate-stars .rate-star.on {
  color: #e6a23c;
}

/* 查询区字段标签 */
.search-field label {
  font-size: 13px;
  color: #606266;
  margin-bottom: 2px;
}

/* 表单字段项 */
.form-fields .field-item {
  margin-bottom: 14px;
}

.form-fields .field-item label {
  font-size: 13px;
  color: #606266;
}

/* 数据填写页：栅格平铺，间距交给 Bootstrap 的 gutter */
.form-fields.field-grid .field-item {
  margin-bottom: 0;
}

/* 数据填写页：分类之间空开一段（用 padding 撑，不干扰栅格 margin），标题按 h3 大小 */
#deFields .de-group {
  padding-top: 4px;
}

#deFields .de-group:not(:first-child) {
  padding-top: 20px;
}

.de-group-title {
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 2px solid #d6deeb;
  color: #2b3a55;
}

.de-group-count {
  font-size: 13px;
  font-weight: 400;
  color: #9aa1ad;
}

#deFooter {
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* 字段提示徽标：? 号 = 计算逻辑（propsJson.tips），i 号 = 指标说明（propsJson.indicatorDesc）；
   与 land.css 的 .land-body 版同一观感，这里供后台数据填写页（/data/{formKey}/edit）使用 */
#deFields .tip-mark {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; background: #c9d7ec; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1; cursor: help;
  vertical-align: middle; margin-left: 2px;
}

#deFields .tip-mark:hover,
#deFields .tip-mark:focus {
  background: #1b62e8;
  outline: none;
}

#deFields .tip-mark.info { background: #a9d3c2; }

#deFields .tip-mark.info:hover,
#deFields .tip-mark.info:focus { background: #13845f; }

/* 两个徽标相邻时留间距（? 号自身带 margin-left，叠加后约 5px） */
#deFields .tip-mark + .tip-mark { margin-left: 5px; }

#deFields .tip-mark .tip-pop {
  display: none; position: fixed; z-index: 1060;
  min-width: 280px; max-width: 960px; padding: 8px 10px; border-radius: 7px;
  background: #2b3a52; color: #fff; font-size: 12px; font-weight: 400; line-height: 18px;
  white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 4px 14px rgba(20, 40, 80, .25);
}

#deFields .tip-mark:hover .tip-pop,
#deFields .tip-mark:focus .tip-pop {
  display: block;
}

/* 左上角一行小标题，区分「计算逻辑」与「指标说明」（与 land.css 同口径） */
#deFields .tip-mark .tip-pop::before {
  display: block; margin-bottom: 3px; font-size: 11px; color: #9db6dc; content: attr(data-label);
}

/* 气泡坐标由 Fields.alignTip 每次悬浮/聚焦时按视口实测写入 inline left/top（fixed 挂视口层，
   靠左字段显示在徽标右边、靠右在左边、放得下居中），不再依赖选边类（与 land.css 同口径） */

/* 必填校验未通过的字段 */
.field-item.err > .form-label {
  color: var(--bs-danger);
}

.field-item.err .w-box > .form-control,
.field-item.err .w-box > .form-select {
  border-color: var(--bs-danger);
}

/* 文本框获得焦点：对齐 land 体系的主题蓝描边 + 3px 浅蓝晕圈 */
.form-control:focus,
.form-select:focus {
  border-color: #1b62e8;
  box-shadow: 0 0 0 3px rgba(27, 98, 232, .10);
  caret-color: #1b62e8;   /* 闪烁的光标也跟着变蓝 */
}

/* ================= 联想输入自定义下拉（widgets.js，替代原生 datalist） =================
   面板挂到 <body>，坐标由 JS 按输入框 rect + visualViewport 实时写入，
   position:fixed 相对视口，避开祖先 overflow 裁剪 / stacking context / 键盘遮挡（真机“不生效”根因） */
.w-sug-host { position: relative; }
.w-sug {
  display: none; position: fixed; z-index: 2000;
  background: #fff; border: 1px solid #dce5f2; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(27, 98, 232, .16);
  overflow: hidden; -webkit-overflow-scrolling: touch; padding: 5px;
  animation: wSugIn .12s ease-out;
  display: none; flex-direction: column;
}
.w-sug.open { display: flex; }
.w-sug-list { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 1px; }
@keyframes wSugIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.w-sug-item {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 8px 11px; border-radius: 7px; font-size: 13.5px; color: #2c3a52; cursor: pointer;
  touch-action: manipulation; transition: background .12s, color .12s;
}
.w-sug-txt { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-sug-val { flex: 0 0 auto; max-width: 42%; font-size: 11.5px; color: #8a97ad; background: #f2f5fa;
  border-radius: 5px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-sug-empty, .w-sug-loading { padding: 12px 11px; font-size: 12.5px; color: #93a0b5; text-align: center; }
.w-sug-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 5px 6px 3px; margin-top: 3px; border-top: 1px solid #eef1f6; }
.w-sug-total { font-size: 12px; color: #8a97ad; }
.w-sug-pager { display: inline-flex; align-items: center; gap: 6px; }
.w-sug-page { font-size: 12px; color: #63738a; min-width: 40px; text-align: center; }
.w-sug-prev, .w-sug-next {
  width: 26px; height: 26px; line-height: 1; border: 1px solid #dce5f2; border-radius: 6px;
  background: #fff; color: #2c3a52; cursor: pointer; touch-action: manipulation;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.w-sug-prev:hover, .w-sug-next:hover { border-color: #1b62e8; color: #1b62e8; }
.w-sug-prev:disabled, .w-sug-next:disabled { opacity: .4; cursor: default; border-color: #e3e8f0; color: #b6c0d0; }
.w-sug-item:hover,
.w-sug-item.active { background: #eef4ff; color: #1b62e8; }
.w-sug-hit { background: none; color: #1b62e8; font-weight: 700; }

/* ================= 数据列表（.dd-table 与 .col-* 只作用在本页，不影响其他页面的 Bootstrap 表格） ================= */
.dd-wrap {
  position: relative;
  overflow: auto;
  min-height: 200px;
  max-height: calc(100vh - 258px);
  --dd-hd1: 34px;   /* 分组带行高，第二行表头的吸顶偏移依赖它 */
}

.dd-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.dd-wrap::-webkit-scrollbar-thumb {
  background: #c9d2e0;
  border-radius: 5px;
}

.dd-wrap::-webkit-scrollbar-track {
  background: #f0f2f5;
}

.dd-table {
  /* collapse 下吸顶单元格会丢边框，改 separate + 内阴影画线 */
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  min-width: 100%;
  font-size: 12.5px;
  color: #303133;
}

.dd-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: var(--dd-hd1);
  padding: 2px 6px;
  vertical-align: middle;
  text-align: center;   /* 列表页表头统一居中（与表单/菜单列表一致） */
  font-weight: 600;
  color: #63738a;
  background: #f7f9fc;
  /* 下：表头底线，右：列分隔线 */
  box-shadow: inset 0 -1px 0 #dfe4ec, inset -1px 0 0 #e3e8f0;
}

/* 字段列表头：固定 46px，标签最多两行，列一多也不会高低参差 */
.dd-table .dd-hd2 th,
.dd-table .dd-hd1.dd-flat th {
  top: 0;
  height: 46px;
  vertical-align: top;
}

.dd-table .dd-hd2 th {
  top: var(--dd-hd1);
}

.dd-table .dd-hd2 th.g-start,
.dd-table .dd-hd1.dd-flat th.g-start {
  box-shadow: inset 0 -1px 0 #dfe4ec, inset -1px 0 0 #e3e8f0, inset 1px 0 0 #c9d5e8;
}

/* 分组带：单行省略，可点击横向定位到该组 */
.dd-table th.hd-band {
  height: var(--dd-hd1);
  vertical-align: middle;
  text-align: center;
  color: #2b3a55;
  background: #e9eff8;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 1px 0 0 #dbe3ef, inset -1px 0 0 #dbe3ef, inset 0 -1px 0 #dfe4ec;
}

.dd-table th.hd-band:hover {
  background: #d8e6f8;
}

.dd-table .th-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-height: 32px;
  line-height: 16px;
  white-space: normal;   /* 覆盖全局 th.sortable 的 nowrap，否则折不了两行 */
  word-break: break-all;
}

/* 排序标记居中，跟居中的表头文字对齐 */
.dd-table .sort-mark {
  display: block;
  height: 12px;
  font-size: 10px;
  line-height: 12px;
  text-align: center;
  color: #c0c4cc;
}

.dd-table th.sortable {
  cursor: pointer;
}

.dd-table th.sortable:hover {
  background: #e8eff9;
}

.dd-table th.active .sort-mark,
.dd-table th.active .th-label {
  color: var(--bs-primary);
}

/* 左右冻结列 */
.dd-table .pin-l,
.dd-table .pin-r {
  position: sticky;
  z-index: 1;
}

.dd-table .pin-l1 { left: 0; }
.dd-table .pin-l2 { left: 34px; }
.dd-table .pin-r { right: 0; }

.dd-table thead .pin-l,
.dd-table thead .pin-r {
  z-index: 3;
}

.dd-table .hd-check,
.dd-table td.pin-l1 {
  text-align: center;
  padding-left: 4px;
  padding-right: 0;
}

.dd-table .hd-id { text-align: center; }
.dd-table .hd-id .th-label { text-align: center; }

.dd-table .pin-r {
  box-shadow: inset 1px 0 0 #dbe3ef, inset -1px 0 0 #dbe3ef;
}

.dd-table thead .pin-r {
  box-shadow: inset 1px 0 0 #d9dfec, inset -1px 0 0 #dfe4ec, inset 0 -1px 0 #dfe4ec;
}

.dd-table tbody td {
  height: 34px;
  padding: 2px 6px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fff;
  /* 下：行分隔线（每行只画一条），右：列分隔线 */
  box-shadow: inset 0 -1px 0 #eef1f6, inset -1px 0 0 #e3e8f0;
}

/* 冻结列要挡住从下面滚过去的内容，列线用重一点的颜色 */
.dd-table tbody td.pin-l,
.dd-table tbody td.pin-r {
  background: #fff;
  box-shadow: inset 0 -1px 0 #eef1f6, inset -1px 0 0 #dfe4ec, inset 1px 0 0 #dfe4ec;
}

.dd-table tbody tr:nth-child(odd) > td {
  background: #fafbfd;
}

.dd-table tbody tr:hover > td {
  background: #eff5ff;
}

.dd-table td.g-start {
  box-shadow: inset 0 -1px 0 #eef1f6, inset -1px 0 0 #e3e8f0, inset 1px 0 0 #c9d5e8;
}

.dd-table tbody td.pin-l.g-start,
.dd-table tbody td.pin-r.g-start {
  box-shadow: inset 0 -1px 0 #eef1f6, inset -1px 0 0 #dfe4ec,
  inset 1px 0 0 #dfe4ec, inset 2px 0 0 #c9d5e8;
}

.dd-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dd-table .dd-id,
.dd-table .dd-time,
.dd-table .dd-user {
  color: #6b7280;
}

/* 创建人/修改人名字不长，折行会让行高不一，统一折尾 */
.dd-table .dd-user {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dd-table .dd-null {
  color: #c8cdd8;
}

.dd-table td.dd-ops {
  text-align: center;
}

.dd-table td.dd-ops .btn {
  padding: 0 4px;
  font-size: 12px;
}

/* 文件字段：多个文件在同一单元格内逐行列出，行高随文件数自适应；
   单行过长折尾、悬停看全名（全局 td 是单行省略 + 固定高，这里放开给文件列让位） */
.dd-table td.dd-td-files {
  white-space: normal;
  vertical-align: top;
}

.dd-files {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}

.dd-files .dd-file {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  line-height: 1.35;
  color: #1b62e8;
  text-decoration: none;
}

.dd-files .dd-file:hover {
  text-decoration: underline;
}

/* 可双击编辑的单元格：鼠标提示可点，编辑态高亮描边 */
.dd-table td.dd-cell {
  cursor: cell;
}

.dd-table td.dd-editing {
  background: #eaf1fe;
  box-shadow: inset 0 0 0 2px #1b62e8;
}

/* 内联编辑浮层：body 级 fixed 定位，不受表格横向滚动/固定列宽裁切 */
.dd-editor {
  position: fixed;
  z-index: 1080;
  min-width: 220px;
  max-width: 460px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #1b62e8;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
}

.dd-editor .w-box {
  width: 100%;
}

/* 附件内联编辑：文件选择框 + 已传清单需要更宽的浮层承载 */
.dd-editor.dd-editor-file {
  min-width: 380px;
  max-width: 520px;
}

.dd-editor-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.dd-editor-tip {
  margin-right: auto;
  font-size: 11.5px;
  color: #94a3b8;
}

/* 表单管理操作列：纯图标按钮收紧左右内边距，整行宽度控制在一屏内、避免横向滚动 */
#fmTable .btn.fm-op-btn {
  padding: 0.25rem 0.4rem;
  line-height: 1.2;
}

/* 紧凑模式：只压行高，表头高度不变，吸顶偏移仍然对齐 */
.dd-wrap.dd-dense .dd-table tbody td {
  height: 26px;
  font-size: 12px;
}

/* 显示列弹窗 */
.col-group {
  margin-bottom: 12px;
}

.col-group-hd {
  display: flex;
  align-items: center;
  padding-bottom: 4px;
  font-size: 13px;
  color: #303133;
  border-bottom: 1px solid #eef1f6;
}

.col-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2px 12px;
  padding-top: 6px;
}

.col-item {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  cursor: pointer;
}

.col-item:hover {
  background: #f2f6fd;
}

.col-item .col-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-item .col-key {
  flex: none;
  margin-left: auto;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: #b6bcc8;
}

/* =====================================================================
   应用外壳：固定侧边栏 + 顶栏（参考 MDB Majestic 后台风格）
   侧边栏宽度、顶栏高度、主色都收敛到 :root 变量，换配色只改这里
   ===================================================================== */
:root {
  --sb-w: 222px;         /* 侧边栏宽度：与 land 后台 222px 一致 */
  --tb-h: 58px;          /* 顶栏高度 */
  --sb-bg: #141e32;      /* 侧边栏背景：深蓝灰纯色（land --nav） */
  --sb-active: #1b62e8;  /* 选中项底色（land 主题蓝） */
  --sb-hover: #20314c;   /* 悬停底色：land 导航悬停的深青蓝 */
  --sb-accent: #fff;     /* 保留变量名兼容旧引用 */
  --sb-text: #aebdd4;    /* 菜单文字（land 侧栏文字色） */
  --sb-line: #e3e9f1;    /* land 分隔线浅蓝灰，顶栏/卡片/弹窗共用 */
}

body {
  padding-left: var(--sb-w);
  padding-top: var(--tb-h);
  transition: padding-left .2s ease;
}

/* 被 /myfilling 左侧菜单内嵌到 iframe 时（api.js 挂 in-embed）：脱掉后台外壳（侧边栏 + 顶栏），
   body 不再为它们留白，内容铺满整个 iframe，避免导航二次套娃 */
html.in-embed body {
  padding-left: 0;
  padding-top: 0;
}

html.in-embed .app-sidebar,
html.in-embed .app-topbar,
html.in-embed .app-sidebar-backdrop,
html.in-embed .app-sidebar-toggle {
  display: none !important;
}

html.in-embed .container-fluid {
  padding-top: 12px;
}

/* 后台管理内容区拉宽：解除各页 .container-fluid.py-3 写死的 max-width（内联样式需 !important 覆盖），
   让内容铺满侧边栏右侧的整个可用宽度，挤掉宽屏下两侧留白；边缘呼吸位靠 container-fluid 自带 gutter */
.container-fluid.py-3 {
  max-width: none !important;
}

/* 后台管理页面进入时淡入渲染：app.css 只被后台 layout 引入，land/stockhousing 填报外壳不受影响。
   填充模式必须用 backwards 而不是 both：both 让动画停在 after 阶段、元素永久保持 stacking context，
   页面容器里的 Bootstrap 弹窗会被 body 级的 modal-backdrop 盖住（新建表单弹窗被遮蔽的根因） */
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.container-fluid.py-3 {
  animation: page-fade-in .35s ease-out backwards;
}
/* 表格行随数据到达逐个淡入：列表行都是 AJAX 渲染后新插入 DOM 的，
   CSS 动画对新元素即时起播，避免"先见表框、内容后蹦"的断层（含翻页/查询重查） */
.table > tbody > tr,
.dd-table > tbody > tr {
  animation: page-fade-in .3s ease-out backwards;
}
/* 用户系统开启「减少动态效果」时不播放动画，直接呈现内容 */
@media (prefers-reduced-motion: reduce) {
  .container-fluid.py-3,
  .table > tbody > tr,
  .dd-table > tbody > tr { animation: none; }
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sb-w);
  display: flex;
  flex-direction: column;
  background: var(--sb-bg);
  box-shadow: none;
  border-right: 1px solid #1d2a44;
  z-index: 1040;
  transition: transform .2s ease;
}

/* 品牌区：favicon 图标在左，右边文字块上下两行（中文主名 + 英文副题），整体垂直居中 */
.app-brand {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

/* 品牌图标：49px 源图的 PNG 缩到 35px 显示，透明底平滑缩放，尺寸与双行文字块相称更醒目 */
.app-brand-mark {
  flex: none;
  height: 35px;
  width: 35px;
  object-fit: contain;
}

/* 文字块：主名与副题纵向排，占满剩余宽度并允许主名截断 */
.app-brand-name {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.app-brand-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;   /* 主名单行绝不折行 */
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.2;
}

/* 英文副题：主名下方一行，11px 与 16px 主名比例协调；
   字号加大后字距微收并禁折行，保证 22 个字符排进 222px 侧栏的文字块 */
.app-brand-sub {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .6px;
  color: #4d8bf0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 20px;
}

.app-nav::-webkit-scrollbar { width: 6px; }
.app-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); border-radius: 3px; }

.app-nav-tip {
  color: rgba(255, 255, 255, .6);
  font-size: 12px;
  padding: 12px 18px;
}

/* land 式导航项：圆角色块，靠 margin 留缝隙，不再用左侧竖条选中 */
.app-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 3px 10px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--sb-text);
  text-decoration: none;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-link:hover {
  background: var(--sb-hover);
  color: #fff;
}

.app-link.active {
  background: var(--sb-active);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(27, 98, 232, .28);
}

.app-icon {
  flex: none;
  width: 20px;
  text-align: center;
  font-size: 15px;
}

/* 字体图标（Bootstrap Icons）与旧的 emoji 共存，统一高度 */
.app-icon .bi {
  font-size: 16px;
  line-height: 1;
}

.app-dot {
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}

/* 分组（父菜单） */
.app-group-toggle {
  justify-content: flex-start;
}

.app-group-toggle .caret {
  margin-left: auto;
  font-size: 11px;
  transition: transform .18s ease;
}

.app-group.open .app-group-toggle .caret {
  transform: rotate(90deg);
}

/* 子菜单缩进交给左边距，色块风格与一级项一致，不再压整块暗底 */
.app-sub {
  display: none;
}

.app-group.open .app-sub {
  display: block;
}

.app-sub .app-link {
  margin-left: 28px;
  padding: 7px 12px;
  font-size: 13px;
}

/* 顶栏 */
.app-topbar {
  position: fixed;
  top: 0;
  left: var(--sb-w);
  right: 0;
  height: var(--tb-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid var(--sb-line);
  z-index: 1030;
  transition: left .2s ease;
}

.app-topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: #202b3d;
}

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

.app-sidebar-toggle {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--sb-active);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}

.app-sidebar-toggle:hover {
  background: #e9f0fe;
}

.app-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 1035;
}

/* 折叠（桌面点 ☰，或窄屏默认折叠）：侧边栏滑出、主体占满 */
body.sb-collapsed {
  padding-left: 0;
}

body.sb-collapsed .app-sidebar {
  transform: translateX(-100%);
}

body.sb-collapsed .app-topbar {
  left: 0;
}

/* 窄屏：侧边栏改为浮层抽屉，靠 backdrop 关闭 */
@media (max-width: 991.98px) {
  body {
    padding-left: 0;
  }

  .app-topbar {
    left: 0;
  }

  .app-sidebar {
    transform: translateX(-100%);
  }

  body.sb-open {
    overflow: hidden;
  }

  body.sb-open .app-sidebar {
    transform: translateX(0);
  }

  body.sb-open .app-sidebar-backdrop {
    display: block;
  }
}

/* 纯查看模式（URL 带 op=view，api.js 给 <html> 挂 op-view）：隐藏侧边菜单与伸缩开关；
   顶栏（右上角姓名区）整体拿掉，内容显示顶格，手机端打开就是纯表单 */
html.op-view body {
  padding-left: 0;
  padding-top: 0;   /* 顶栏已下线，不再为 58px 顶栏留白 */
}

html.op-view .app-sidebar,
html.op-view .app-sidebar-toggle,
html.op-view .app-sidebar-backdrop,
html.op-view .de-back-link,
html.op-view .app-topbar,
html.op-view #topbarSwitchBtn {
  display: none !important;
}

/* 顶格后容器自身的 py-3 留白也压缩，标题贴着状态栏安全区起排
   （Bootstrap .py-3 的 padding 带 !important，这里必须同级加 !important 才能覆盖） */
html.op-view .container-fluid.py-3 {
  padding-top: max(10px, env(safe-area-inset-top, 0px)) !important;
}

/* op=view 顶栏样式已随顶栏下线（见上：display:none），只保留页面内标题字号规则 */

/* 姓名首字头像圈：移动端样稿 .avatar 同款（浅蓝底圆 + 主题蓝字） */
.tb-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e8f0fd;
  color: #2f6fd0;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

html.op-view .app-user .dropdown-toggle .bi,
html.op-view .app-user .dropdown-toggle:after,
html.op-view .app-user .dropdown-menu {
  display: none !important;
}

/* op=view：页面头部标题 21px（样稿 h1）；字段名称 15.5px 加粗（样稿 .qlabel 600） */
html.op-view .page-title {
  font-size: 21px;
  font-weight: 700;
}

html.op-view .field-item .form-label {
  font-size: 15.5px;
  font-weight: 600;
}

/* =====================================================================
   op=view 手机端填报：一比一复刻「土地收储日报收集-纯本地版」样稿（2026-11-26）
   文档外壳 shell(475px 白底居中) · 标题 h1+lead+rule · 单列 .q 问题流（小字=指标说明）
   输入 .field 44px/7px 圆角/#dcdfe3 描边 · 聚焦 #2f6fd0+3px 浅晕 · 勾选 .opt 17px 方框
   提交区随文档流 .submitwrap（240px 主按钮），不再吸底
   ===================================================================== */
html.op-view {
  --pv-ink: #16191d;
  --pv-ink2: #3d434b;
  --pv-muted: #8b9099;
  --pv-line: #e8eaed;
  --pv-fborder: #dcdfe3;
  --pv-blue: #2f6fd0;
  --pv-blue-soft: #e8f0fd;
  --pv-btn: #4d84d8;
  --pv-bg: #f4f5f7;
  --pv-danger: #e34d59;
}

html.op-view body {
  background: var(--pv-bg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

/* 文档外壳：白底 475px 居中、min-height 100vh（样稿 .shell），容器自身不再留左右白 */
html.op-view .container-fluid.py-3 {
  max-width: 475px !important;
  background: #fff;
  min-height: 100vh;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
}

/* 原「返回/标题/meta」行（「表单名 · N 个字段」）整行拿掉：Bootstrap .d-flex 自带 !important，
   这里必须同级加 !important 才能盖住，否则头部行仍然顶在表单上方 */
html.op-view .container-fluid > .d-flex.flex-wrap.gap-2 {
  display: none !important;
}

/* 主体卡片扁平化：文档即卡片，内边距交给 .doc 口径的 card-body */
html.op-view .card.shadow-sm {
  border: none;
  background: transparent;
  box-shadow: none;
}

html.op-view .card.shadow-sm > .card-body {
  padding: 22px 18px 0;
}

html.op-view #deTip {
  display: none;
}

/* 标题区：样稿 h1 21px/1.35/700（表单名），lead 13.5px 灰字读表单描述（保留换行），发丝分隔线 */
html.op-view .pv-h1 {
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--pv-ink);
  margin: 0 0 10px;
}

html.op-view .pv-lead {
  font-size: 13.5px;
  color: #6b717a;
  line-height: 1.8;
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

html.op-view .pv-rule {
  height: 1px;
  background: var(--pv-line);
  margin-top: 16px;
}

/* 问题区：样稿 .q 单列——一题一屏、题间发丝线，去掉卡片化背景 */
html.op-view #deFields.row {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  display: block;
}

html.op-view #deFields .field-item {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  margin: 0 !important;
  padding: 20px 0 2px !important;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

html.op-view #deFields .field-item + .field-item {
  border-top: 1px solid #f0f1f3 !important;
}

/* 分组标题（配了分类的表单）：样稿无组概念，按 h1 降一级轻量呈现，去计数胶囊 */
html.op-view #deFields .de-group {
  width: 100% !important;
  margin-top: 22px !important;
  padding: 0 !important;
}

html.op-view #deFields .de-group:first-child {
  margin-top: 2px !important;
}

html.op-view .de-group-title {
  display: block;
  margin: 0 0 2px;
  padding: 0;
  border: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--pv-ink);
}

html.op-view .de-group-count {
  display: none;
}

/* 标签行：样稿 .qhead——必填星在前、题文 15.5px/600（星号 order:-1 换到题文前） */
html.op-view #deFields .field-item .form-label {
  display: flex;
  gap: 3px;
  align-items: flex-start;
  margin-bottom: 6px !important;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--pv-ink);
}

html.op-view #deFields .field-item .form-label .text-danger {
  order: -1;
  color: var(--pv-danger);
  font-size: 14px;
  line-height: 1.4;
  margin-left: 0;
}

/* 小字 = 指标说明（样稿 .qhint：12.8px 灰字 1.75 行高，渲染在标签下、控件上） */
html.op-view .de-qhint {
  font-size: 12.8px;
  color: var(--pv-muted);
  line-height: 1.75;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

/* 指标说明已直接铺成 qhint 小字，i 徽标在手机端拿掉；? 号（计算逻辑）保留 */
html.op-view #deFields .tip-mark.info {
  display: none;
}

/* 内联校验文案（样稿 .err：红字 12.5px，随 .err 态显隐） */
html.op-view .de-err-msg {
  display: none;
  color: var(--pv-danger);
  font-size: 12.5px;
  margin-top: 6px;
}

html.op-view #deFields .field-item.err .de-err-msg {
  display: block;
}

html.op-view #deFields .field-item.err .form-control,
html.op-view #deFields .field-item.err .form-select {
  border-color: var(--pv-danger);
}

/* 输入控件：样稿 .field——高 44px、7px 圆角、#dcdfe3 描边、字号 15px */
html.op-view .form-control,
html.op-view .form-select {
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--pv-ink);
  border: 1px solid var(--pv-fborder);
  border-radius: 7px;
  background-color: #fff;
  box-shadow: none;
  transition: border-color .18s, box-shadow .18s;
}

html.op-view textarea.form-control {
  height: auto;
  min-height: 76px;
  padding: 10px 12px;
  line-height: 1.65;
  resize: vertical;
}

html.op-view .form-control::placeholder {
  color: #b6bac1;
  opacity: 1;
}

/* 聚焦态：样稿主题蓝 #2f6fd0 + 3px 浅晕 */
html.op-view .form-control:focus,
html.op-view .form-select:focus {
  border-color: var(--pv-blue);
  box-shadow: 0 0 0 3px rgba(47, 111, 208, .1);
  background-color: #fff;
}

/* 联想下拉手机端（op=view）：面板挂 body、fixed 相对视口，坐标由 JS 按 visualViewport
   贴到键盘正上方，祖先 overflow/transform 都影响不到它（真机“不生效”根因已解）。
   候选项 ≥46px 触控条、条目间 6-8px 间距、按压态跟随主题蓝（ui-ux-pro-max：touch-target /
   touch-spacing / tap-feedback）；宽度/位置由 JS 写入，这里只管外观 */
html.op-view .w-sug {
  border-color: var(--pv-fborder); border-radius: 12px; padding: 6px;
  box-shadow: 0 8px 24px rgba(22, 25, 29, .16);
}
html.op-view .w-sug-item {
  display: flex; align-items: center; min-height: 46px;
  padding: 11px 13px; font-size: 15.5px; line-height: 1.4; color: var(--pv-ink);
  white-space: normal; overflow-wrap: anywhere; border-radius: 10px;
}
html.op-view .w-sug-item + .w-sug-item { margin-top: 4px; }
html.op-view .w-sug-item:hover,
html.op-view .w-sug-item.active,
html.op-view .w-sug-item:active { background: var(--pv-blue-soft); color: var(--pv-blue); }
html.op-view .w-sug-hit { color: var(--pv-blue); }
/* 分页条手机端：翻页按钮 ≥44px 触控目标，字号放大 */
html.op-view .w-sug-foot { padding: 8px 6px; margin-top: 6px; }
html.op-view .w-sug-prev, html.op-view .w-sug-next { width: 44px; height: 44px; font-size: 18px; border-radius: 10px; }
html.op-view .w-sug-total, html.op-view .w-sug-page { font-size: 13px; }
html.op-view .w-sug-item + .w-sug-item { margin-top: 6px; }
html.op-view .w-sug-val { font-size: 12.5px; padding: 2px 8px; }
html.op-view .w-sug-empty, html.op-view .w-sug-loading { font-size: 14px; padding: 16px 11px; }

/* 面板形态微差：手机端入场从下轻托，圆角与描边更贴样稿 */
html.op-view .w-sug.w-sug--sheet { animation: wSugIn .14s ease-out; }


html.op-view .form-control[readonly],
html.op-view .form-control:disabled {
  background: #f7f8fa;
  color: var(--pv-ink2);
  border-color: var(--pv-fborder);
}

/* 单选/多选：样稿 .opt——整行 gap 10px、上下方框 17px/3px 圆角，选中 #4d84d8 */
html.op-view .form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0 !important;
  margin: 0;
  min-height: 0;
  background: transparent;
  border-radius: 0;
  touch-action: manipulation;
}

html.op-view .form-check:hover,
html.op-view .form-check:active {
  background: transparent;
}

html.op-view .form-check .form-check-input {
  float: none;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 3px 0 0 !important;
  border: 1px solid #cfd3d9;
  border-radius: 3px;
  background-color: #fff;
}

html.op-view .form-check .form-check-input[type=radio] {
  border-radius: 50%;
}

html.op-view .form-check .form-check-input:checked {
  background-color: var(--pv-btn);
  border-color: var(--pv-btn);
}

html.op-view .form-check .form-check-input:focus-visible {
  box-shadow: 0 0 0 3px rgba(47, 111, 208, .15);
  outline: none;
}

html.op-view .form-check .form-check-label {
  padding-left: 0;
  font-size: 14.5px;
  color: var(--pv-ink2);
  line-height: 1.55;
  flex: 1 1 auto;
  cursor: pointer;
}

html.op-view .form-check.form-switch { align-items: center; }

html.op-view .form-check.form-switch .form-check-input {
  width: 2em;
  height: 1em;
  margin-top: 0 !important;
  border-radius: 1em;
}

/* 评分星星：保留足够触控区 */
html.op-view .rate-stars .rate-star {
  font-size: 26px;
  padding: 6px 4px;
  min-width: 32px;
  text-align: center;
}

/* 提交区：样稿 .submitwrap——随文档流居中，不再吸底；主按钮 240px/46px/#4d84d8 */
html.op-view #deFooter.card-footer {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 18px 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  background: transparent;
  border-top: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.op-view #deSubmitBtn {
  width: 240px;
  max-width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--pv-btn);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  box-shadow: none;
  touch-action: manipulation;
}

html.op-view #deSubmitBtn:active:not(:disabled) {
  opacity: .9;
}

html.op-view #deSubmitBtn:disabled {
  background: var(--pv-btn);
  opacity: .55;
  box-shadow: none;
}

/* 取消/继续新增在纯填报场景拿掉；状态行小字居下（样稿 foot-note 口径） */
html.op-view #deFooter a.btn,
html.op-view #deKeepBtn {
  display: none !important;
}

html.op-view #deStatus {
  flex: 0 0 auto;
  order: 0;
  text-align: center;
  font-size: 11.5px;
  color: #b0b4bb;
}

html.op-view #deFooter .flex-grow-1 {
  display: none;
}

/* tip-pop 气泡：手机端限宽自适应（fixed 坐标仍由 Fields.alignTip 实测写入，
   这里不能残留 left:50%/translateX 老居中口径，否则会和 inline 坐标叠加错位） */
html.op-view #deFields .tip-mark .tip-pop {
  min-width: 0;
  width: min(88vw, 360px);
  right: auto;
  transform: none;
}

/* 窄屏微调（样稿 @media max-width:370px） */
@media (max-width: 370px) {
  html.op-view .card.shadow-sm > .card-body {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* 样稿 .shell 本身就是 475px 单列文档流，桌面打开 op=view 也不拆多列 */

@media (prefers-reduced-motion: reduce) {
  html.op-view #deFields .field-item,
  html.op-view #deSubmitBtn,
  html.op-view .form-control,
  html.op-view .form-select {
    transition: none;
  }
}

/* =====================================================================
   PC 端填报页（/data/{formKey}/edit 不带 op=view）：ui-ux-pro-max 选型 Minimalism/Swiss
   企业表单风——白底薄描边、清晰层级、分组带发丝线、校验内联可见、动作栏吸顶可达；
   避免重阴影/渐变装饰，状态变化不推动周围内容
   ===================================================================== */
html:not(.op-view) #deFields .field-item {
  background: #fbfcfe;
  border: 1px solid #e9edf4;
  border-radius: 10px;
  padding: 12px 14px 14px;
  transition: border-color .2s, box-shadow .2s;
}

html:not(.op-view) #deFields .field-item:hover {
  border-color: #d8e3f5;
}

html:not(.op-view) #deFields .field-item:focus-within {
  background: #fff;
  border-color: #b9d0f5;
  box-shadow: 0 0 0 3px rgba(27, 98, 232, .08);
}

html:not(.op-view) #deFields .field-item.err {
  border-color: #f0b6bc;
  background: #fffafa;
}

/* PC 内联校验文案：与手机端同源 de-err-msg，填错字段下方直接给红字，不靠 toast 独扛 */
html:not(.op-view) .de-err-msg {
  display: none;
  color: #c62833;
  font-size: 12.5px;
  margin-top: 5px;
}

html:not(.op-view) #deFields .field-item.err .de-err-msg {
  display: block;
}

/* 标签：字号小一档、颜色次级，把视觉重量让给输入区；必填星号固定红色 */
html:not(.op-view) #deFields .field-item .form-label {
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: .02px;
}

/* 指标说明 i 徽标在 PC 保持气泡口径（无 qhint 小字），与标签文字留气口 */
html:not(.op-view) #deFields .tip-mark {
  margin-left: 3px;
  vertical-align: middle;
}

/* 分组标题：发丝通栏 + 计数胶囊，长表单扫读定位（skill：section headings for long forms） */
html:not(.op-view) #deFields .de-group {
  margin-top: 10px !important;
}

html:not(.op-view) .de-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  padding: 0 2px 8px;
  border-bottom: 1px solid #e6ebf3;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

html:not(.op-view) .de-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: #eef4fd;
  color: #1b62e8;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

/* 动作栏：随页面吸底可达（不遮挡内容：卡片流自带间距），玻璃背板轻量 */
html:not(.op-view) #deFooter.card-footer {
  position: sticky;
  bottom: 0;
  z-index: 12;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid #e9edf4;
}

html:not(.op-view) #deSubmitBtn {
  min-width: 104px;
  border-radius: 8px;
  font-weight: 600;
}

html:not(.op-view) #deStatus {
  font-size: 12.5px;
  color: #64748b;
}

/* 输入框：白底细描边，与浅灰字段卡片拉开一档 */
html:not(.op-view) #deFields .form-control,
html:not(.op-view) #deFields .form-select {
  background-color: #fff;
  border-color: #d9e1ec;
  border-radius: 8px;
}

/* 多行文本：限宽保证 65-75 字符可读行长（skill：line-length），窄屏自然铺满 */
html:not(.op-view) #deFields textarea.form-control {
  max-width: 72ch;
  line-height: 1.65;
}

/* ---------------- 菜单图标选择器 ---------------- */
.ic-preview {
  min-width: 42px;
  justify-content: center;
  font-size: 17px;
  color: var(--bs-primary);
  cursor: pointer;
}

.ic-picker {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #fbfcfe;
}

.ic-grid {
  max-height: 210px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 6px;
  padding: 2px;
}

.ic-item {
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #4a4f63;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 5px;
  cursor: pointer;
}

.ic-item:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.ic-item.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

/* 列表里展示已选图标 */
#mmTable .bi {
  font-size: 16px;
  color: var(--bs-primary);
}

/* 列表页分页数据表的表头文字居中（动态数据表由上面的 .dd-table 规则走） */
#fmTable thead th,
#mmTable thead th {
  text-align: center;
}

/* =====================================================================
   顶栏登录用户区：主题蓝底的姓名胶囊，宽度由 layout.js 同步成和下拉菜单一致
   ===================================================================== */
.app-user .dropdown-toggle {
  max-width: 260px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: #e9f0fe;
  border-color: #cfe0fb;
  color: var(--bs-primary);
}

.app-user .dropdown-toggle:hover,
.app-user .dropdown-toggle:focus,
.app-user .dropdown-toggle:active,
.app-user .dropdown-toggle.show {
  background: #d8e7fd;
  border-color: #b9d3fa;
  color: var(--bs-primary);
}

/* 菜单至少和按钮同宽，两边对齐（按钮的 min-width 由 layout.js 按菜单自然宽度写入） */
.app-user .dropdown-menu {
  min-width: 100%;
}

.app-user .dropdown-item .bi {
  margin-right: 6px;
}

/* =====================================================================
   登录页：居中卡片，配色沿用侧边栏深蓝 + 主色蓝
   （app.css 的 body 规则会给所有页面留出侧边栏与顶栏的内边距，登录页要归零）
   ===================================================================== */
body.login-body {
  padding-left: 0;
  padding-top: 0;
  background: #0c1929;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* 登录页背景装饰层：渐变底色 + 浮动光斑 + 网格纹理 */
body.login-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(27, 98, 232, .18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(56, 130, 246, .12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(14, 42, 80, .5) 0%, transparent 70%),
    linear-gradient(160deg, #0c1929 0%, #112240 40%, #0f2d5e 100%);
  z-index: 0;
}

body.login-body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
  pointer-events: none;
}

/* 浮动光斑动画 */
.login-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  animation: orbFloat 12s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

.login-orb--1 {
  width: 320px; height: 320px;
  background: rgba(27, 98, 232, .3);
  top: 15%; left: 8%;
  animation-duration: 14s;
}

.login-orb--2 {
  width: 240px; height: 240px;
  background: rgba(99, 179, 237, .2);
  bottom: 20%; right: 10%;
  animation-duration: 10s;
  animation-delay: -5s;
}

@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -20px) scale(1.08); }
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 40px 36px 32px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 20px;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, .2),
    0 8px 16px rgba(0, 0, 0, .1),
    inset 0 1px 0 rgba(255, 255, 255, .6);
  animation: cardEnter .5s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.2px;
}

/* 登录卡品牌图标 */
.login-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 6px;
}

.login-sub {
  margin: 6px 0 28px;
  font-size: 14px;
  color: #64748b;
  font-weight: 400;
}

/* 登录卡片内表单控件优化：更大的输入框、柔和阴影、聚焦光晕 */
.login-card .form-label {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 5px;
}

.login-card .form-control {
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
  color: #1e293b;
  padding: 0 14px;
  transition: border-color .2s, box-shadow .2s;
}

.login-card .form-control::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.login-card .form-control:focus {
  border-color: #1b62e8;
  box-shadow: 0 0 0 3.5px rgba(27, 98, 232, .1);
  outline: none;
}

.login-card #loginForm .mb-3 {
  margin-bottom: 18px !important;
}

/* 登录按钮：渐变主题蓝 + 按压反馈 */
#loginSubmitBtn {
  height: 44px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  background: linear-gradient(135deg, #1b62e8 0%, #3d7bee 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(27, 98, 232, .3);
  transition: transform .15s, box-shadow .15s, opacity .15s;
  margin-top: 6px;
}

#loginSubmitBtn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(27, 98, 232, .38);
  background: linear-gradient(135deg, #1550cf 0%, #2e6ee0 100%);
}

#loginSubmitBtn:active:not(:disabled) {
  transform: translateY(0) scale(.98);
  box-shadow: 0 2px 8px rgba(27, 98, 232, .25);
}

#loginSubmitBtn:disabled {
  opacity: .65;
  transform: none;
  box-shadow: 0 2px 8px rgba(27, 98, 232, .15);
}

/* prefers-reduced-motion: 关闭浮动动画和入场动效 */
@media (prefers-reduced-motion: reduce) {
  .login-orb { animation: none; }
  .login-card { animation: none; }
  #loginSubmitBtn { transition: none; }
}

/* =====================================================================
   登录落地弹窗（.entry-*）：无后台权限账号选择填报入口，只在登录页使用；
   深蓝渐变头图 + 卡片式入口列表，观感向登录卡与主题蓝 #1b62e8 靠拢
   ===================================================================== */
.entry-modal {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(8, 16, 36, .45);
}

.entry-hd {
  padding: 24px 26px 14px;
  text-align: center;
  background: linear-gradient(180deg, #f2f7ff 0%, #ffffff 100%);
}

.entry-hd-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b62e8, #3d7bee);
  color: #fff;
  font-size: 21px;
  box-shadow: 0 8px 18px rgba(27, 98, 232, .28);
  margin-bottom: 10px;
}

.entry-hd-t {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #141e32;
  letter-spacing: .3px;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 24px 6px;
}

.entry-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  background: #fbfcff;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}

.entry-card:hover,
.entry-card:focus-visible {
  border-color: #8eafe9;
  background: #f2f7ff;
  box-shadow: 0 6px 16px rgba(27, 98, 232, .12);
  transform: translateY(-1px);
  outline: none;
}

.entry-card .entry-ic {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #e6efff;
  color: #1b62e8;
  font-size: 16px;
}

.entry-card .entry-txt {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.entry-card .entry-name {
  font-size: 14px;
  font-weight: 600;
  color: #202b3d;
  overflow-wrap: anywhere;
}

.entry-card .entry-role {
  font-size: 11px;
  color: #1b62e8;
  background: #e6efff;
  border-radius: 20px;
  padding: 1px 9px;
  white-space: nowrap;
}

.entry-card .entry-go {
  flex: 0 0 auto;
  color: #9db3d4;
  font-size: 14px;
  transition: color .15s;
}

.entry-card:hover .entry-go { color: #1b62e8; }

/* 已选中跳转：卡面压成主题蓝反白，其余卡片由 JS 置 disabled 淡化 */
.entry-card.is-go {
  border-color: #1b62e8;
  background: #1b62e8;
  box-shadow: 0 6px 18px rgba(27, 98, 232, .30);
}

.entry-card.is-go .entry-name,
.entry-card.is-go .entry-go { color: #fff; }

.entry-card.is-go .entry-ic { background: rgba(255, 255, 255, .22); color: #fff; }

.entry-card.is-go .entry-role { background: rgba(255, 255, 255, .25); color: #fff; }

.entry-card:disabled { opacity: .45; transform: none; box-shadow: none; cursor: default; }

.entry-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 24px 16px;
  border-top: 1px solid #eef2f8;
  background: #fafcff;
}

.entry-who {
  font-size: 12px;
  color: #7b869b;
  overflow-wrap: anywhere;
}

.entry-logout {
  flex: 0 0 auto;
  color: #4c5e78;
  border: 1px solid #d5deeb;
  background: #fff;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
}

.entry-logout:hover {
  color: #1b62e8;
  border-color: #8eafe9;
  background: #f2f7ff;
}

/* =====================================================================
   树形结构：菜单管理的树表 + 角色权限分配树
   箭头与叶子占位等宽，收起时上下列不跳动；被折叠的后代整行不占位
   ===================================================================== */
.tt-caret,
.tt-blank {
  flex: none;
  display: inline-block;
  width: 16px;
  text-align: center;
}

.tt-blank {
  width: 14px;
}

#mmTable .tt-caret,
#permTree .tt-caret {
  font-size: 13px;
  color: #7b869b;
  cursor: pointer;
}

#mmTable .tt-caret:hover,
#permTree .tt-caret:hover {
  color: var(--bs-primary);
}

/* 收起状态下标出里面还有多少项（权限树里同时标出已勾选数） */
#mmTable .tt-count,
#permTree .tt-count {
  font-size: 11px;
  font-weight: 400;
  color: #7b869b;
  cursor: pointer;
}

#mmTable .tt-count:hover,
#permTree .tt-count:hover {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* 折叠起来的后代行 */
.tt-hidden {
  display: none !important;
}

/* 权限树的行高压到与勾选框齐平，层级靠左内边距表达 */
#permTree .perm-row {
  line-height: 1.9;
}

/* =====================================================================
   整体换肤：把 Bootstrap 组件拉齐到 land 后台设计体系（主题蓝 #1b62e8、
   6px 圆角、浅蓝灰边框、轻阴影），复用 Bootstrap 类的页面无需逐页改动。
   Bootstrap 5.3 的 btn/text/border 系列把颜色写在 CSS 变量里，在这里重定义即可
   ===================================================================== */
:root {
  --bs-primary: #1b62e8;
  --bs-primary-rgb: 27, 98, 232;
  --bs-link-color: #1b62e8;
  --bs-link-color-rgb: 27, 98, 232;
  --bs-link-hover-color: #1550cf;
  --bs-link-hover-color-rgb: 21, 80, 207;
  --bs-success: #13845f;
  --bs-success-rgb: 19, 132, 95;
  --bs-danger: #c83e48;
  --bs-danger-rgb: 200, 62, 72;
  --bs-warning: #b87109;
  --bs-warning-rgb: 184, 113, 9;
  --bs-info: #3a5e95;
  --bs-info-rgb: 58, 94, 149;
  --bs-secondary-color: #6a778b;
  --bs-border-color: #e3e9f1;
  --bs-border-radius: 6px;
  --bs-border-radius-sm: 4px;
  --bs-border-radius-lg: 10px;
  --bs-focus-ring-color: rgba(27, 98, 232, .15);
}

/* ---- 按钮：primary 主题蓝带轻投影；普通按钮统一成 land 的白底浅边、悬停变蓝 ---- */
.btn { font-weight: 400; }

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #1b62e8;
  --bs-btn-border-color: #1b62e8;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #3d7bee;
  --bs-btn-hover-border-color: #3d7bee;
  --bs-btn-focus-shadow-rgb: 27, 98, 232;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #1550cf;
  --bs-btn-active-border-color: #1550cf;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #9cbaf5;
  --bs-btn-disabled-border-color: #9cbaf5;
  box-shadow: 0 3px 8px rgba(27, 98, 232, .12);
}

.btn-success {
  --bs-btn-bg: #13845f;
  --bs-btn-border-color: #13845f;
  --bs-btn-hover-bg: #1a9a70;
  --bs-btn-hover-border-color: #1a9a70;
  --bs-btn-active-bg: #0f6e4f;
  --bs-btn-active-border-color: #0f6e4f;
  --bs-btn-focus-shadow-rgb: 19, 132, 95;
  box-shadow: 0 3px 8px rgba(19, 132, 95, .12);
}

.btn-secondary,
.btn-outline-secondary,
.btn-light {
  --bs-btn-color: #4c5e78;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #d5deeb;
  --bs-btn-hover-color: #1b62e8;
  --bs-btn-hover-bg: #f5f9ff;
  --bs-btn-hover-border-color: #8eafe9;
  --bs-btn-focus-shadow-rgb: 133, 150, 173;
  --bs-btn-active-color: #1b62e8;
  --bs-btn-active-bg: #eaf2ff;
  --bs-btn-active-border-color: #8eafe9;
  --bs-btn-disabled-color: #4c5e78;
  --bs-btn-disabled-bg: #fff;
  --bs-btn-disabled-border-color: #d5deeb;
}

.btn-danger,
.btn-outline-danger {
  --bs-btn-color: #c83e48;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #e9bec3;
  --bs-btn-hover-color: #a02434;
  --bs-btn-hover-bg: #fdecec;
  --bs-btn-hover-border-color: #e0a3aa;
  --bs-btn-focus-shadow-rgb: 200, 62, 72;
  --bs-btn-active-color: #a02434;
  --bs-btn-active-bg: #fbdedd;
  --bs-btn-active-border-color: #e0a3aa;
  --bs-btn-disabled-color: #c83e48;
  --bs-btn-disabled-bg: #fff;
  --bs-btn-disabled-border-color: #e9bec3;
}

/* ---- 表单控件：浅蓝灰描边，占位/禁用态对齐 land ---- */
.form-control,
.form-select { border-color: #d7e0ec; color: #202b3d; }
.form-control::placeholder { color: #a3aebf; opacity: 1; }
.form-control[readonly],
.form-control:disabled,
.form-select:disabled { background: #f5f7fa; color: #657187; }
.form-check-input:checked { background-color: #1b62e8; border-color: #1b62e8; }
.form-check-input:focus-visible { border-color: #1b62e8; box-shadow: 0 0 0 3px rgba(27, 98, 232, .10); }
.input-group-text { background: #f7f9fc; border-color: #d7e0ec; color: #53647e; }

/* ---- 表格：浅灰吸顶表头、细行线、行悬停近白；列间显示竖向分隔线，单元格留白加大更舒展 ---- */
.table {
  --bs-table-color: #2b3a52;
  --bs-table-border-color: #eaf0f6;
  --bs-table-hover-bg: #fbfcff;
  --bs-table-hover-color: #202b3d;
  width: 100%;
}
/* 列边界：除末列外每格右侧画一条竖向分隔线（表头同样生效），与卡片外框配合形成清晰列界 */
.table > :not(caption) > * > *:not(:last-child) {
  border-right: 1px solid #e3e9f1;
}
/* 单元格内边距整体加一档，配合拉宽后的容器让内容更舒展（紧凑变体单独收小） */
.table > :not(caption) > * > * {
  padding: .6rem .8rem;
}
.table.table-sm > :not(caption) > * > * {
  padding: .4rem .55rem;
}
.table-hover { --bs-table-hover-bg: #fbfcff; --bs-table-hover-color: #202b3d; }
.table-striped { --bs-table-striped-bg: #f8fafd; }
.table > thead > tr > th,
thead.table-light > tr > th {
  background: #f7f9fc;
  color: #63738a;
  font-weight: 600;
  white-space: nowrap;
}
.table-light { --bs-table-bg: #f7f9fc; --bs-table-color: #63738a; }

/* ---- 卡片：白底、land 浅边框、极轻投影 ---- */
.card {
  --bs-card-border-color: #e3e9f1;
  --bs-card-cap-bg: #fff;
  box-shadow: 0 3px 12px rgba(29, 54, 86, .03);
}
.card-header { border-bottom-color: #e3e9f1; color: #202b3d; font-weight: 600; }
.card-footer { border-top-color: #e3e9f1; }

/* ---- 弹窗：更大圆角与柔和阴影 ---- */
.modal-content {
  border: 1px solid #e3e9f1;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(16, 28, 48, .16);
}
.modal-header { border-bottom-color: #edf1f7; }
.modal-footer { border-top-color: #edf1f7; }
.modal-title { font-weight: 600; }

/* ---- 列表徽章：land 式浅底深字（toast 提醒保持强底色不受影响） ---- */
.badge { font-weight: 500; padding: .28em .65em; }
.badge.text-bg-primary { background-color: #eaf2ff !important; color: #1d64d9 !important; }
.badge.text-bg-success { background-color: #e9f7ef !important; color: #13845f !important; }
.badge.text-bg-danger { background-color: #fdecec !important; color: #c83e48 !important; }
.badge.text-bg-warning { background-color: #fff4df !important; color: #a66b0b !important; }
.badge.text-bg-info { background-color: #eef4ff !important; color: #3a5e95 !important; }
.badge.text-bg-secondary { background-color: #edf2fa !important; color: #62728b !important; }
.badge.text-bg-light { background-color: #f4f7fb !important; color: #62728b !important; }
.badge.bg-secondary { background-color: #edf2fa !important; color: #62728b !important; }
.badge.bg-info { background-color: #eef4ff !important; color: #3a5e95 !important; }
/* 设计器字段列表的「自动计算」徽标加深，与「计算输出」黄底对称醒目 */
.des-scroll .badge.bg-info { background-color: #0e7490 !important; color: #fff !important; }

/* ---- 分页：样式已抽到 pager.css（antd 简约风，App.renderPager 生成 .ant-pager 标记） ---- */

/* ---- 下拉菜单：圆角面板 + 悬停浅蓝 ---- */
.dropdown-menu { border-color: #e3e9f1; box-shadow: 0 8px 24px rgba(29, 54, 86, .10); padding: 4px; }
.dropdown-item { border-radius: 5px; color: #35445e; }
.dropdown-item:hover, .dropdown-item:focus { background: #eef4ff; color: #1b62e8; }

/* ---- Toast 提醒：圆角加深、投影更柔 ---- */
.toast { border: 0; border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 28, 48, .18); }

/* ---- 全局滚动条：浅蓝灰细条，与各页自定义风格一致 ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #ccd6e4; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #b3c1d4; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- 进度条 ---- */
.progress { --bs-progress-bg: #edf2fa; }
.progress-bar { --bs-progress-bar-bg: #1b62e8; }

/* =====================================================================
   移动端适配（≤767.98px）
   集中在这里用媒体查询覆盖，不改各页面的模板与 JS：页面里写死的控件宽度（内联 style 或 JS .css() 设的）
   需要 !important 才能压过；侧边栏抽屉在上面的 991.98px 断点已经就位，这里只管内容层
   ===================================================================== */
@media (max-width: 767.98px) {
  html {
    -webkit-text-size-adjust: 100%;   /* 横屏时 iOS 不把字号整体放大一档 */
  }

  /* ---------------- 布局外壳 ---------------- */
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-title {
    font-size: 15px;
  }

  /* 窄屏下品牌区收紧一点，仍保持块状两行 */
  .app-brand {
    padding: 12px 14px 13px;
  }

  /* ---------------- 顶栏：标题可截断，表单下拉收窄给操作区留位 ---------------- */
  .app-topbar {
    padding: 0 10px;
    gap: 8px;
  }

  .app-topbar-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
  }

  .app-topbar-right {
    gap: 6px;
  }

  .app-user .dropdown-toggle {
    max-width: 110px;
  }

  .app-sidebar-toggle {
    font-size: 22px;
    padding: 6px 8px;
  }

  /* ---------------- 控件与触控目标 ---------------- */
  /* iOS 聚焦字号小于 16px 的输入框会自动放大整页，这里统一抬到 16px 并把点击域加大 */
  .form-control,
  .form-select,
  .form-control-sm,
  .form-select-sm {
    font-size: 16px;
  }

  .form-control-sm,
  .form-select-sm {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: .15em;
  }

  .btn-sm {
    padding: 8px 12px;
    font-size: 14px;
  }

  /* ---------------- 页面向上工具条：写死宽度的搜索框折成整行 ---------------- */
  .d-flex.flex-wrap.gap-2 > .form-control,
  .d-flex.flex-wrap.gap-2 > .form-select {
    flex: 1 1 100%;
    width: auto !important;
    min-width: 0 !important;
  }

  /* ---------------- 弹窗：贴住屏边，表单列竖排 ---------------- */
  .modal-dialog {
    margin: .5rem auto;
    max-width: calc(100vw - 1rem);
  }

  /* col-6 表单列、col-auto 标签列在手机上都整行堆叠，勾选框组也不会被挤成窄条 */
  .modal .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .modal-footer {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* 显示列弹窗：头部筛选框独占一行 */
  #colModal .modal-header {
    flex-wrap: wrap;
  }

  #colKeyword {
    width: auto !important;
    flex: 1 1 100%;
    margin-left: 0 !important;
  }

  /* ---------------- 数据列表 ---------------- */
  .dd-wrap,
  .table-responsive {
    -webkit-overflow-scrolling: touch;   /*  iOS 横向滑动表格更顺手 */
  }

  .dd-wrap {
    /* 工具条/查询区在窄屏会折成多行，预留高度跟着加大；dvh 避开 iOS 地址栏，vh 是兜底 */
    max-height: calc(100vh - 300px);
    max-height: calc(100dvh - 300px);
  }

  .table {
    font-size: 13px;
  }

  /* 列表页查询区：字段项整行，JS 内联加的 220px 宽度压成自适应 */
  #ddSearch .search-field {
    flex: 1 1 100%;
  }

  #ddSearch .search-field > * {
    width: auto !important;
    min-width: 0 !important;
  }

  /* ---------------- 表单设计器：改为整页纵向流 ---------------- */
  /* 窄屏下属性面板在列表下方，有界滚动 + 吸顶并排那套反而拧，改成页面直接滚 */
  .des-scroll {
    max-height: none;
    overflow: visible;
  }

  .des-scroll .des-group-hd {
    position: static;
    box-shadow: none;
  }

  .des-sticky-top {
    position: static;
  }

  .card-header.d-flex {
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-header .d-flex.gap-2 {
    flex-wrap: wrap;
  }

  #dsKeyword {
    width: auto !important;
    flex: 1 1 140px;
    min-width: 0;
  }

  .des-cat-bar .cat-chip {
    flex-basis: 100%;
  }

  /* 字段行的操作钮挤不下时折到第二行，不挤压名称 */
  .des-item {
    flex-wrap: wrap;
  }

  /* ---------------- 登录页卡片响应式 ---------------- */
  .login-card {
    padding: 28px 20px 24px;
    border-radius: 16px;
    max-width: 100%;
  }

  .login-orb { display: none; }
}

/* ---------------- 表单管理：填报人弹窗 ---------------- */
/* 默认尺寸偏小不好点：账号勾选框与「管理员 / 一线填报」单选整体放大 */
#adminUserList .admin-ck {
  width: 1.3em;
  height: 1.3em;
  margin-top: .05em;
  flex: 0 0 auto;
}

#adminUserList .admin-type .form-check-input {
  width: 1.2em;
  height: 1.2em;
  margin-top: 0;
  cursor: pointer;
}

#adminUserList .admin-type .form-check-inline {
  cursor: pointer;
}

/* ---------------- 我的填报（/myfilling） ---------------- */
/* 顶栏切换按钮：与用户区同高，图标+文案紧凑 */
#topbarSwitchBtn {
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

#topbarSwitchBtn .bi {
  margin-right: 2px;
}

.mf-wrap {
  max-width: 1200px;
}

.mf-hero {
  padding: 26px 28px;
  margin-bottom: 22px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 130% at 100% 0%, rgba(255, 255, 255, .16) 0%, transparent 55%),
    linear-gradient(120deg, #16408f 0%, #1b62e8 62%, #3d7bee 100%);
  box-shadow: 0 10px 26px rgba(22, 64, 143, .22);
}

.mf-hero-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: .3px;
}

.mf-hero-sub {
  margin: 0;
  font-size: 13.5px;
  opacity: .82;
}

/* 表单入口卡片：白底细框，悬停抬升 + 主色描边 */
.mf-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 18px 18px;
  background: #fff;
  border: 1px solid #e6ebf3;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.mf-card:hover {
  transform: translateY(-2px);
  border-color: rgba(27, 98, 232, .35);
  box-shadow: 0 8px 22px rgba(27, 98, 232, .12);
  color: inherit;
}

.mf-card:focus-visible {
  outline: 2px solid #1b62e8;
  outline-offset: 2px;
}

.mf-card-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #e8f0fd;
  color: #2f6fd0;
}

.mf-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.mf-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-card-sub {
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-card-go {
  flex: 0 0 auto;
  font-size: 13px;
  color: #1b62e8;
  font-weight: 500;
}

.mf-empty {
  text-align: center;
  color: #64748b;
  padding: 56px 20px;
  background: #fff;
  border: 1px dashed #d7dfea;
  border-radius: 14px;
}

.mf-empty .bi {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  color: #b6c3d6;
}

/* 内嵌渲染区：点击菜单后在本页内用 iframe 承载目标页，不整页跳转 */
.mf-embed-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mf-embed-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-embed-frame {
  display: block;
  width: 100%;
  /* 顶栏 56 + 上下留白 + 工具条约 46，填满可视区，避免双层滚动 */
  height: calc(100vh - var(--tb-h) - 92px);
  min-height: 420px;
  background: #fff;
  border: 1px solid #e6ebf3;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

/* 内嵌展开态（myfilling.js 在 #mfWrap 上切 mf-full）：解除 1200 限宽与左右 gutter，
   iframe 通栏铺满侧边栏右侧到视口右缘，去掉两侧圆角/描边让它贴齐两边 */
.mf-wrap.mf-full {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px;
  padding-bottom: 0;
}

/* 内嵌区整体占满“视口高 - 顶栏 - 容器上边距”，工具条自然高，iframe flex 撑满剩余高度贴到视口底部 */
.mf-wrap.mf-full #mfEmbed {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--tb-h) - 10px);
}

.mf-wrap.mf-full .mf-embed-frame {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  box-shadow: none;
}

/* 工具条保留一点左右呼吸位，不至于按钮紧贴屏幕边缘 */
.mf-wrap.mf-full .mf-embed-bar {
  padding: 0 14px;
}

@media (prefers-reduced-motion: reduce) {
  .mf-card {
    transition: none;
  }

  .mf-card:hover {
    transform: none;
  }
}


