/* 网页版后台 —— PC 桌面风格（2026-11-19 全面改版）
   骨架：固定侧边栏 + 固定顶栏 + 内容区独立滚动；蓝灰灰阶一套到底 */
* { box-sizing: border-box; margin: 0; padding: 0; }
/* 强制浅色：禁掉浏览器在系统深色模式下的「自动深色」，否则颜色会被翻得没法看 */
:root {
  color-scheme: only light;
  --brand: #2E6BE6;  --brand-bg: #EFF4FF;
  --bg: #F0F2F5;
  --card: #FFFFFF;
  --line: #E3E6EC;       /* 统一描边灰（原米白 #E5E2DA 已废） */
  --subtle: #F7F8FA;     /* 统一浅灰底 */
  --text: #1F1F1F;
  --text2: #666666;
  --text3: #999999;
  --danger: #C62828;
}
html { background: #F0F2F5; color: #1F1F1F; color-scheme: only light; }
/* 字体栈：优先现代黑体（有则用），逐级降级到系统默认；参考唯品会的干净品质感 */
body { background: var(--bg); color: var(--text); font: 14px/1.6 "MiSans", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.p-price, .tbl td, .p-name { font-variant-numeric: tabular-nums; }
.sn-logo, .tb-title, .sec-title { letter-spacing: .02em; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--text); background: #FFFFFF; border-color: var(--line); }

/* 细灰滚动条（PC 质感细节） */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #C9CFD8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #AEB6C2; }
::-webkit-scrollbar-track { background: transparent; }

/* 通用 */
.sec { background: #fff; border: 1px solid var(--line); border-radius: 6px; margin: 0 0 16px; padding: 16px 20px; box-shadow: 0 1px 2px rgba(15,30,55,.04); }
.sec-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sec-title { font-size: 16px; font-weight: 600; }
.sec-more { font-size: 12px; color: var(--text3); }
/* 分区标题行：标题 + 徽标 + 右侧说明（替代「标题（最近 20 条）」括号堆叠） */
.sec-head2 { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; }
.sec-head2 .sec-title { font-size: 15px; }
.sec-head2:first-child { margin-top: 4px; }

/* 门店管理双标签（定制门店 / 改衣店） */
.shop-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 14px; }
.shop-tab {
  position: relative; padding: 10px 18px 11px; border: 0; background: transparent;
  color: var(--text2); font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.shop-tab:hover { color: var(--brand); }
.shop-tab.on { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }
.shop-dot {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px; padding: 0 5px; margin-left: 6px;
  background: var(--danger); color: #fff; font-size: 11px; border-radius: 9px; text-align: center; vertical-align: 1px;
}
.d-img-box { display: flex; flex-direction: column; gap: 4px; }
.hint { font-size: 12px; color: var(--text3); margin-top: 6px; }
.hint-warn { color: #8A6D3B; background: #F5EFDF; border-radius: 4px; padding: 6px 10px; }
.row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.col { display: flex; flex-direction: column; align-items: stretch; }
.grow { flex: 1; min-width: 0; }
.label { width: 140px; flex-shrink: 0; color: var(--text2); font-size: 13px; }
.chips-row .label { width: 44px; }
.chips-row { gap: 10px; margin-bottom: 8px; }

input[type=text], input[type=number], input[type=password], textarea, select {
  flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 4px; background: #fff; outline: none;
}
textarea { height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(46,107,230,.12); }

.btn {
  height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 3px;
  background: #fff; color: var(--text2); white-space: nowrap; transition: border-color .12s, color .12s, background .12s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-primary:hover { color: #fff; background: #2759C4; opacity: 1; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: #fff; }
.btn-danger:hover { background: #FFF5F5; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 3px; }
.btn-ghost { background: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--text2); font-size: 13px; }
.chip.on { border-color: var(--brand); color: var(--brand); background: var(--brand-bg); font-weight: 600; }

.tag { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 3px; background: var(--subtle); color: var(--text2); }
.tag-ok { background: #E8F5E9; color: #2E7D32; }
.tag-no { background: #FFEBEE; color: var(--danger); }
.tag-blue { background: var(--brand-bg); color: var(--brand); }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 360px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 36px 32px; box-shadow: 0 6px 24px rgba(15,30,55,.08); }
.login-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.login-sub { text-align: center; color: var(--text3); font-size: 12px; margin-bottom: 24px; }
.login-card .row { flex-direction: column; align-items: stretch; gap: 6px; }
.login-card .label { width: auto; }
.login-card input { width: 100%; height: 42px; }
.login-card .btn-primary { width: 100%; height: 42px; margin-top: 12px; }

/* 商品列表 */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.p-card { border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.p-img { width: 100%; height: 150px; object-fit: cover; background: #EEF1F5; display: block; }
.p-img-none { height: 150px; display: flex; align-items: center; justify-content: center; color: var(--text3); background: #EEF1F5; }
/* 表格内小缩略图（覆盖上面的卡片尺寸） */
.tbl .p-img, .tbl .p-img-none { width: 44px; height: 56px; font-size: 12px; border-radius: 3px; flex-shrink: 0; }
.p-body { padding: 10px 12px; flex: 1; }
.p-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--text3); }
.p-price { color: var(--danger); font-weight: 700; font-size: 15px; }
.p-acts { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }

/* 图片九宫格 */
.imgs { display: flex; flex-wrap: wrap; gap: 10px; }
.img-tile { position: relative; width: 92px; height: 92px; border-radius: 6px; overflow: hidden; }
.img-tile img { width: 92px; height: 92px; object-fit: cover; display: block; background: #EEF1F5; }
.img-tile .colorblk { width: 92px; height: 92px; }
.img-tile.drag-over { outline: 2px dashed var(--brand); }
.img-first { position: absolute; left: 0; bottom: 0; right: 0; background: rgba(46,107,230,.85); color: #fff; font-size: 11px; text-align: center; padding: 2px 0; }
.img-x {
  position: absolute; right: 2px; top: 2px; width: 20px; height: 20px; line-height: 18px;
  text-align: center; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; cursor: pointer;
}
.img-add {
  width: 92px; height: 92px; border: 1px dashed #C9CFD8; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 26px; cursor: pointer;
}
.img-add:hover { border-color: var(--brand); color: var(--brand); }
.img-tag { position: absolute; left: 0; top: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 11px; padding: 1px 6px; }

/* 子卡片（面料 / 结构工艺分组） */
.sub-card { border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px 6px; margin-bottom: 14px; }
.sub-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sub-t { font-weight: 600; }
.sub-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.thumb { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; background: #EEF1F5; border: 1px solid var(--line); flex-shrink: 0; cursor: pointer; }
.thumb-none { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text3); cursor: default; }

/* SKU 表 */
table.sku { width: 100%; border-collapse: collapse; margin-top: 10px; }
table.sku th, table.sku td { border-bottom: 1px solid var(--line); padding: 7px 10px; font-size: 13px; text-align: left; }
table.sku th { background: var(--subtle); color: var(--text3); font-weight: 500; }
table.sku td input { height: 30px; width: 100%; }

/* 工艺展示行 */
.craft-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.craft-item:last-child { border-bottom: none; }
.craft-part { font-size: 12px; color: var(--text3); background: var(--subtle); border-radius: 4px; padding: 2px 8px; flex-shrink: 0; }
.craft-name { max-width: 300px; }
.craft-thumb { width: 56px; height: 56px; }

/* 弹层（居中弹窗：默认形态） */
.mask {
  position: fixed; inset: 0; background: rgba(15,30,55,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.panel { background: #fff; border-radius: 6px; width: 720px; max-width: 96vw; max-height: 86vh; display: flex; flex-direction: column; }
.panel-hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-title { font-weight: 700; font-size: 16px; }
.panel-x { font-size: 22px; color: var(--text3); cursor: pointer; line-height: 1; padding: 4px; }
.panel-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.panel-ft { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }

/* 工艺勾选弹层 */
.cp-sec { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; }
.cp-sec-t { color: var(--brand); font-weight: 700; }
.cp-sec-line { flex: 1; height: 1px; background: var(--line); }
.cp-part { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
.cp-part-hd { display: flex; align-items: center; padding: 10px 14px; background: var(--subtle); cursor: pointer; }
.cp-part-name { font-weight: 600; }
.cp-part-count { margin-left: auto; font-size: 12px; color: var(--text3); }
.cp-part-count.has { color: var(--brand); }
.cp-part-all { margin-left: 16px; font-size: 12px; color: var(--brand); border: 1px solid var(--brand); border-radius: 3px; padding: 2px 10px; cursor: pointer; }
.cp-opts { padding: 4px 14px 10px; }
.cp-opt { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; border-bottom: 1px solid #F2F4F7; }
.cp-opt:last-child { border-bottom: none; }
.cp-box { width: 18px; height: 18px; border: 2px solid #D8DCE2; border-radius: 3px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex-shrink: 0; }
.cp-box.on { background: var(--brand); border-color: var(--brand); }
.cp-o-img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: #EEF1F5; flex-shrink: 0; }
.cp-o-color { width: 40px; height: 40px; border-radius: 4px; border: 1px solid var(--line); flex-shrink: 0; }

/* 草稿箱 */
.draft-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.draft-item:last-child { border-bottom: none; }
.draft-title { font-weight: 600; }
.draft-meta { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* 底部操作条 */
.bottom-bar {
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  display: flex; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  margin: 0 -20px -16px; /* 抵消 .sec/.content 内边距，贴到内容区底边 */
}
.bottom-bar .btn-primary { flex: 1; height: 44px; }

/* 全局兜底：带 hidden 属性的元素必须真正隐藏（否则会被 .lightbox 的 display:flex 盖回去） */
[hidden] { display: none !important; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 10px 20px; border-radius: 6px;
  font-size: 14px; z-index: 200; max-width: 80vw;
}
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 300; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 92vh; }

/* ============================================================
   PC 壳层：固定侧栏 + 固定顶栏 + 内容区独立滚动
   ============================================================ */
.layout { display: flex; height: 100vh; }

/* 侧边栏：普鲁士蓝（与小程序端主蓝同源，沉稳正色） */
.sidenav { width: 196px; flex-shrink: 0; height: 100vh; background: #0D3A69; color: #D8E2EF; display: flex; flex-direction: column; }
.sn-logo { color: #fff; font-size: 15px; font-weight: 700; padding: 20px 16px 4px; letter-spacing: 0; white-space: nowrap; }
.sn-logo span { display: block; font-size: 11px; font-weight: 400; color: #A9BFD8; letter-spacing: 3px; margin-top: 3px; }
.sn-nav { flex: 1; padding: 8px 0 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.sn-nav:hover { scrollbar-color: rgba(255,255,255,.28) transparent; }
/* 侧栏滚动条：平时完全隐藏，悬停才出现细条（避免右侧常驻一条浅色长槽） */
.sn-nav::-webkit-scrollbar { width: 6px; }
.sn-nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.sn-nav:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); }
.sn-nav::-webkit-scrollbar-track { background: transparent; }
/* 分组标题：底色小节条 + 折叠箭头，点击可收起/展开整组菜单 */
.sn-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 10px 2px; padding: 7px 10px; font-size: 13px; font-weight: 700; letter-spacing: 1px; color: #D3E4F8; background: rgba(255,255,255,.12); border-radius: 4px; cursor: pointer; user-select: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); white-space: nowrap; }
.sn-group:hover { background: rgba(255,255,255,.18); }
.sn-group::after { content: '▾'; font-size: 10px; color: #9FBFDD; transition: transform .15s; }
.sn-group.folded { color: #8FAFC9; background: rgba(255,255,255,.05); box-shadow: none; }
.sn-group.folded::after { transform: rotate(-90deg); }
/* 折叠组下的菜单项：!important 压过权限显隐的内联样式，两套逻辑互不打架 */
.sn-item.sn-fold { display: none !important; }
/* 菜单项：左对齐 + 当前项金色左侧条 */
.sn-item { display: flex; align-items: center; padding: 9px 14px 9px 26px; color: #D8E2EF; font-size: 14px; cursor: pointer; border-left: 3px solid transparent; text-decoration: none; }
.sn-item:hover { color: #fff; background: rgba(255,255,255,.09); }
.sn-item.on { color: #fff; background: #164C86; border-left-color: #F2C94C; font-weight: 600; }
.sn-item.dis { opacity: .55; cursor: not-allowed; }
.sn-item.dis:hover { color: #D8E2EF; background: none; }
.sn-soon { font-size: 11px; color: #8FA8C4; border: 1px solid #3D608F; border-radius: 3px; padding: 0 6px; line-height: 18px; margin-left: auto; }
/* 侧栏底部：头像 + 名字/角色 + 退出，一行式 */
.sn-foot { padding: 12px 14px 14px; border-top: 1px solid rgba(255,255,255,.16); }
.sn-me { display: flex; align-items: center; gap: 10px; }
.sn-avatar { width: 34px; height: 34px; border-radius: 50%; background: #F2C94C; color: #0D3A69; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sn-meinfo { flex: 1; min-width: 0; }
.sn-user { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-logout { font-size: 12px; color: #A9BFD8; cursor: pointer; flex-shrink: 0; text-decoration: none; padding: 5px 8px; border-radius: 4px; }
.sn-logout:hover { color: #fff; background: rgba(255,255,255,.12); }

/* 主区：顶栏固定，内容区自己滚 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.content { flex: 1; min-width: 0; overflow-y: auto; padding: 20px 24px 28px; }

/* 顶栏：白底细描边 + 轻阴影，面包屑 + 标题 + 右侧动作区 */
.topbar { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 4px rgba(15,30,55,.05); padding: 0 24px; display: flex; align-items: center; height: 54px; gap: 14px; flex-shrink: 0; z-index: 10; }
.tb-title { font-size: 16px; font-weight: 700; }
.tb-crumb { font-size: 13px; color: var(--text3); font-weight: 400; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* 列表工具栏 */
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.toolbar .chip { padding: 4px 10px; font-size: 12px; }
.toolbar-search { flex: 1; min-width: 200px; max-width: 340px; }

/* 数据表格：表头吸附（长列表滚到哪都看得到列名） */
.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.tbl th, .tbl td { border-bottom: 1px solid #EEF0F4; padding: 10px 12px; text-align: left; vertical-align: middle; }
.tbl th { color: var(--text3); font-weight: 600; font-size: 12px; background: var(--subtle); white-space: nowrap; position: sticky; top: 0; z-index: 2; }
.tbl tbody tr:hover { background: #F6F8FC; }
.tbl .th-check, .tbl .td-check { width: 36px; text-align: center; }
.tbl .p-img { width: 44px; height: 56px; }
.tbl .p-name-cell { max-width: 260px; }
.tbl .p-name-cell .p-name { white-space: normal; font-weight: 600; margin-bottom: 2px; }
.tbl .p-sub { color: var(--text3); font-size: 12px; }
.tbl .p-price { color: var(--danger); font-weight: 600; }
.tbl .p-acts { white-space: nowrap; }
.tbl .p-acts .btn { margin-right: 6px; }
.batch-bar { display: flex; align-items: center; gap: 10px; background: var(--brand-bg); border: 1px solid #C9D9F7; border-radius: 3px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }

/* 加载中 / 空态 */
.loading { text-align: center; color: var(--text3); padding: 56px 0; font-size: 13px; letter-spacing: 1px; }

/* 编辑器：双列网格 */
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.ed-grid .row { grid-column: auto; }
.ed-grid .row.col, .ed-grid .ed-full { grid-column: 1 / -1; }
.ed-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ed-cols .sec { margin: 0; display: flex; flex-direction: column; }
.ed-cols .sec .hint { margin-top: auto; padding-top: 10px; }
.ed-cols .ed-full { margin: 0; display: flex; flex-direction: column; }
.ed-cols .ed-full .hint { margin-top: auto; padding-top: 10px; }
@media (max-width: 1100px) { .ed-grid, .ed-cols { grid-template-columns: 1fr; } }

/* 编辑器顶栏动作 */
.tb-actions { display: flex; align-items: center; gap: 8px; }

/* 登录态：隐藏壳层，全屏登录（不受固定骨架影响） */
body.login-mode .sidenav { display: none; }
body.login-mode #topbar { display: none; }
body.login-mode { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
body.login-mode .layout { height: auto; min-height: 100vh; width: 100%; }
body.login-mode .main { height: auto; overflow: visible; }
body.login-mode #app { flex: none; width: 100%; padding: 0; }
.login-wrap { display: flex; justify-content: center; padding: 8vh 0 0; }

/* ============================================================
   员工与权限（staff）
   ============================================================ */
.sn-role { font-size: 11px; color: #8FAFC9; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-role { font-size: 12px; color: var(--text3); border: 1px solid var(--line); border-radius: 3px; padding: 2px 10px; background: var(--subtle); }

/* ============================================================
   侧栏收成图标栏（Ctrl+B 切换）
   ============================================================ */
.sidenav { position: relative; }
.sn-topbar { padding: 4px 10px 0; display: flex; justify-content: flex-end; }
.sn-collapse { width: 22px; height: 22px; line-height: 18px; text-align: center; color: #A9BFD8; border: 1px solid rgba(255,255,255,.28); border-radius: 4px; cursor: pointer; font-size: 13px; background: transparent; padding: 0; }
.sn-collapse:hover { color: #fff; background: rgba(255,255,255,.14); }
.sidenav.sn-mini { width: 56px; }
.sidenav.sn-mini .sn-logo { font-size: 0; padding: 14px 0 0; text-align: center; white-space: normal; }
.sidenav.sn-mini .sn-logo::before { content: '衫'; font-size: 17px; font-weight: 700; color: #fff; }
.sidenav.sn-mini .sn-logo span { display: none; }
.sidenav.sn-mini .sn-topbar { justify-content: center; padding-top: 2px; }
.sidenav.sn-mini .sn-collapse { transform: rotate(180deg); }
.sidenav.sn-mini .sn-group { font-size: 0; padding: 0; margin: 8px 12px 2px; background: none; box-shadow: none; min-height: 8px; align-items: center; }
.sidenav.sn-mini .sn-group::before { content: ''; display: block; width: 100%; height: 1px; background: rgba(255,255,255,.16); }
.sidenav.sn-mini .sn-group::after { display: none; }
.sidenav.sn-mini .sn-item { justify-content: center; padding-left: 0; font-size: 0; }
.sidenav.sn-mini .sn-item::before { content: attr(data-glyph); font-size: 13px; letter-spacing: 0; }
.sidenav.sn-mini .sn-soon { display: none; }
.sidenav.sn-mini .sn-foot { padding: 12px 8px; }
.sidenav.sn-mini .sn-me { justify-content: center; }
.sidenav.sn-mini .sn-meinfo, .sidenav.sn-mini .sn-logout { display: none; }

/* ============================================================
   Ctrl+K 全局跳转
   ============================================================ */
.cmdk { position: fixed; inset: 0; background: rgba(13,42,74,.45); z-index: 240; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.cmdk-box { width: 480px; max-width: 92vw; background: #fff; border-radius: 6px; box-shadow: 0 18px 50px rgba(13,58,105,.35); overflow: hidden; }
.cmdk-input { width: 100%; box-sizing: border-box; border: none; outline: none; padding: 14px 16px; font-size: 15px; border-bottom: 1px solid var(--line); color: var(--text); }
.cmdk-list { max-height: 330px; overflow-y: auto; padding: 6px; }
.cmdk-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 4px; cursor: pointer; font-size: 14px; color: var(--text); }
.cmdk-item .ck-ico { width: 20px; height: 20px; flex-shrink: 0; border-radius: 3px; background: #EAF1F9; color: #0D3A69; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.cmdk-item.on { background: #EAF1F9; color: #0D3A69; }
.cmdk-item .ck-group { margin-left: auto; font-size: 11px; color: var(--text3); }
.cmdk-empty { padding: 20px; text-align: center; color: var(--text3); font-size: 13px; }
.cmdk-foot { padding: 8px 14px; font-size: 11px; color: var(--text3); border-top: 1px solid var(--line); }

/* 子标签页 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 16px; }
.tab { background: none; border: none; padding: 10px 16px; font-size: 14px; color: var(--text2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--brand); }
.tab.on { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand); }
.staff-body { min-height: 120px; }

/* 弹窗（居中，近直角） */
.modal { background: #fff; border-radius: 4px; width: 520px; max-width: 96vw; max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(13,58,105,.18); }
.modal-lg { width: 780px; }
.modal-hd { padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.modal-bd { padding: 16px 20px; overflow-y: auto; flex: 1; }
.modal-ft { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.modal-bd .row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.modal-bd .label { width: 76px; flex-shrink: 0; font-size: 13px; color: var(--text2); }
.modal-bd input, .modal-bd select { flex: 1; height: 34px; }

/* 权限矩阵 */
.perm-tbl { margin-top: 6px; }
.perm-tbl th.ctr, .perm-tbl td.ctr { text-align: center; width: 72px; }
.perm-tbl td { font-size: 13px; }
.perm-tbl input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
.perm-tbl input[disabled] { cursor: not-allowed; }

/* 角色卡片 */
.role-card { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.role-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.role-hd b { font-size: 15px; }
.role-key { font-size: 12px; color: var(--text3); font-family: ui-monospace, Consolas, monospace; }
.role-hd .btn { margin-left: auto; }
.role-desc { font-size: 12px; color: var(--text3); margin-bottom: 8px; }
.role-perms { display: flex; flex-wrap: wrap; gap: 6px; }

/* 审计日志 */
.tbl .nowrap { white-space: nowrap; color: var(--text2); font-size: 12px; }
.tbl .audit-chg { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text3); }
.muted { color: var(--text3); font-size: 12px; }
td.ctr, th.ctr { text-align: center; }

/* 无权限提示 */
.empty-block { padding: 64px 20px; text-align: center; }
.empty-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.empty-sub { font-size: 13px; color: var(--text3); }
/* 截断提示：列表被 limit 截断时提醒（第 61 批） */
.cut-hint { margin-top: 10px; padding: 8px 12px; background: #FFF9EC; border: 1px solid #F3E3BE; color: #8A6D3B; border-radius: 4px; font-size: 12.5px; }

/* ============================================================
   订单管理：详情抽屉（右侧全高滑出） + 发货弹窗
   ============================================================ */
@keyframes drawerIn { from { transform: translateX(48px); opacity: .3; } to { transform: none; opacity: 1; } }
/* 遮罩默认垂直居中（弹窗）；装抽屉时改为右贴边、全高 */
.mask:has(> .drawer) { align-items: stretch; justify-content: flex-end; padding: 0; }
.drawer { background: #fff; width: 780px; max-width: 92vw; height: 100%; display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(13,58,105,.2); animation: drawerIn .18s ease-out; }
/* 不支持 :has 的老浏览器回退：抽屉当居中面板用 */
@supports not selector(:has(*)) {
  .mask:has(> .drawer) { align-items: center; justify-content: center; padding: 24px; }
  .drawer { height: auto; max-height: 86vh; border-radius: 4px; }
}
.drawer-hd { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.drawer-hd .btn { margin-left: auto; }
.drawer-bd { padding: 16px 20px; overflow-y: auto; flex: 1; }
.drawer-bd td.k { width: 90px; color: var(--text3); font-size: 12px; background: var(--subtle); }
.rowlink { cursor: pointer; }
.img-row { display: flex; flex-wrap: wrap; gap: 10px; }
.d-img { width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--line); background: #EEF1F5; border-radius: 3px; cursor: pointer; }
.ship-proof { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.tbl td .p-price { margin-right: 6px; }

/* ============================================================
   经营看板：指标卡 / 趋势条 / 告警横幅
   ============================================================ */
.dash-cards { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.dash-card { flex: 1; min-width: 130px; background: var(--subtle); border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; }
.dash-card .dash-k { font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.dash-card .dash-v { font-size: 22px; font-weight: 700; color: #1F3A5F; }
.dash-trend { display: flex; gap: 10px; align-items: flex-end; height: 140px; padding: 10px 6px 0; }
.dash-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.dash-bar-fill { width: 70%; background: #2F6FAE; border-radius: 2px 2px 0 0; min-height: 2px; }
.dash-bar-label { font-size: 11px; color: var(--text3); margin-top: 4px; white-space: nowrap; }
.dash-banner { margin-top: 12px; padding: 10px 14px; border-radius: 4px; font-size: 13px; }

/* ============================================================
   发货台（第 62 批）：批量录单号 + 打印 + 导出
   ============================================================ */
.ship-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 12px; margin-bottom: 12px;
  background: var(--subtle); border: 1px solid var(--line); border-radius: 6px;
}
.ship-bar .muted { font-size: 12px; color: var(--text3); }
.ship-sep { width: 1px; height: 20px; background: var(--line); }
.ship-in {
  flex: none; width: 100%; height: 30px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 3px; font-size: 13px;
  font-family: Consolas, "SFMono-Regular", monospace;
}
.tbl .ship-in { width: 100%; }
.tbl tr.row-done td { background: #F4F9F4; color: var(--text3); }
.ship-progress { font-size: 12px; color: var(--brand); font-weight: 600; }

/* ============================================================
   财务对账（第 70 批）：账单拖拽区
   ============================================================ */
.rc-drop {
  padding: 28px 20px; text-align: center;
  border: 2px dashed var(--line); border-radius: 6px;
  background: var(--subtle);
  transition: border-color .15s, background .15s;
}
.rc-drop.rc-over { border-color: var(--brand); background: #F2F7FC; }
.rc-drop-t { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.rc-drop-s { font-size: 12px; color: var(--text3); margin-bottom: 14px; }
