/* 复刻版样式：配色沿用原站 H+ 主题（主色 #1ab394，背景 #f3f3f4） */
* { box-sizing: border-box; }
body {
  margin: 0; font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px; color: #676a6c; background: #f3f3f4;
}
a { color: #1ab394; text-decoration: none; }
a:hover { color: #17987f; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2f4050 0%, #1ab394 140%);
}
.login-box {
  width: 380px; background: #fff; border-radius: 4px; padding: 34px 34px 26px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.login-box h1 { font-size: 19px; margin: 0 0 4px; color: #2f4050; font-weight: 600; }
.login-box h1 img { max-width: 240px; display: block; }
.login-box .sub { color: #a0a5ab; font-size: 12px; margin-bottom: 24px; }
.login-box .form-group { margin-bottom: 16px; }
.login-box input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid #e5e6e7;
  border-radius: 3px; font-size: 13px; outline: none;
}
.login-box input:focus { border-color: #1ab394; }
.btn-login {
  width: 100%; height: 42px; border: 0; border-radius: 3px; background: #1ab394;
  color: #fff; font-size: 14px; cursor: pointer; letter-spacing: 2px;
}
.btn-login:hover { background: #18a689; }
.login-err { color: #ed5565; font-size: 12px; min-height: 18px; }

/* ---------- 框架 ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: 200px; background: #2f4050; color: #a7b1c2; flex: 0 0 200px;
  display: flex; flex-direction: column;
}
.side .brand {
  height: 54px; background: #fff;
  display: flex; align-items: center; padding: 0 10px 0 12px;
}
.side .brand img { max-height: 40px; max-width: 100%; display: block; }
.side nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.side .mgrp { margin-bottom: 2px; }
.side .grp {
  padding: 11px 20px 11px 18px; font-size: 15px; font-weight: 600; color: #cfd8de; letter-spacing: 1px;
  cursor: pointer; user-select: none;
  transition: color .15s, background .15s;
}
.side .grp:hover { color: #fff; background: #3a5065; }
.side .mgrp.open .grp { color: #fff; background: rgba(26,179,148,.22); box-shadow: inset 3px 0 0 #1ab394; }
/* P79 菜单小图标 */
.side .grp .gico { display: inline-block; width: 22px; margin-right: 4px; font-size: 14px; text-align: center; }
.side .item .iico { display: inline-block; width: 20px; margin-right: 3px; font-size: 12px; text-align: center; }
.side .gitems { display: none; }
.side .mgrp.open .gitems { display: block; }
.side .item {
  display: block; padding: 9px 20px 9px 28px; color: #a7b1c2; font-size: 14px;
  border-left: 3px solid transparent;
}
.side .item:hover { background: #3a5065; color: #fff; }
.side .item.active {
  background: rgba(26,179,148,.32); color: #fff; font-weight: 600;
  border-left-color: #1ab394;
}
.side .item.pending { color: #5c6b7d; cursor: not-allowed; }
.side .item.pending:hover { background: transparent; color: #5c6b7d; }
.side .item .tag { font-size: 10px; background: #3b5163; padding: 1px 5px; border-radius: 2px; margin-left: 6px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 54px; background: #fff; border-bottom: 1px solid #e7eaec;
  display: flex; align-items: stretch; justify-content: space-between; padding: 0 18px;
}
.topbar .user { display: flex; align-items: center; gap: 12px; color: #676a6c; }

/* P80 浏览器式多开标签页 */
.topbar .tabs { display: flex; align-items: stretch; overflow-x: auto; overflow-y: hidden; min-width: 0; scrollbar-width: thin; }
.topbar .tabs .tab {
  display: flex; align-items: center; gap: 6px; padding: 0 14px; font-size: 13px; color: #676a6c;
  cursor: pointer; white-space: nowrap; border-right: 1px solid #eef1f3; user-select: none;
  transition: color .15s, background .15s;
}
.topbar .tabs .tab:hover { color: #2f4050; background: #f7f9fa; }
.topbar .tabs .tab.on { color: #fff; font-weight: 600; background: #2f4050; box-shadow: inset 0 -2px 0 #1ab394; }
.topbar .tabs .tab.on .tclose { color: #a7b3c1; }
.topbar .tabs .tab .tclose { color: #b7bfc6; font-size: 11px; padding: 1px 4px; border-radius: 2px; visibility: visible; }
.topbar .tabs .tab:hover .tclose { visibility: visible; }
.topbar .tabs .tab .tclose:hover { color: #ed5565; background: #ffeceb; }

.frames { flex: 1; position: relative; min-height: 0; }
.frames .frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #f3f3f4; }
.frames .empty-tip {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #b7bfc6; font-size: 15px; letter-spacing: 1px;
}

/* ---------- 通用面板 ---------- */
.panel { background: #fff; border: 1px solid #e7eaec; border-radius: 3px; margin-bottom: 12px; }
.panel-hd {
  padding: 12px 15px; border-bottom: 1px solid #e7eaec; font-size: 14px;
  color: #2f4050; font-weight: 600;
}
.panel-bd { padding: 12px 15px; }

.btn {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px;
  border: 1px solid #e5e6e7; background: #fff; color: #676a6c; border-radius: 3px;
  font-size: 12px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #d1dadc; background: #f7f9fa; }
.btn-primary { background: #1ab394; border-color: #1ab394; color: #fff; }
.btn-primary:hover { background: #18a689; border-color: #18a689; color: #fff; }
.btn-danger { background: #ed5565; border-color: #ed5565; color: #fff; }
.btn-danger:hover { background: #dd4b59; border-color: #dd4b59; color: #fff; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

input.txt, select.txt {
  height: 30px; padding: 0 8px; border: 1px solid #e5e6e7; border-radius: 3px;
  font-size: 12px; color: #555; outline: none; background: #fff;
}
input.txt:focus, select.txt:focus { border-color: #1ab394; }

/* ---------- 产品页布局 ---------- */
.two-col { display: flex; gap: 12px; align-items: flex-start; padding: 12px; }
.col-cate { width: 260px; flex: 0 0 260px; }
.col-list { flex: 1; min-width: 0; }

.tree { max-height: calc(100vh - 190px); overflow: auto; padding: 4px 0; }
.tree .node {
  display: flex; align-items: center; padding: 5px 8px 5px 6px; cursor: pointer;
  border-radius: 3px; font-size: 13px;
}
.tree .node:hover { background: #f2f6f7; }
.tree .node.active { background: #e8f6f3; color: #0f8f78; font-weight: 600; }
.tree .node .caret { width: 14px; text-align: center; color: #b7bfc6; font-size: 10px; }
.tree .node .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree .node .cnt { color: #b7bfc6; font-size: 11px; margin-left: 4px; }
.tree .children { margin-left: 14px; }
.tree .ops { color: #b7bfc6; font-size: 11px; }
.tree .ops a { cursor: pointer; padding: 0 2px; text-decoration: none; }
.tree .node:hover .ops { color: #1ab394; }

/* ---------- 表格 ---------- */
table.grid { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; }
/* P137 宽表格溢出修复：27 列表格最小宽度超出白 panel 时，溢出段会透出 body 灰底 #f3f3f4；
   滚动区内的 panel 撑到内容宽（窄内容仍至少铺满一行），保证表格始终落在白色底上 */
/* P138：滚动容器直接上白底，盖住 body 灰底（原 panel width:max-content 与表格
   width:100% 构成循环百分比，table-layout:fixed 时被 Blink 解析成 1e6px 宽，废弃） */
.p133-scroll { background: #fff; }
table.grid th {
  background: #f5f7fa; color: #5b6672; font-weight: 600; text-align: left;
  padding: 9px 10px; border-bottom: 1px solid #e7eaec; white-space: nowrap;
}
table.grid td { padding: 8px 10px; border-bottom: 1px solid #f0f2f4; color: #676a6c; }
/* P177 状态行色：行上有明确状态色（tr 行内 style）时，单元格不套默认灰，继承行色 */
table.grid tbody tr.rc-st > td { color: inherit; }
table.grid tbody tr.rc-st:hover > td { color: inherit; }
table.grid tbody tr:hover { background: #fafcfc; }
table.grid .ops-cell a { margin-right: 8px; cursor: pointer; }
/* P168 全站操作列收纳：单元格只显示「更多」，悬停弹竖排面板 */
.ops-more-btn {
  background: none; border: none; padding: 2px 6px;
  color: #1a5fc8; font-size: 13px; cursor: pointer;
  border-bottom: 1px dashed #9db8d9;
}
.ops-more-btn:hover { color: #ed5565; border-bottom-color: #ed5565; }
#gOpsPop {
  display: none; position: fixed; z-index: 99980;
  background: #fff; border: 1px solid #e3e8ee; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16); padding: 6px 0;
  min-width: 76px; font-size: 13px;
}
#gOpsPop a { display: block; padding: 6px 16px; cursor: pointer; white-space: nowrap; color: #2f4050; }
#gOpsPop a:hover { background: #f2f7fd; color: #1a5fc8; }
table.grid .num { text-align: right; font-family: Consolas, monospace; }
/* ---------- P110 列宽拖拽 ---------- */
table.grid th { position: relative; }
table.grid th .col-grip {
  position: absolute; top: 0; right: 0; width: 8px; height: 100%;
  cursor: col-resize; user-select: none; z-index: 5;
}
/* P134 拖拽把手可视化：常驻浅灰细线（同输入框边框色系），悬停显示 <|> 左右箭头符号
   P138 修正：把手整体收在自己列内（原 right:-3px 会被相邻 sticky 表头盖住，热区减半） */
table.grid th .col-grip::after {
  content: ''; position: absolute; top: 4px; bottom: 4px; right: 0;
  width: 2px; background: #d9dee3; border-radius: 1px;
}
/* 悬停：中央短竖线 + 左右两个三角箭头组成 <|>，不再变长变粗；
   悬停列 z-index 提到相邻列之上，否则右箭头伸进下一列区域会被其背景盖住 */
table.grid th:has(.col-grip:hover) { z-index: 12; }
table.grid th .col-grip:hover { background: linear-gradient(#1ab394,#1ab394) center/2px 16px no-repeat; }
table.grid th .col-grip:hover::before,
table.grid th .col-grip:hover::after {
  content: ''; position: absolute; top: 50%; margin-top: -4px;
  border: 4px solid transparent; width: 0; height: 0; background: none;
}
table.grid th .col-grip:hover::before { left: -7px; border-left: 0; border-right: 5px solid #1ab394; }
table.grid th .col-grip:hover::after { right: -7px; border-right: 0; border-left: 5px solid #1ab394; }
body.col-resizing { cursor: col-resize !important; user-select: none !important; }
/* ---------- P112 列配置弹窗 ---------- */
.colcfg-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-bottom: 1px solid #f0f2f4;
  font-size: 13px; color: #2f4050; background: #fff; cursor: default;
}
.colcfg-item[draggable="true"] { cursor: grab; }
.colcfg-item.dragging { opacity: .4; }
.colcfg-item.locked { color: #b7bfc6; background: #fafbfc; }
.colcfg-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.colcfg-item .hd { color: #b7bfc6; font-size: 16px; cursor: grab; padding: 0 4px; }
.colcfg-item .hd:hover { color: #1ab394; }
/* P166b 冻结位置标记项：蓝色高亮，醒目区别于普通列 */
.colcfg-item.fz-item { background: #eef6ff; color: #1a5fc8; border-bottom: 1px solid #d6e4ff; border-top: 1px solid #d6e4ff; }
.colcfg-item.fz-item .fz-ico { font-size: 13px; }
.colcfg-item.fz-item .hd { color: #7fa8d9; }
.colcfg-item.fz-item .hd:hover { color: #1a5fc8; }
/* 列配置弹窗：限高防小屏溢出视口，底部按钮始终可见可点 */
#colcfgMask .dialog { display: flex; flex-direction: column; max-height: calc(100vh - 12vh); }
#colcfgMask .dialog-bd { flex: 1 1 auto; min-height: 0; max-height: none; }
.empty { padding: 40px; text-align: center; color: #b7bfc6; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar .spacer { flex: 1; }

/* P120 快捷日期筛选按钮组 */
.quick-range { display: inline-flex; }
.quick-range button {
  height: 30px; padding: 0 10px; font-size: 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid #e5e6e7; background: #fff; color: #676a6c;
}
.quick-range button:first-child { border-radius: 3px 0 0 3px; }
.quick-range button:last-child { border-radius: 0 3px 3px 0; }
.quick-range button + button { border-left: none; }
.quick-range button:hover { background: #f7f9fa; }
.quick-range button.active { background: #1ab394; border-color: #1ab394; color: #fff; }
.quick-range button.active + button { border-left: 1px solid #1ab394; }

/* P121-2 combo 自定义下拉（可下拉选 + 手输新增） */
.combo-wrap { position: relative; display: inline-block; width: 100%; box-sizing: border-box; }
.combo-wrap input { width: 100%; box-sizing: border-box; }
.combo-list {
  position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 40;
  background: #fff; border: 1px solid #e5e6e7; border-radius: 3px;
  max-height: 260px; overflow: auto; display: none; box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.combo-list.open { display: block; }
.combo-list .opt { padding: 7px 12px; font-size: 12px; color: #555; cursor: pointer; }
.combo-list .opt:hover { background: #e8f6f3; }
.combo-list .opt.add { color: #1ab394; font-weight: 600; }

/* P122 勾选组（工人匹配工序等） */
.chk-group { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 0; }
.chk-item { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #555; cursor: pointer; white-space: nowrap; }
.chk-item input { accent-color: #1ab394; }

/* P122-2 多选下拉（匹配工序等） */
.msel-wrap { position: relative; width: 100%; box-sizing: border-box; }
.msel-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 34px;
  width: 100%; box-sizing: border-box; padding: 4px 28px 4px 8px;
  border: 1px solid #d9dee3; border-radius: 4px; background: #fff; cursor: pointer;
}
.msel-box:focus { outline: none; border-color: #1ab394; }
.msel-ph { color: #b7bfc6; font-size: 12px; }
.msel-arrow { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: #9aa4ae; font-size: 11px; pointer-events: none; }
.msel-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px;
  background: #e8f6f3; color: #1ab394; border-radius: 3px; font-size: 12px;
}
.msel-x { font-style: normal; color: #7fcdbb; cursor: pointer; font-size: 11px; line-height: 1; }
.msel-x:hover { color: #1ab394; }
.msel-list {
  display: none; position: absolute; z-index: 30; top: calc(100% + 3px); left: 0;
  width: 100%; max-height: 240px; overflow: auto; box-sizing: border-box;
  background: #fff; border: 1px solid #d9dee3; border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,.10); padding: 4px 0;
}
.msel-wrap.open .msel-list { display: block; }
/* .msel-wrap 前缀提升优先级，压过全局 .form-item label（display:block + margin） */
.msel-wrap .msel-opt {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; margin: 0;
  font-size: 13px; color: #444; cursor: pointer; white-space: nowrap;
}
.msel-wrap .msel-opt:hover { background: #e8f6f3; }
.msel-wrap .msel-opt input { accent-color: #1ab394; margin: 0; width: auto !important; height: auto; }
.msel-empty { padding: 10px 12px; font-size: 12px; color: #b7bfc6; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 10px 15px; color: #8b939b; font-size: 12px; }

.badge { display: inline-block; padding: 1px 6px; border-radius: 2px; font-size: 11px; }
.badge-on { background: #e8f6f3; color: #1ab394; }
.badge-off { background: #f2f3f5; color: #9aa4ae; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); display: none;
  align-items: flex-start; justify-content: center; z-index: 900; padding-top: 6vh; overflow: auto;
}
.mask.show { display: flex; }
.dialog { background: #fff; border-radius: 4px; width: 720px; max-width: 94vw; box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.dialog-hd { padding: 14px 18px; border-bottom: 1px solid #e7eaec; font-size: 14px; font-weight: 600; color: #2f4050; display: flex; justify-content: space-between; }
.dialog-hd .x { cursor: pointer; color: #b7bfc6; }
.dialog-bd { padding: 16px 18px; max-height: 66vh; overflow: auto; }
.dialog-ft { padding: 12px 18px; border-top: 1px solid #e7eaec; text-align: right; display: flex; gap: 8px; justify-content: flex-end; }
.form-row { display: flex; gap: 14px; margin-bottom: 12px; }
.form-item { flex: 1; min-width: 0; }
.form-item label { display: block; font-size: 12px; color: #8b939b; margin-bottom: 5px; }
.form-item label .req { color: #ed5565; margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; height: 32px; padding: 0 8px; border: 1px solid #e5e6e7; border-radius: 3px;
  font-size: 13px; color: #555; outline: none;
}
.form-item textarea { height: 60px; padding: 6px 8px; resize: vertical; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: #1ab394; }

/* ---------- P135 弹窗表单表格化（新建/编辑销售订单）----------
   订单基本信息从「label 在上 + 控件在下」改为和订单明细同款表格：
   上面表头=字段名（th 可拖拽调列宽，宽度按表格 id 记忆），下面一行=填写控件 */
table.grid.form-grid { margin-bottom: 12px; }
table.grid.form-grid thead th { border-bottom: 1px solid #e7eaec; }
table.grid.form-grid td { padding: 8px 10px; vertical-align: middle; background: #fff; }
table.grid.form-grid td > input, table.grid.form-grid td > select {
  width: 100%; height: 32px; padding: 0 8px; border: 1px solid #e5e6e7; border-radius: 3px;
  font-size: 13px; color: #555; outline: none; box-sizing: border-box;
}
table.grid.form-grid td > input:focus, table.grid.form-grid td > select:focus { border-color: #1ab394; }
table.grid.form-grid .cell-flex { display: flex; gap: 6px; align-items: center; min-width: 0; }
table.grid.form-grid .cell-flex .btn { white-space: nowrap; flex: none; }
table.grid.form-grid th .req { color: #ed5565; margin-left: 2px; }

.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: #2f4050; color: #fff; padding: 9px 18px; border-radius: 3px;
  font-size: 13px; z-index: 2000; opacity: 0; transition: opacity .2s, top .2s;
}
.toast.show { opacity: 1; top: 26px; }
.toast.err { background: #ed5565; }

/* P126 订单状态快捷按钮排（销售下单，样式仿原站） */
.status-tabs { display: inline-flex; }
.status-tabs button {
  height: 30px; padding: 0 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid #e5e6e7; background: #fff; color: #676a6c;
}
.status-tabs button:first-child { border-radius: 3px 0 0 3px; }
.status-tabs button:last-child { border-radius: 0 3px 3px 0; }
.status-tabs button + button { border-left: none; }
.status-tabs button:hover { background: #f7f9fa; }
.status-tabs button.active { background: #1a7af8; border-color: #1a7af8; color: #fff; }
.status-tabs button.active + button { border-left: 1px solid #1a7af8; }

/* P127 分类配置弹窗（销售下单） */
.cat-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f1f6ff; border: 1px solid #c9dcf7; color: #1a5fc8;
  border-radius: 14px; padding: 4px 8px 4px 12px; font-size: 13px;
}
.cat-item .cat-del { color: #ed5565; cursor: pointer; font-size: 12px; padding: 0 3px; }
.cat-item .cat-del:hover { color: #c0392b; }

/* ---------- P133 列表页吸顶布局 + 行内容固定高度截断 ---------- */
/* 改造后：body 变纵向 flex；表格前的兄弟（筛选区等）固定在顶部，
   主表格 panel 及其后内容（分页等）移入 .p133-scroll 内部滚动 */
body.p133-body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.p133-body > .p133-fixed { flex: 0 0 auto; }
.p133-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
/* 表头吸顶（特异性高于 P110 的 table.grid th{position:relative}，col-grip 不受影响） */
.p133-scroll table.grid thead th { position: sticky; top: 0; z-index: 10; }
/* ---------- P136 冻结前两列（勾选框列 + 第一数据列），横向滚动时恒定在左 ---------- */
table.grid th.frz, table.grid td.frz { position: sticky; }
table.grid td.frz { z-index: 3; }   /* 背景交给行斑马纹规则（奇白偶灰，均为不透明色，盖得住滚过的内容） */
table.grid th.frz-e, table.grid td.frz-e { box-shadow: inset -1px 0 0 #d9dee3; }
.p133-scroll table.grid thead th.frz { z-index: 11; }   /* 高于吸顶表头(10)：角上表头同时上下+左右固定 */
/* ---------- P138 行斑马纹：奇数行(1,3,5…)白、偶数行(2,4,6…)浅灰；悬停整行高亮 ---------- */
table.grid tbody tr:nth-child(odd) > td { background: #fff; }
table.grid tbody tr:nth-child(even) > td { background: #f7f9fa; }
table.grid tbody tr:hover > td { background: #eef7f4; }
/* P240 定金未结尾款整行黄底：斑马纹给每个 td 刷了不透明底色，行(tr)本身的背景会被盖住，
   所以高亮行要用类把 td 一起刷黄；悬停稍深一档区分 */
table.grid tbody tr.rc-dep > td { background: #fff3bf; }
table.grid tbody tr.rc-dep:hover > td { background: #ffeda3; }
/* P142 首屏即按最终态单行渲染：common.js 套 .td-clamp / 应用记忆列宽之前，
   长文本若按默认换行会把行先撑得很高，JS 生效后又缩回正常 —— 表现为第一次点菜单时行高闪一下。
   这里直接让列表数据格首屏就不换行，与 td-clamp 最终态一致，消除闪烁 */
.p133-scroll table.grid tbody td { white-space: nowrap; }
/* P198t 全站数据列表单行制：内容展示不下不换行，列内截断（能展示多少展示多少）；
   弹窗里的表格（form-grid 订单表单 / 明细编辑等）不参与，保持可输入可换行 */
table.grid:not(.form-grid) tbody td { white-space: nowrap; }
/* 弹窗表单表格（P135 订单信息）不参与斑马，保持全白 */
table.grid.form-grid tbody td, table.grid.form-grid tbody tr:hover > td { background: #fff; }
.p133-scroll table.grid tbody td { vertical-align: top; }
/* 操作列不参与压缩：文本列 word-break 后最小宽度极窄，auto 布局会把操作列挤到几十像素，
   链接竖着折十来行把整行撑高（P133 实测 208px）；min-width 保住列宽，链接 2~3 行内排布 */
.p133-scroll table.grid td.ops-cell { min-width: 130px; }
/* 数据单元格内的图片降为缩略图，不把行撑高（点开弹窗仍看原图） */
.p133-scroll table.grid tbody td img { max-height: 44px; max-width: 90px; object-fit: cover; border-radius: 2px; cursor: zoom-in; }
/* 数据单元格文本不换行：列窄时直接截断展示（无省略号），拉宽自然一行放开（由 common.js 自动包裹） */
.td-clamp {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: clip;
}
/* ---------- P144 弹窗宽高可自由调整并记忆 ----------
   右下角拖拽调宽高；上限 1400×900（超出视口时再按视口收）；
   下限由 common.js 按各弹窗系统默认尺寸动态写入 min-width/min-height */
.dialog.dlg-rz {
  resize: both; overflow: hidden;
  display: flex; flex-direction: column;
  max-width: min(1400px, 96vw);
  max-height: min(900px, 94vh);
}
.dialog.dlg-rz .dialog-bd { flex: 1 1 auto; min-height: 0; max-height: none; }
.dialog.dlg-rz .dialog-hd, .dialog.dlg-rz .dialog-ft { flex: none; }
/* 右下角拖拽手柄视觉提示 */
.dialog.dlg-rz::-webkit-resizer { background: linear-gradient(135deg, transparent 0 50%, #d9dee3 50% 62%, transparent 62% 74%, #d9dee3 74% 86%, transparent 86%); }

/* ---------- P178/P180 侧边栏两态：左侧(默认) / 置顶横向；折叠与宽度拖拽已取消 ----------
   布局切换按钮 #btnTop 固定在页签行（topbar）账号名前：侧栏态=「⇈ 顶栏」，置顶态=「≡ 侧栏」 */
.topbar .user button {
  height: 26px; padding: 0 10px; border: 1px solid #d9dee3; border-radius: 4px; background: #fff; color: #5b6672;
  cursor: pointer; font-size: 12px; line-height: 1; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.topbar .user button:hover { color: #1ab394; border-color: #1ab394; }
/* 置顶态：侧栏隐藏，#topnav 变首行（LOGO + 一级菜单横排），topbar(页签行)自动排到第二行
   P181：首行加高到 58px + 底部绿色分隔线，LOGO 与页签行彻底拉开，
   避免深色激活页签与深色导航贴在一起、视觉上像盖住了 LOGO */
.app.topmode { flex-direction: column; }
.app.topmode .side { display: none; }
#topnav { display: none; align-items: center; height: 58px; background: #2f4050; padding: 0 12px; gap: 2px; overflow: visible; position: relative; z-index: 30; border-bottom: 2px solid #1ab394; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.app.topmode #topnav { display: flex; }
#topnav .tlogo { height: 38px; margin-right: 16px; display: block; }
#topnav .tg { position: relative; }
#topnav .tg-name {
  display: flex; align-items: center; gap: 5px; height: 58px; padding: 0 15px;
  color: #cfd8de; font-size: 14px; font-weight: 600; letter-spacing: 1px; cursor: pointer; user-select: none; white-space: nowrap;
  transition: color .15s, background .15s;
}
#topnav .tg:hover .tg-name, #topnav .tg.on .tg-name { color: #fff; background: rgba(26,179,148,.22); box-shadow: inset 0 -2px 0 #1ab394; }
#topnav .tg-drop {
  display: none; position: absolute; top: 58px; left: 0; min-width: 176px; z-index: 80;
  background: #fff; border: 1px solid #e7eaec; border-radius: 0 0 4px 4px; box-shadow: 0 8px 24px rgba(0,0,0,.16); padding: 4px 0;
}
#topnav .tg:hover .tg-drop { display: block; }
#topnav .tg-drop a { display: block; padding: 9px 16px; color: #495057; font-size: 13px; white-space: nowrap; }
#topnav .tg-drop a:hover { background: #f2f9f7; color: #1ab394; }
#topnav .tg-drop a.active { color: #1ab394; font-weight: 600; }
#topnav .tg-drop a.pending { color: #5c6b7d; cursor: not-allowed; }
#topnav .tg-drop a.pending:hover { background: transparent; color: #5c6b7d; }
#topnav .tg-drop a .tag { font-size: 10px; background: #eef1f3; color: #8b939b; padding: 1px 5px; border-radius: 2px; margin-left: 6px; }
/* 置顶态：页签行收窄一点，更贴近「首行菜单 + 次行页签」的层次 */
.app.topmode .topbar { height: 42px; }
