/* ============================================================
   HGBOX · 天府八吉好运文创商店 — 统一主题系统 v7
   Donezo Dashboard 风格 · 深绿主色 · 卡片化布局
   适用于：default.aspx, vip.aspx, hlpforms/*.aspx
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ===================== CSS 变量 ===================== */
:root {
  /* Donezo 绿色系 */
  --hg-primary:       #0066CC;
  --hg-primary-deep:  #0052A3;
  --hg-primary-light: #4D8FE0;
  --hg-primary-pale:  #D6E7F9;
  --hg-primary-soft:  #EBF3FC;
  --hg-primary-dark:  #003D7A;

  /* 标题与下方绿线的统一间距（禁止渐变，纯色实线）。全站所有标题分隔线共用此值 */
  --hg-title-gap:    8px;

  /* 深色次要色 */
  --hg-secondary:     #111827;
  --hg-secondary-deep:#000000;
  --hg-secondary-light:#374151;

  /* 强调色 */
  --hg-accent:        #F59E0B;
  --hg-accent-deep:   #D97706;

  /* 兼容旧变量名 */
  --hg-orange:        var(--hg-accent);
  --hg-orange-deep:   var(--hg-accent-deep);
  --hg-orange-light:  #FCD34D;
  --hg-orange-pale:   #FEF3C7;

  /* 中性色 */
  --hg-ink:           #111827;
  --hg-muted:         #6B7280;
  --hg-faint:         #9CA3AF;
  --hg-canvas:        #F9FAFB;
  --hg-surface:       #FFFFFF;
  --hg-gray:          #F3F4F6;
  --hg-gray-hover:    #E5E7EB;
  --hg-border:        #E5E7EB;
  --hg-border-light:  #F3F4F6;
  --hg-divider:       #D1D5DB;

  /* 语义色 */
  --hg-success:       #0066CC;
  --hg-danger:        #EF4444;
  --hg-warning:       #F59E0B;
  --hg-info:          #3B82F6;
  /* 弹窗成功图标专用绿勾（2026-08-21 全站统一：成功=绿勾，与主色蓝区分） */
  --hg-ok:            #059669;

  /* 阴影 — Donezo 柔和阴影 */
  --hg-shadow-sm:     0 1px 2px rgba(0,0,0,.04);
  --hg-shadow:        0 1px 3px rgba(0,0,0,.05);
  --hg-shadow-md:     0 4px 12px rgba(0,0,0,.05);
  --hg-shadow-lg:     0 8px 24px rgba(0,0,0,.06);
  --hg-shadow-xl:     0 16px 40px rgba(0,0,0,.08);

  /* 圆角 — 大圆角 */
  --hg-radius-xs:     6px;
  --hg-radius-sm:     8px;
  --hg-radius:        12px;
  --hg-radius-lg:     16px;
  --hg-radius-xl:     20px;
  --hg-radius-full:   9999px;

  /* 布局 */
  --hg-maxw:          1440px;
  --hg-topbar-h:      72px;
  --hg-sidebar-w:     240px;
  /* 控件统一高度（输入框/下拉/日期/按钮等高，2026-08-10 用户要求） */
  --hg-control-h:     40px;

  /* 字体 */
  --hg-font:          Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --hg-font-mono:     "SF Mono", "Cascadia Code", Consolas, monospace;

  /* 过渡 */
  --hg-ease:          cubic-bezier(.25,.1,.25,1);
  --hg-ease-spring:   cubic-bezier(.34,1.56,.64,1);
  --hg-ease-standard: cubic-bezier(.4,0,.2,1);
}

/* ===================== 全局重置 ===================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* 始终为右侧垂直滚动条预留槽位：有/无滚动条的页面切换时，
     视口可用宽度恒定 → 左侧菜单、顶部 logo、右侧内容框不再左右跳动 */
  scrollbar-gutter: stable;
  scrollbar-width: thin;                         /* Firefox 细滚动条 */
  scrollbar-color: #9CA3AF #E5E7EB;              /* 滑块中性灰 / 轨道浅灰 */
}
/* WebKit（Chrome/Edge）细滚动条，观感更接近浮层 */
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-thumb { background: #9CA3AF; border-radius: var(--hg-radius-sm); }
html::-webkit-scrollbar-thumb:hover { background: #6B7280; }
html::-webkit-scrollbar-track { background: transparent; }
/* 旧浏览器（不支持 scrollbar-gutter）回退：始终显示滚动条，同样消除跳动 */
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }
}
body {
  margin: 0; padding: 0;
  font-family: var(--hg-font);
  font-size: 14px; line-height: 1.55;
  color: var(--hg-ink);
  background: var(--hg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* ===================== 顶部导航（Donezo App Bar）===================== */
.hg-topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--hg-surface);
  border-bottom: 1px solid var(--hg-border);
}
.hg-topbar-inner {
  max-width: var(--hg-maxw); margin: 0 auto;
  height: var(--hg-topbar-h); padding: 0 28px;
  display: flex; align-items: center; gap: 20px;
}

/* 品牌标识 */
.hg-brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 700; letter-spacing: -.02em;
  color: var(--hg-ink);
  transition: opacity .2s var(--hg-ease-standard);
}
.hg-brand:hover { opacity: .85; }
.hg-brand .hg-mark {
  width: 38px; height: 38px; border-radius: var(--hg-radius);
  display: grid; place-items: center;
  background: var(--hg-primary); color: #fff;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .5px;
  box-shadow: 0 4px 12px rgba(0, 102, 204, .25);
}
.hg-brand small {
  font-weight: 400; color: var(--hg-faint);
  font-size: 11px; margin-left: 4px;
  letter-spacing: .04em;
}

/* 搜索框 */
.hg-search {
  flex: 1; max-width: 400px;
  position: relative;
}
.hg-search input {
  width: 100%; padding: 10px 16px 10px 40px;
  font-family: var(--hg-font); font-size: 14px;
  background: var(--hg-gray); border: 1px solid transparent;
  border-radius: var(--hg-radius-full);
  outline: none; transition: all .2s var(--hg-ease-standard);
}
.hg-search input:focus {
  background: var(--hg-surface);
  border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px var(--hg-primary-pale);
}
.hg-search::before {
  content: "\1F50D";
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px; opacity: .5;
}

/* 顶部标题区 */
.hg-page-title {
  font-size: 24px; font-weight: 800; color: var(--hg-ink);
  letter-spacing: -.02em;
}
.hg-page-subtitle {
  font-size: 13px; color: var(--hg-muted); margin-top: 2px;
}

/* 顶部操作区 */
.hg-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.hg-topbar-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--hg-gray); color: var(--hg-muted);
  cursor: pointer; transition: all .2s var(--hg-ease-standard);
  font-size: 16px;
  position: relative;
}
.hg-topbar-icon:hover { background: var(--hg-primary-soft); color: var(--hg-primary); }
/* 铃铛右上角未读站内信角标（空值不显示） */
.hg-topbar-icon[data-badge]:not([data-badge=""])::after {
  content: attr(data-badge);
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--hg-radius-full);
  background: var(--hg-danger); color: #fff;
  font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
  border: 2px solid var(--hg-surface);
}
/* 头像改为图片 */
.hg-topbar-avatar-img {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--hg-border);
  cursor: pointer;
}
.hg-topbar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--hg-primary-soft);
  border: 2px solid var(--hg-border);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: var(--hg-primary-deep);
  cursor: pointer;
  display: none; /* 默认隐藏文字头像 */
}
.hg-topbar-user-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit; cursor: pointer;
  background: none; border: 0; padding: 0;
}
.hg-topbar-user {
  display: flex; flex-direction: column; line-height: 1.3;
}
.hg-topbar-user-name { font-size: 13px; font-weight: 600; color: var(--hg-ink); }
.hg-topbar-user-email { font-size: 11px; color: var(--hg-faint); }

/* 汉堡菜单按钮（2026-08-15 用户确认：初始即深绿背景 + 白色三条杠） */
.hg-menu-toggle {
  display: none; margin-left: auto;
  border: 0; background: var(--hg-primary-deep); cursor: pointer;
  width: 44px; height: 44px; position: relative;
  color: var(--hg-ink);
  border-radius: var(--hg-radius-full);
  transition: background .2s var(--hg-ease-standard);
}
.hg-menu-toggle:hover { background: var(--hg-primary); }
.hg-menu-toggle span {
  display: block; width: 20px; height: 2px;
  background: #fff; border-radius: 2px;  /* 白色三条杠 */
  position: absolute; left: 12px;
  transition: transform .25s var(--hg-ease-standard), opacity .2s var(--hg-ease-standard), background .2s var(--hg-ease-standard);
}
.hg-menu-toggle:hover span { background: #fff; }
.hg-menu-toggle span:nth-child(1) { top: 15px; }
.hg-menu-toggle span:nth-child(2) { top: 21px; }
.hg-menu-toggle span:nth-child(3) { top: 27px; }
.hg-menu-toggle.hg-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hg-menu-toggle.hg-open span:nth-child(2) { opacity: 0; }
.hg-menu-toggle.hg-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
/* 系统/浏览器深色模式：保持深绿按钮 + 白色线条（深色顶栏下同样醒目） */
@media (prefers-color-scheme: dark) {
  .hg-menu-toggle { background: var(--hg-primary-deep); }
  .hg-menu-toggle span { background: #fff; }
  .hg-menu-toggle:hover { background: var(--hg-primary); }
  .hg-menu-toggle:hover span { background: #fff; }
}

/* ===================== 按钮系统 ===================== */
.hg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border: 0; border-radius: var(--hg-radius);
  font-family: var(--hg-font); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .2s var(--hg-ease-standard);
  text-align: center; line-height: 1.4;
  user-select: none; white-space: nowrap;
  letter-spacing: -.01em;
  box-shadow: var(--hg-shadow-sm);
}
.hg-btn:hover { box-shadow: var(--hg-shadow-md); transform: translateY(-1px); }
.hg-btn:active { transform: translateY(0); box-shadow: var(--hg-shadow-sm); }

.hg-btn-primary {
  background: var(--hg-primary); color: #fff;
}
.hg-btn-primary:hover { background: var(--hg-primary-deep); }

.hg-btn-secondary {
  background: var(--hg-secondary); color: #fff;
}
.hg-btn-secondary:hover { background: var(--hg-secondary-deep); }

.hg-btn-accent {
  background: var(--hg-accent); color: #fff;
}
.hg-btn-accent:hover { background: var(--hg-accent-deep); }

.hg-btn-outline {
  background: transparent; color: var(--hg-ink);
  border: 1px solid var(--hg-border);
  box-shadow: none;
}
.hg-btn-outline:hover {
  border-color: var(--hg-primary); color: var(--hg-primary);
  background: var(--hg-primary-soft);
  box-shadow: none;
}

.hg-btn-ghost {
  background: transparent; color: var(--hg-ink);
  box-shadow: none;
}
.hg-btn-ghost:hover {
  color: var(--hg-primary); background: var(--hg-primary-soft);
  box-shadow: none;
}

.hg-btn-danger {
  background: var(--hg-danger); color: #fff;
}
.hg-btn-danger:hover { opacity: .92; }

.hg-btn-sm  { padding: 7px 14px; font-size: 13px; }
.hg-btn-lg  { padding: 14px 28px; font-size: 16px; }
.hg-btn-block { display: flex; width: 100%; }

/* Floating Action Button */
.hg-fab {
  width: 56px; height: 56px; border-radius: var(--hg-radius-full);
  display: grid; place-items: center;
  background: var(--hg-primary); color: #fff;
  border: 0; box-shadow: var(--hg-shadow-md);
  cursor: pointer; transition: transform .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
}
.hg-fab:hover { box-shadow: var(--hg-shadow-lg); }
.hg-fab:active { transform: scale(.95); }
.hg-fab-sm { width: 40px; height: 40px; }

/* ===================== 卡片系统 ===================== */
.hg-card {
  background: var(--hg-surface); border: 0;
  border-radius: var(--hg-radius-xl); padding: 24px;
  box-shadow: var(--hg-shadow-md);
  transition: transform .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
}
.hg-card:hover { box-shadow: var(--hg-shadow-lg); }
.hg-card-flat {
  border: 1px solid var(--hg-border);
  box-shadow: none;
}
.hg-card-flat:hover { box-shadow: var(--hg-shadow-sm); }
.hg-card-highlight {
  border: 0;
  box-shadow: 0 0 0 2px var(--hg-primary), var(--hg-shadow-md);
}
.hg-card-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--hg-border-light);
}
.hg-card-header h2, .hg-card-header h3 { margin: 0; font-size: 17px; font-weight: 700; }

/* KPI 卡片 — Donezo 风格 */
.hg-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
}
.hg-kpi {
  background: var(--hg-surface); border-radius: var(--hg-radius-xl);
  padding: 20px; box-shadow: var(--hg-shadow-md);
  border: 1px solid var(--hg-border);
  position: relative;
}
.hg-kpi-label {
  font-size: 12px; font-weight: 600; color: var(--hg-muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 8px;
}
.hg-kpi-value {
  font-size: 28px; font-weight: 800; color: var(--hg-ink);
  letter-spacing: -.02em;
}
.hg-kpi-change {
  font-size: 12px; font-weight: 600; margin-top: 6px;
  display: inline-flex; align-items: center; gap: 4px;
}
.hg-kpi-change.up { color: var(--hg-success); }
.hg-kpi-change.down { color: var(--hg-danger); }
.hg-kpi-icon {
  position: absolute; top: 20px; right: 20px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--hg-gray); color: var(--hg-muted);
  font-size: 14px;
}
/* 绿色大 KPI 卡片 */
.hg-kpi-primary {
  background: var(--hg-primary); color: #fff;
  border: 0;
}
.hg-kpi-primary .hg-kpi-label { color: rgba(255,255,255,.8); }
.hg-kpi-primary .hg-kpi-value { color: #fff; font-size: 36px; }
.hg-kpi-primary .hg-kpi-change { color: rgba(255,255,255,.9); }
.hg-kpi-primary .hg-kpi-icon { background: rgba(255,255,255,.2); color: #fff; }

/* 深色卡片（Reminders / Time Tracker / Download App） */
.hg-card-dark {
  background: var(--hg-primary-dark); color: #fff;
  border: 0;
}
.hg-card-dark .hg-kpi-label,
.hg-card-dark h3 { color: rgba(255,255,255,.9); }
.hg-card-dark p { color: rgba(255,255,255,.7); }

/* ===================== 表单控件 ===================== */
.hg-label {
  display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 500; color: var(--hg-muted);
  letter-spacing: .02em;
}
/* 2026-08-14 panelInfo 内容统一居左对齐（用户确认，修复内容靠右/分散问题） */
#pgForm [id$="panelInfo"],
.hg-myprod [id$="panelInfo"] { text-align: left !important; }
/* 输入框清除叉（2026-08-14 全局机制，用户确认）：
   由 default.aspx hgInitInputClear 给 .hg-input 自动包 .hg-input-wrap（relative）并注入清除按钮，
   点击清空内容；仅 input 有值时显示叉。 */
.hg-input-wrap { position: relative; display: inline-block; vertical-align: middle; }
.hg-input-wrap > .hg-input { padding-right: 30px; }
.hg-input-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; display: none;
  align-items: center; justify-content: center;
  border: none; background: none; padding: 0; cursor: pointer;
  color: var(--hg-faint); font-size: 14px; line-height: 1;
  border-radius: 50%; transition: background .15s, color .15s;
}
/* 输入框有内容时才显示叉（2026-08-14 用户确认：空时无叉，输入后出现） */
.hg-input-wrap.has-value .hg-input-clear { display: inline-flex; }
.hg-input-clear:hover { color: var(--hg-ink); background: var(--hg-primary-soft); }
.hg-input,
.hg-select,
.hg-textarea {
  width: 100%; padding: 11px 14px;
  font-family: var(--hg-font); font-size: 14px; color: var(--hg-ink);
  background: var(--hg-surface); border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  transition: border-color .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
  outline: none; line-height: 1.5;
  /* 2026-08-16 统一输入框高度：disabled/readonly input 在某些 Chromium 渲染下
     浏览器默认不应用 padding（导致 .hg-input 计算高度只有 ~18px），与其他
     input/edtAmount 等有 wrap 的 input 高度不一致。强制 min-height:42px
     （=11*2 padding + 20 content） + box-sizing:border-box 防 padding 撑爆。 */
  min-height: 42px !important;
  box-sizing: border-box !important;
}
/* 2026-09-09：小宽度数字输入框（wcShopPrinterSet 模板行 行/列/左边距/宽度）专用样式。
   覆盖 .hg-input 的 11px×14px padding（在小宽 input 上 padding 几乎吃掉全部内容区）
   + min-height:42px（小框不需要这么高） + 居中显示数字。
   关键：必须把 .hg-input-wrap > .hg-input 的 padding-right:30px（给清除叉留位）覆盖掉，
   小数字框不需要清除叉。 */
.hg-input-wrap > .hg-input-num,
.hg-input-num {
  padding: 4px 6px !important;
  min-height: 28px !important;
  height: 28px !important;
  text-align: center;
}
.hg-input-wrap > .hg-input-num { padding-right: 6px !important; }
.hg-input-num::-webkit-inner-spin-button,
.hg-input-num::-webkit-outer-spin-button { opacity: 1; }  /* 保留 spinner 方便微调 */
.hg-input:focus,
.hg-select:focus,
.hg-textarea:focus {
  border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px var(--hg-primary-pale);
}
/* 2026-08-26：Secret 已设置锁定态（readonly 灰色禁编辑，配「修改」按钮解锁） */
.hg-input.hg-secret-locked {
  background: #F3F4F6;
  color: #9CA3AF;
  cursor: not-allowed;
}
.hg-input.hg-secret-locked:focus {
  border-color: var(--hg-border);
  box-shadow: none;
}
.hg-input::placeholder,
.hg-textarea::placeholder { color: var(--hg-faint); }
.hg-textarea { min-height: 100px; resize: vertical; }
/* 2026-09-02 窄输入框（CX Dlg 让折扣/限量数字字段 4 条件同排） */
.hg-filter-group .hg-input--narrow { width: 100px; flex: 0 0 100px; }
.hg-filter-group .hg-input--narrow::placeholder { font-size: 12px; }
.hg-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236B7280'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }

.hg-form-row {
  display: flex; gap: 16px; margin-bottom: 16px;
  align-items: center;
}
.hg-form-row > .hg-form-label { flex: 0 0 auto; }
.hg-form-row > .hg-form-field { flex: 1 1 0; min-width: 0; }
/* 促销 Dlg 行间距紧凑（2026-09-02 用户要求：wcCXTJ 对齐销售查询行距） */
.hg-cx-dlg .hg-form-row { margin-bottom: 6px; gap: 12px; align-items: center; }
/* 促销 Dlg 空 span（无 id 也无 ASP.NET 控件的占位）收缩到 0，避免被 .hg-form-row > * 残留撑出空白块 */
.hg-cx-dlg .hg-form-row > span:not([class*="hg-form-"]):empty { display: none; }
.hg-cx-dlg .hg-form-row > span.hg-form-label:empty,
.hg-cx-dlg .hg-form-row > span.hg-form-field:empty { flex: 0 0 0; min-width: 0; padding: 0; margin: 0; }
/* 促销 Dlg 章节小标题行（不在 form-row 内，独立 .hg-form-field 包裹），margin 紧贴上下行 */
.hg-cx-dlg > .hg-form-field > .hg-sec-title { margin: 6px 0; }
/* 参与店铺 CheckBoxList 强制一行内横排（2026-09-02，对齐销售查询视觉密度） */
.hg-cx-dlg .hg-form-field:has(.hg-shop-inline) { flex: 1 1 auto; min-width: 0; }
.hg-cx-dlg .hg-form-field .hg-shop-inline { display: inline-flex !important; flex-wrap: nowrap; align-items: center; gap: 16px; width: 100%; box-sizing: border-box; }
.hg-cx-dlg .hg-form-field .hg-shop-inline > tbody { display: inline-flex; flex-wrap: nowrap; }
.hg-cx-dlg .hg-form-field .hg-shop-inline > tr { display: inline-flex; align-items: center; gap: 16px; }
.hg-cx-dlg .hg-form-field .hg-shop-inline > td { display: inline-flex; align-items: center; gap: 4px; padding: 0 !important; border: 0 !important; white-space: nowrap; }
/* 2026-09-14 电子券定义「适用门店」多选（wcEVoucherProdDfDlg）：
   .hg-form-row .hg-form-field 是 flex 容器，`<br/>` 在 flex 中不产生换行（提示语会漂到门店块右侧）→
   让 CheckBoxList 与提示语各自 flex-basis:100%，强制分行，提示语另起一行贴在门店块下方。
   ── 2026-09-15 左对齐修正（用户：「居左对齐」）────────────────────────────
   🔴 居中根因（Playwright 实测祖先链，非推测）：
      default.aspx 外壳 <table class="hg-shell"> 的**中间 <td> 带 text-align:center**
      → .hg-content-card → .hg-form-row → .hg-evshop-field 一路继承 center，
      而 .hg-shop-inline / .hg-hint 都是「只含行内内容」的块级 flex 项（未 blockify 前是
      span/文本），于是内容整体被居中（实测 pad=288px：field.x=320 / 首个 checkbox.x=608）。
      其它字段行看着正常，只因里面的 input/下拉是定宽 flex 项，不受 text-align 影响 ——
      **这个坑对所有「行内文本/多选/纯文字」的行都成立，排查同类页先看 td 继承**。
   顺带收敛：field 原为 flex:0 0 auto，因内部 flex-basis:100% 子项把宽度顶到外壳宽
      （实测 1181 > row 1120，溢出 61px）→ 改 flex:1 1 auto + min-width:0 占满 label 右侧剩余。
   ── 2026-09-15 二次修正（用户：「店铺列表应在适用门店后面，与有效天数输入框左对齐」）──────
   🔴 实测（Playwright）：row 是 flex-wrap:wrap，field flex-basis:auto = max-content(5 个店名很宽)
      → 装不下 → **整块掉到 label 下一行行首**（field.y−label.y=36，checkbox.x=320=row.x），
      而有效天数输入框 x=420（label 84 + gap 16）。
   修法：basis 改 0（flex:1 1 0）→ field 恒在 label 右侧，checkbox/hint 左缘自然 = 420 对齐；
      门店过多时 .hg-shop-inline（block）内部自动折行，hint 仍贴其下。 */
.hg-form-row .hg-form-field.hg-evshop-field {
  flex: 1 1 0; min-width: 0;
  align-items: flex-start; justify-content: flex-start;
  text-align: left;
}
/* field 现在含「复选框行 + hint 行」两行，row 的 align-items:center 会把 label 垂直夹在两行中间
   （实测 label 中心比首个复选框中心低 13.5px）→ label 顶对齐 field 顶，
   line-height 24px 下文字中心 448 ≈ 复选框中心 448.5，自然对齐首行。 */
.hg-form-row:has(> .hg-form-field.hg-evshop-field) > .hg-form-label { align-self: flex-start; }
.hg-form-row .hg-form-field.hg-evshop-field > .hg-shop-inline { flex: 1 1 100%; min-width: 0; text-align: left; }
/* 浏览器给 input[type=checkbox] 的 UA 默认 margin 是 3px 3px 3px 4px →
   首个复选框会整体右移 4px，与下方 .hg-hint 的左边缘（严格 0）差 4px，肉眼可见不齐。
   只清 margin-left（保留上下右，维持复选框与文字的天然间距）。 */
.hg-form-row .hg-form-field.hg-evshop-field > .hg-shop-inline input[type="checkbox"] { margin-left: 0; }
.hg-form-row .hg-form-field.hg-evshop-field > .hg-hint { flex: 1 1 100%; margin: 4px 0 0; text-align: left; }
/* 2026-09-14 电子券「适用门店设置」专用弹窗（wcEVoucherShopDlg，菜单 118 / G_PageCmd=2）：
   门店多选占满整行；行高兜底防 #pgForm{line-height:0} 行盒塌陷（技能 hgbox-css-lh0-collapse）。
   本页不在 .hg-evpd 作用域内，故行高需单独声明。 */
:where(.hg-evshop-dlg .hg-form-row) { line-height: 1.6; }
.hg-evshop-dlg .hg-form-label { min-width: 72px; }
.hg-evshop-dlg .hg-evshop-info { font-size: 13px; color: var(--hg-ink); line-height: 1.6; word-break: break-all; }
/* 2026-09-14 电子券定义列表（菜单 118，根 .hg-evpdf）列宽契约：
   - 电子券号：17 位/10 位数字绝不折行（原先被 auto 布局压成「1000000 (换行) 015」）
   - 适用门店：内容 =「门店名 + 设置链接」两块，给足下限，避免挤成三行
   本页列多、总宽紧，故只钉这两列，其余列沿用全局 hg-col-* 契约。 */
#pgForm .hg-evpdf .hg-sales-grid th.hg-col-code,
#pgForm .hg-evpdf .hg-sales-grid td.hg-col-code { width: 96px !important; min-width: 92px !important; white-space: nowrap !important; }
/* 2026-09-14 新增「复制」操作列（本页 op 列 2→3）后总宽更紧，出现两处回退：
   ① 窄列表头被压成竖排（「有效天数」断 3 行、「折扣券」断 2 行）→ 给类型/状态/有效天数最低宽度；
   ② 名称列本是唯一宽列却被 auto 均分到 91px，券名折成 4 行 → 给它 min-width 兜底，
      并让日期/创建人列不折行、门店列略收，把宽度让给名称。
   ⚠️ hg-col-center 也用在「适用门店」列上 —— 靠下方 evshop 规则（同特异性、源序更后）覆盖，勿调换顺序。
   总账（1280 视口容器 950px）：96+66*3+150+186+92+72+45*3 = 929 < 950，不横滚。 */
#pgForm .hg-evpdf .hg-sales-grid th.hg-col-num,
#pgForm .hg-evpdf .hg-sales-grid td.hg-col-num { width: 68px !important; min-width: 66px !important; }
#pgForm .hg-evpdf .hg-sales-grid th.hg-col-center,
#pgForm .hg-evpdf .hg-sales-grid td.hg-col-center { width: 68px !important; min-width: 66px !important; }
#pgForm .hg-evpdf .hg-sales-grid th.hg-col-name,
#pgForm .hg-evpdf .hg-sales-grid td.hg-col-name { min-width: 186px !important; }
#pgForm .hg-evpdf .hg-sales-grid th.hg-col-date,
#pgForm .hg-evpdf .hg-sales-grid td.hg-col-date { min-width: 92px !important; white-space: nowrap !important; }
#pgForm .hg-evpdf .hg-sales-grid th.hg-col-boxer,
#pgForm .hg-evpdf .hg-sales-grid td.hg-col-boxer { min-width: 72px !important; white-space: nowrap !important; }
#pgForm .hg-evpdf .hg-sales-grid th.hg-col-evshop,
#pgForm .hg-evpdf .hg-sales-grid td.hg-col-evshop { width: 150px !important; min-width: 140px !important; }
@media (max-width: 768px) {
  #pgForm .hg-evpdf .hg-sales-grid th.hg-col-evshop,
  #pgForm .hg-evpdf .hg-sales-grid td.hg-col-evshop { width: 92px !important; min-width: 76px !important; }
}
.hg-form-group { margin-bottom: 16px; }
.hg-form-hint { font-size: 12px; color: var(--hg-faint); margin-top: 4px; }

/* 在线销售专项 */
.hg-sale-first { background: #fff; }
.hg-sale-change { font-size: 16px; font-weight: 700; color: var(--hg-primary); }
.hg-sale-chk,
.hg-sale-chk label { color: var(--hg-muted); }

.hg-checkbox, .hg-radio {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 14px; color: var(--hg-muted);
}
.hg-checkbox input, .hg-radio input {
  width: 18px; height: 18px; accent-color: var(--hg-primary);
}
/* 强调变体（商品档案对话框"连续新增"等）：文字深绿色加粗 */
.hg-checkbox--strong,
.hg-checkbox--strong label { color: var(--hg-primary-deep); font-weight: 700; }
/* 商品收货处理：将“上货后打印条码”勾选文字染成主题绿 */
.hg-green-label,
.hg-green-label label { color: var(--hg-primary); }
/* 开关变体（hg-switch-check）下保留绿色文字：.hg-switch-check label 的同特异性规则在文件中更靠后，
   会覆盖 hg-green-label 的绿色，此处用更高特异性保持（2026-08-14） */
.hg-switch-check.hg-green-label label { color: var(--hg-primary); font-weight: 700; }

/* Switch */
.hg-switch {
  position: relative; display: inline-block; width: 44px; height: 24px;
}
.hg-switch input { opacity: 0; width: 0; height: 0; }
.hg-switch-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: #D1D5DB; border-radius: 24px; transition: .2s;
}
.hg-switch-slider:before {
  position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.hg-switch input:checked + .hg-switch-slider { background: var(--hg-primary); }
.hg-switch input:checked + .hg-switch-slider:before { transform: translateX(20px); }

/* Switch 变体（ASP.NET CheckBox 渲染结构 input+label 兄弟，如快速下货"扫码输入"勾选）：
   隐藏原生勾选框，label 前置轨道+滑块；勾选后轨道变主题绿、滑块右移。
   用法：<asp:CheckBox CssClass="hg-switch-check" ... />（2026-08-13） */
.hg-switch-check { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.hg-switch-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.hg-switch-check label {
  position: relative; padding-left: 44px;
  cursor: pointer; color: var(--hg-muted); font-size: 14px; line-height: 24px;
}
.hg-switch-check label::before { /* 轨道 */
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 38px; height: 20px; border-radius: 20px;
  background: #D1D5DB; transition: background .2s;
}
.hg-switch-check label::after { /* 滑块 */
  content: ""; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .2s;
}
.hg-switch-check input:checked + label::before { background: var(--hg-primary); }
.hg-switch-check input:checked + label::after { transform: translate(18px, -50%); }
/* hg-tip 紧凑变体：去掉默认左右 2px margin，与紧邻元素零间隙（用于"扫码开关+"紧挨输入框等场景，2026-08-13） */
.hg-tip--flush { margin: 0 !important; }
/* ===== 扫码数量确认浮层（快速下货扫描枪"多件"，2026-08-13）=====
   结构：mask(固定遮罩) > box(白卡) > title + input(大号数字) + actions(确定/取消)。
   扫描命中后弹出，默认 1 全选，回车=确认；输数字=一次下货多件。 */
.hg-scan-qty-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(17, 24, 39, .45);
  display: flex; align-items: center; justify-content: center;
}
.hg-scan-qty-box {
  width: 280px; background: #fff;
  border-radius: var(--hg-radius-xl);
  box-shadow: var(--hg-shadow-lg);
  padding: 24px 28px; text-align: center;
}
.hg-scan-qty-title {
  font-size: 16px; font-weight: 600; color: var(--hg-ink);
  margin-bottom: 16px;
}
.hg-scan-qty-input {
  width: 100%; box-sizing: border-box;
  text-align: center; font-size: 28px; font-weight: 700;
  padding: 8px 12px;
  border: 1px solid var(--hg-border); border-radius: var(--hg-radius);
  color: var(--hg-primary-deep); outline: none;
}
.hg-scan-qty-input:focus { border-color: var(--hg-primary); }
.hg-scan-qty-actions { display: flex; gap: 10px; margin-top: 16px; }
.hg-scan-qty-actions .hg-filter-btn { flex: 1; justify-content: center; }

/* ===================== 标签/徽章 ===================== */
.hg-badge {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: var(--hg-radius-full);
  font-size: 12px; font-weight: 500; letter-spacing: .02em;
  line-height: 1.5;
}
.hg-badge-primary { background: var(--hg-primary-soft); color: var(--hg-primary-deep); }
.hg-badge-secondary { background: var(--hg-gray); color: var(--hg-muted); }
.hg-badge-green { background: rgba(0, 102, 204, .10); color: #0052A3; }
.hg-badge-red { background: rgba(239,68,68,.10); color: #B91C1C; }
.hg-badge-blue { background: rgba(59,130,246,.10); color: #1D4ED8; }
.hg-badge-orange { background: var(--hg-orange-pale); color: var(--hg-orange-deep); }

/* 节假日徽标：日销售分析「星期」列用。纯色圆点无文字，节日名/星期/倍数走 title 悬停。
   数据源 BasHoliday 主表 + 日系数表倍数；颜色语义：红=节假日(连休) 蓝=补班(调休上班日)。
   ⚠️ min-width 不可省：全局「老布局表格内的 Label/span」那条 .hg-sales-grid td span 规则
      特异度更高且 width 带 !important，会把空内容的圆点压成 0 宽（不可见），
      min-width 不受 width 影响可兜底。（2026-09-16 同源问题另见 .hg-touch-dot） */
.hg-hol-dot {
  display: inline-block; width: 10px; min-width: 10px; height: 10px;
  border-radius: 50%; vertical-align: middle;
  cursor: help;
}
.hg-hol-rest { background: #B91C1C; }
.hg-hol-work { background: #1D4ED8; }

/* 触达方式三圆点（会员信息列表 wcXcxVip「触达方式」列）：小程序 / 公众号 / 企微，内含渠道首字。
   ⚠️⚠️ min-width:18px 不可省（同 .hg-hol-dot 的坑）：全局那条「老布局表格内的 Label/span」规则选择器为
      .hg-sales-grid td span（特异度 0,1,2，高于本类 0,1,0），它把 width 强制成 auto !important
      → 内容只有 10px（10px 字号一个汉字）、height 仍 18px → 渲染成 10×18 竖椭圆（2026-09-16 实测复现）。
      加 min-width 后实测回到 18×18 正圆；min-width 不受 width 覆盖影响，可兜底。
   ⚠️ 圆点撑宽了触达列，配套见下面 .hg-col-touch 契约（列宽 96px，否则 1080 及以下会竖排）。 */
.hg-touch-dot {
  display: inline-block; width: 18px; min-width: 18px; height: 18px;
  border-radius: 50%; color: #fff; font-size: 10px; font-weight: 600;
  text-align: center; line-height: 18px; margin-right: 4px;
  box-sizing: border-box; cursor: help;
}
.hg-touch-dot--on { background: #059669; }
.hg-touch-dot--off { background: #D1D5DB; }

/* ===================== 分隔线 ===================== */
.hg-divider {
  border: 0; height: 1px;
  background: var(--hg-border);
  margin: 24px 0;
}
.hg-divider-primary {
  height: 3px; border: 0; border-radius: 2px;
  background: var(--hg-primary);
  margin: 20px 0;
}

/* ===================== 通知/提示 ===================== */
.hg-alert {
  padding: 14px 18px; border-radius: var(--hg-radius);
  font-size: 14px; line-height: 1.5; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px;
  box-shadow: var(--hg-shadow-sm);
}
.hg-alert-info    { background: rgba(59,130,246,.08); color: #1D4ED8; }
.hg-alert-success { background: rgba(0, 102, 204, .08); color: #0052A3; }
.hg-alert-warning { background: rgba(245,158,11,.08); color: #B45309; }
.hg-alert-danger  { background: rgba(239,68,68,.08); color: #B91C1C; }

/* ===================== 加载动画 ===================== */
.hg-spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--hg-border);
  border-top-color: var(--hg-primary);
  border-radius: 50%;
  animation: hg-spin .6s linear infinite;
}
@keyframes hg-spin { to { transform: rotate(360deg); } }

/* ===================== 动画工具类 ===================== */
@keyframes hgFadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes hgSlideUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hgScaleIn   { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes hgPulse     { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

.hg-fade-in  { animation: hgFadeIn  .4s var(--hg-ease-standard) both; }
.hg-slide-up { animation: hgSlideUp .45s var(--hg-ease-spring) both; }
.hg-scale-in { animation: hgScaleIn .35s var(--hg-ease-standard) both; }
.hg-pulse    { animation: hgPulse 2s var(--hg-ease-standard) infinite; }

.hg-stagger > * { animation: hgSlideUp .45s var(--hg-ease-spring) both; }
.hg-stagger > *:nth-child(1) { animation-delay: .05s; }
.hg-stagger > *:nth-child(2) { animation-delay: .1s; }
.hg-stagger > *:nth-child(3) { animation-delay: .15s; }
.hg-stagger > *:nth-child(4) { animation-delay: .2s; }
.hg-stagger > *:nth-child(5) { animation-delay: .25s; }
.hg-stagger > *:nth-child(6) { animation-delay: .3s; }

/* ===================== 页脚（按内容卡片同样风格适配） ===================== */
.hg-footer {
  background: var(--hg-surface);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius-xl);
  box-shadow: var(--hg-shadow);
  padding: 28px 28px 22px;
  margin-top: 24px;
  text-align: center;
}
.hg-footer-inner { max-width: var(--hg-maxw); margin: 0 auto; }
.hg-footer-grid {
  display: flex; justify-content: center; gap: 64px;
  flex-wrap: wrap; margin-bottom: 24px;
}
.hg-footer-col { min-width: 120px; text-align: left; }
.hg-footer-col h4 {
  font-size: 12px; font-weight: 700; color: var(--hg-muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin: 0 0 12px;
}
.hg-footer-col a {
  display: block; font-size: 14px; color: var(--hg-faint);
  padding: 4px 0; transition: color .2s var(--hg-ease-standard);
}
.hg-footer-col a:hover { color: var(--hg-primary); }
.hg-footer-bottom {
  padding-top: 0; border-top: 0;
  font-size: 12px; color: var(--hg-faint); line-height: 1.9;
}
/* 横向一排链接（移除“产品服务/支持/欢迎语”标题后） */
.hg-footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 28px; margin-bottom: 18px;
}
.hg-footer-links a {
  font-size: 14px; color: var(--hg-muted);
  transition: color .2s var(--hg-ease-standard);
}
.hg-footer-links a:hover { color: var(--hg-primary); }
/* 备案号行（[图标]公安网备号 + 两空格 + ICP备案号）与上一行版权文字同色（用户 2026-09-15：
   「川公网安备…|蜀ICP备… 的颜色都改成 Copyright 行的颜色」）。
   原来 a 继承的是 --hg-muted(#6B7280 更深)、span 是 --hg-divider(#D1D5DB 更浅)，
   与版权行的 --hg-faint(#9CA3AF) 不一致，视觉上两行明显不同色 → 整行统一 --hg-faint。
   hover 仍保留 --hg-primary，链接可点性不变。

   分隔符：原为 <span>|</span>（margin: 0 4px）；用户 2026-09-15 改成「2 个空格」
   → HTML 侧输出 <span>&nbsp;&nbsp;</span>（U+00A0 不被 HTML 折叠）。
   🔴 两条硬规则：
   ① margin 必须为 0 —— 否则间距 = 4px + 2空格 + 4px ≈ 14px，比原来的竖线还宽，
      而用户要的是「像空格一样的分隔」，紧贴两个空格的宽度（12px 字 ≈ 6.6px）。
   ② 不用普通空格字符 —— HTML 会把连续空格折叠成 1 个；也不能用 &ensp;/&emsp;
      （固定 0.5em/1em，与字体空格宽不等，视觉上不是「两个空格」）。 */
.hg-footer-bottom a { color: var(--hg-faint); }
.hg-footer-bottom a:hover { color: var(--hg-primary); text-decoration: underline; }
.hg-footer-bottom span { color: var(--hg-faint); margin: 0; }

/* ===================== 页面容器 ===================== */
.hg-page {
  width: 100%; max-width: var(--hg-maxw); margin: 0 auto;
  padding: 28px 28px 40px;
}

/* ===================== 帮助/内容页 ===================== */
.hg-content {
  background: var(--hg-surface); border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius-xl); padding: 32px 36px;
  line-height: 1.8; box-shadow: var(--hg-shadow-sm);
}
.hg-content h1, .hg-content h2, .hg-content h3 {
  color: var(--hg-ink); margin-top: 1.2em; margin-bottom: .5em;
  font-weight: 700;
}
.hg-content h1 { font-size: 28px; text-align: center; color: var(--hg-primary-deep); }
.hg-content h2 { font-size: 22px; }
.hg-content h3 { font-size: 16px; }
.hg-content p { margin: 0 0 1em; color: var(--hg-muted); }
.hg-content strong { color: var(--hg-ink); font-weight: 600; }
.hg-content hr {
  border: 0; height: 1px; background: var(--hg-border);
  margin: 28px 0;
}

/* ===================== 工具类 ===================== */
.hg-text-center   { text-align: center; }
.hg-text-right    { text-align: right; }
.hg-text-muted    { color: var(--hg-faint); }
.hg-text-primary  { color: var(--hg-primary); }
.hg-text-sm       { font-size: 12px; }
.hg-text-lg       { font-size: 20px; }
.hg-text-xl       { font-size: 28px; }
.hg-font-bold     { font-weight: 700; }
.hg-font-medium   { font-weight: 500; }
.hg-mt-0  { margin-top: 0; }
.hg-mt-1  { margin-top: 8px; }
.hg-mt-2  { margin-top: 16px; }
.hg-mt-3  { margin-top: 24px; }
.hg-mt-4  { margin-top: 32px; }
.hg-mb-0  { margin-bottom: 0; }
.hg-mb-1  { margin-bottom: 8px; }
.hg-mb-2  { margin-bottom: 16px; }
.hg-mb-3  { margin-bottom: 24px; }
.hg-mb-4  { margin-bottom: 32px; }
.hg-gap-1 { gap: 8px; }
.hg-gap-2 { gap: 16px; }
.hg-gap-3 { gap: 24px; }
.hg-flex  { display: flex; }
.hg-flex-wrap { flex-wrap: wrap; }
.hg-items-center { align-items: center; }
.hg-justify-center { justify-content: center; }
.hg-justify-between { justify-content: space-between; }
.hg-hidden { display: none; }
.hg-sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ===================== 链接增强 ===================== */
.hg-link {
  color: var(--hg-primary); font-weight: 500;
  transition: color .2s var(--hg-ease-standard);
}
.hg-link:hover { color: var(--hg-primary-deep); text-decoration: underline; }

/* ===================== 表格美化（通用）===================== */
.hg-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.hg-table th {
  text-align: left; padding: 12px 16px;
  font-weight: 600; color: var(--hg-muted); font-size: 12px;
  letter-spacing: .04em;
  border-bottom: 2px solid var(--hg-border);
}
.hg-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--hg-border-light);
}

/* ===================== 响应式 ===================== */
@media (max-width: 1024px) {
  .hg-page { max-width: 100%; }
  /* 2026-08-21 中等屏（769-1024）顶栏左 padding 收窄到 8px，与内容贴边（#pgForm padding-left:0）对齐 */
  .hg-topbar-inner { padding: 0 8px; }
}

@media (max-width: 768px) {
  .hg-content { padding: 20px; border-radius: var(--hg-radius-lg); }
  /* 2026-08-21 用户：移动端表单字段上下排列（标签一行、输入框一行），替代横排（label 右对齐 + field 挤占）。
     影响全站 .hg-form-row 表单（新增公告/拆壳表单页等） */
  .hg-form-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .hg-form-row .hg-form-label { text-align: left; margin-right: 0; }
  .hg-form-row .hg-form-field { width: 100%; }
  .hg-footer-grid { gap: 32px; }
  .hg-footer-col { min-width: 100px; }
  .hg-content h1 { font-size: 24px; }
  .hg-content h2 { font-size: 20px; }
  .hg-footer-col { text-align: center; }
  .hg-page-title { font-size: 20px; }
  .hg-topbar-inner { padding: 0 8px; gap: 12px; }
  .hg-brand small { display: none; }
  .hg-search { max-width: 200px; }
  .hg-search-kbd { display: none; }
  .hg-topbar-user { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .hg-content { padding: 16px; }
  .hg-modal { padding: 12px; }
  .hg-modal-panel { max-height: 92vh; }
  .hg-footer-grid { gap: 20px; flex-direction: column; align-items: center; text-align: center; }
  .hg-card { padding: 18px; }
  .hg-kpi-value { font-size: 24px; }
  .hg-kpi-primary .hg-kpi-value { font-size: 28px; }
  .hg-search { display: none; }
}

@media (max-width: 480px) {
  .hg-content { padding: 14px; font-size: 14px; }
  .hg-btn { padding: 10px 16px; }
}

/* ============================================================
   HGBOX · 真实页面 (default.aspx) 主题锚点 — Donezo Dashboard 绿色
   所有真实渲染 DOM 的样式集中于此；default.aspx 与
   preview-default.html 共用本文件，避免样式漂移。
   ============================================================ */

/* 移动端遮罩 */
#mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200; display: none;
}

/* ===================== 公告悬浮信息窗口 ===================== */
.hg-modal {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: center; justify-content: center;
  padding: 32px; overflow: auto;
}
.hg-modal.hg-show { display: flex; }
.hg-modal-backdrop {
  /* 2026-08-31 absolute → fixed：遮罩相对视口全屏，避免绝对定位相对页面内容时
     贡献横向滚动（POS 折扣弹窗在 375px 视口下出现 1px 横向溢出） */
  position: fixed; inset: 0;
  background: rgba(17, 24, 39, .45);
  backdrop-filter: blur(2px);
}
.hg-modal-panel {
  position: relative;
  width: min(900px, 94vw);
  max-height: 90vh;
  margin: auto;
  background: var(--hg-surface);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius-xl);
  box-shadow: var(--hg-shadow-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  /* 2026-09-11 统一兜底：弹窗内容挂在 #pgForm(line-height:0) 下，未声明行高的
     <span>/<b>/<em> 行盒会塌成 0（文字挤成一团、带背景的标签「背景比字小」）。
     此前是逐块补（.hg-tender-hd/.rows/.sum/.ft 各自 1.45），POS 各弹窗（行卡/选赠卡/
     赠池/取单/查找/券/会员标签）仍漏。此处对弹窗壳统一恢复 1.5，子块自有声明优先。 */
  line-height: 1.5;
}
.hg-modal-close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 34px; height: 34px; line-height: 1;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.85); color: var(--hg-ink);
  font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s var(--hg-ease-standard), color .15s var(--hg-ease-standard);
}
.hg-modal-close:hover { background: var(--hg-primary); color: #fff; }
.hg-modal-frame {
  width: 100%; flex: 0 0 auto;
  border: 0; background: #fff;
  display: block;
}

/* 外壳表格 */
.hg-shell {
  width: 100%; max-width: var(--hg-maxw);
  margin: 24px auto 0;
  border: 0; border-collapse: separate; border-spacing: 0;
  background: transparent;
  table-layout: fixed;
}
.hg-shell > tbody > tr > td { vertical-align: top; }
/* 锁定第一列（左侧菜单）宽度，展开/折叠任意一级菜单时整体宽度不再变化 */
.hg-shell > tbody > tr > td:first-child {
  width: var(--hg-sidebar-w);
  min-width: var(--hg-sidebar-w);
  max-width: var(--hg-sidebar-w);
}

/* 左侧边栏 — Donezo 风格 */
#pgTool {
  width: var(--hg-sidebar-w);
  padding: 20px 16px;
  background: var(--hg-surface);
  border-right: 1px solid var(--hg-border);
  vertical-align: top;
  border-radius: var(--hg-radius-xl);
  box-shadow: var(--hg-shadow-md);
  margin-right: 20px;
}
#pgTool > table { width: 100%; }
#pgTool > table > tbody > tr > td:first-child { width: 0; padding: 0; font-size: 0; }
/* TreeView 用 nowrap 属性（非 style），必须覆盖 */
#pgTool td[nowrap] { white-space: normal !important; }
#pgTool td[style*="white-space:nowrap"] { white-space: normal !important; }

/* 左侧小标题（菜单分组） */
.hg-nav-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--hg-faint); padding: 16px 12px 6px;
}

/* 内容区 section 标题（替换 JPG 图片标题）— 深绿字 + 2px 实线绿（与 .hg-page-title--underline 一致，无渐变） */
.hg-section-title {
  display: inline-block;
  font-size: 20px; font-weight: 700; color: var(--hg-green-d);
  letter-spacing: -.01em;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--hg-primary);
}题到卡片左边框的距离一致（= 卡片 padding） */
#pgForm td:has(> .hg-section-title) {
  text-align: left !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 首页最新公告：单色小喇叭图标（替换 公告前缀.gif） */
#pgForm .hg-ann-ico {
  display: inline-block;
  width: 16px; height: 16px;
  flex: 0 0 auto;
  background-color: var(--hg-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M3%2011l11-7v14l-11-7z%27%2F%3E%3Cpath%20d%3D%27M14%208a4%204%200%200%201%200%208%27%2F%3E%3Cpath%20d%3D%27M3%2013v3a2%202%200%200%200%202%202h1%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M3%2011l11-7v14l-11-7z%27%2F%3E%3Cpath%20d%3D%27M14%208a4%204%200%200%201%200%208%27%2F%3E%3Cpath%20d%3D%27M3%2013v3a2%202%200%200%200%202%202h1%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
  vertical-align: middle;
}
#pgForm td:has(> .hg-ann-ico) {
  vertical-align: middle !important;
  padding: 0 !important;
  width: 1px;
  white-space: nowrap;
}
#pgForm tr:has(.hg-ann-ico) td { vertical-align: middle !important; }
#pgForm tr:has(.hg-ann-ico) td:has(a) { padding: 4px 0 4px 10px !important; }

/* 子页面（非首页）标题上移 + 绿色下划线（与首页一致） */
#pgForm table.hg-page-card .hg-subtitle-td {
  padding: 0 0 4px !important;
  vertical-align: top;
}
#pgForm table.hg-page-card .hg-spacer-row { display: none !important; }
#pgForm table.hg-page-card hr.hg-red-hr-hide { display: none !important; }
#pgForm table.hg-page-card hr.hg-red-hr-green {
  border: 0 !important; height: 2px !important;
  background: var(--hg-primary) !important; color: var(--hg-primary) !important;
}

/* 用户条（登录后）— 按用户要求隐藏头像/ID/数字 */
[id$="_pnUser"] {
  display: none;
}
[id$="_ImageFile"] { display: none; }
[id$="_lnkUser"] { display: none; }
[id$="_btnEmail"] { display: none; }

/* TreeView 菜单（登录后）— Donezo 风格 */
[id$="_treeJiongBoxMenus"] { display: block; }
[id$="_treeJiongBoxMenus"] > table { width: 100%; margin: 2px 0; }
#pgTool [id$="_treeJiongBoxMenus"] a[id],
#pgTool [id$="_treeJiongBoxMenus"] a[class*="treeJiongBoxMenus_0"] {
  display: flex; align-items: center; gap: 10px;
  width: 100%; box-sizing: border-box;
  padding: 11px 12px 11px 34px;
  border-radius: var(--hg-radius);
  color: var(--hg-muted); font-size: 14px; font-weight: 500; line-height: 1.35;
  transition: color .15s var(--hg-ease-standard), background .15s var(--hg-ease-standard), border-color .15s var(--hg-ease-standard);
  border-left: 3px solid transparent;
  min-width: 0;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
}
/* 菜单图标 — 单色线条（currentColor，随文字颜色自动变化：常态灰、hover 绿、选中白） */
#pgTool [id$="_treeJiongBoxMenus"] a[id]::before,
#pgTool [id$="_treeJiongBoxMenus"] a[class*="treeJiongBoxMenus_0"]::before {
  content: "";
  width: 19px; height: 19px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--hg-ico) center / contain no-repeat;
          mask: var(--hg-ico) center / contain no-repeat;
  transition: background-color .15s var(--hg-ease-standard);
}

#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-home::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M3%209l9-7%209%207v11a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2z%27%2F%3E%3Cpath%20d%3D%27M9%2022V12h6v10%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-bolt::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M13%202L3%2014h9l-1%208%2010-12h-9z%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-inbox::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M22%2012h-6l-2%203h-4l-2-3H2%27%2F%3E%3Cpath%20d%3D%27M5.45%205.11%202%2012v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6l-3.45-6.89A2%202%200%200%200%2016.76%204H7.24a2%202%200%200%200-1.79%201.11z%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-bell::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M18%208A6%206%200%200%200%206%208c0%207-3%209-3%209h18s-3-2-3-9%27%2F%3E%3Cpath%20d%3D%27M13.73%2021a2%202%200%200%201-3.46%200%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-gift::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M20%2012v10H4V12%27%2F%3E%3Cpath%20d%3D%27M2%207h20v5H2z%27%2F%3E%3Cpath%20d%3D%27M12%2022V7%27%2F%3E%3Cpath%20d%3D%27M12%207H7.5a2.5%202.5%200%200%201%200-5C11%202%2012%207%2012%207z%27%2F%3E%3Cpath%20d%3D%27M12%207h4.5a2.5%202.5%200%200%200%200-5C13%202%2012%207%2012%207z%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-box::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M16.5%209.4%207.55%204.24%27%2F%3E%3Cpath%20d%3D%27M21%2016V8a2%202%200%200%200-1-1.73l-7-4a2%202%200%200%200-2%200l-7%204A2%202%200%200%200%203%208v8a2%202%200%200%200%201%201.73l7%204a2%202%200%200%200%202%200l7-4A2%202%200%200%200%2021%2016z%27%2F%3E%3Cpath%20d%3D%27M3.27%206.96%2012%2012.01l8.73-5.05%27%2F%3E%3Cpath%20d%3D%27M12%2022.08V12%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-shop::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M6%202%203%206v14a2%202%200%200%200%202%202h14a2%202%200%200%200%202-2V6l-3-4z%27%2F%3E%3Cpath%20d%3D%27M3%206h18%27%2F%3E%3Cpath%20d%3D%27M16%2010a4%204%200%200%201-8%200%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-return::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M3%2012a9%209%200%200%201%209-9%209.75%209.75%200%200%201%206.74%202.74L21%208%27%2F%3E%3Cpath%20d%3D%27M21%203v5h-5%27%2F%3E%3Cpath%20d%3D%27M21%2012a9%209%200%200%201-9%209%209.75%209.75%200%200%201-6.74-2.74L3%2016%27%2F%3E%3Cpath%20d%3D%27M3%2021v-5h5%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-card::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M1%204h22v16H1z%27%2F%3E%3Cpath%20d%3D%27M1%2010h22%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-money::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M21%2012V7H5a2%202%200%200%201%200-4h14a2%202%200%200%201%202%202v4%27%2F%3E%3Cpath%20d%3D%27M23%2018H5a2%202%200%200%201%200-4h16%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-headset::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M3%2018v-6a9%209%200%200%201%2018%200v6%27%2F%3E%3Cpath%20d%3D%27M21%2019a2%202%200%200%201-2%202h-1a2%202%200%200%201-2-2v-3a2%202%200%200%201%202-2h3z%27%2F%3E%3Cpath%20d%3D%27M3%2019a2%202%200%200%200%202%202h1a2%202%200%200%200%202-2v-3a2%202%200%200%200-2-2H3z%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-mail::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%204h16c1.1%200%202%20.9%202%202v12c0%201.1-.9%202-2%202H4c-1.1%200-2-.9-2-2V6c0-1.1.9-2%202-2z%27%2F%3E%3Cpath%20d%3D%27M22%206l-10%207L2%206%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-tag::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M20.59%2013.41%2013.42%2020.6a2%202%200%200%201-2.83%200L2%2012V2h10l8.59%208.59a2%202%200%200%201%200%202.82z%27%2F%3E%3Cpath%20d%3D%27M7%207h.01%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-chart::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M23%206l-9.5%209.5-5-5L1%2018%27%2F%3E%3Cpath%20d%3D%27M17%206h6v6%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-gear::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M19.4%2015a1.65%201.65%200%200%200%20.33%201.82l.06.06a2%202%200%201%201-2.83%202.83l-.06-.06a1.65%201.65%200%200%200-1.82-.33%201.65%201.65%200%200%200-1%201.51V21a2%202%200%200%201-4%200v-.09A1.65%201.65%200%200%200%209%2019.4a1.65%201.65%200%200%200-1.82.33l-.06.06a2%202%200%201%201-2.83-2.83l.06-.06a1.65%201.65%200%200%200%20.33-1.82%201.65%201.65%200%200%200-1.51-1H3a2%202%200%200%201%200-4h.09A1.65%201.65%200%200%200%204.6%209a1.65%201.65%200%200%200-.33-1.82l-.06-.06a2%202%200%201%201%202.83-2.83l.06.06a1.65%201.65%200%200%200%201.82.33H9a1.65%201.65%200%200%200%201-1.51V3a2%202%200%200%201%204%200v.09a1.65%201.65%200%200%200%201%201.51%201.65%201.65%200%200%200%201.82-.33l.06-.06a2%202%200%201%201%202.83%202.83l-.06.06a1.65%201.65%200%200%200-.33%201.82V9a1.65%201.65%200%200%200%201.51%201H21a2%202%200%200%201%200%204h-.09a1.65%201.65%200%200%200-1.51%201z%27%2F%3E%3Cpath%20d%3D%27M12%2015a3%203%200%201%200%200-6%203%203%200%200%200%200%206z%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-user::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M20%2021v-2a4%204%200%200%200-4-4H8a4%204%200%200%200-4%204v2%27%2F%3E%3Cpath%20d%3D%27M12%2011a4%204%200%201%200%200-8%204%204%200%200%200%200%208z%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-exit::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M9%2021H5a2%202%200%200%201-2-2V5a2%202%200%200%201%202-2h4%27%2F%3E%3Cpath%20d%3D%27M16%2017l5-5-5-5%27%2F%3E%3Cpath%20d%3D%27M21%2012H9%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-doc::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M14%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8z%27%2F%3E%3Cpath%20d%3D%27M14%202v6h6%27%2F%3E%3Cpath%20d%3D%27M16%2013H8%27%2F%3E%3Cpath%20d%3D%27M16%2017H8%27%2F%3E%3Cpath%20d%3D%27M10%209H8%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-star::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M12%202%2015.09%208.26%2022%209.27%2017%2014.14%2018.18%2021.02%2012%2017.77%205.82%2021.02%207%2014.14%202%209.27%208.91%208.26z%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-flag::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%2015s1-1%204-1%205%202%208%202%204-1%204-1V3s-1%201-4%201-5-2-8-2-4%201-4%201z%27%2F%3E%3Cpath%20d%3D%27M4%2022v-7%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-book::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%2019.5A2.5%202.5%200%200%201%206.5%2017H20%27%2F%3E%3Cpath%20d%3D%27M6.5%202H20v20H6.5A2.5%202.0%200%200%201%204%2019.5v-15A2.5%202.5%200%200%201%206.5%202z%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-camera::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M23%2019a2%202%200%200%201-2%202H3a2%202%200%200%201-2-2V8a2%202%200%200%201%202-2h4l2-3h6l2%203h4a2%202%200%200%201%202%202z%27%2F%3E%3Cpath%20d%3D%27M12%2017a4%204%200%201%200%200-8%204%204%200%200%200%200%208z%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-music::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M9%2018V5l12-2v13%27%2F%3E%3Cpath%20d%3D%27M9%2018a3%203%200%201%201-6%200%203%203%200%200%201%206%200z%27%2F%3E%3Cpath%20d%3D%27M21%2016a3%203%200%201%201-6%200%203%203%200%200%201%206%200z%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-map::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M9%2018l-6-3v-13l6%203%206-3%206%203v13l-6-3-6%203z%27%2F%3E%3Cpath%20d%3D%27M9%209v13%27%2F%3E%3Cpath%20d%3D%27M15%2012v13%27%2F%3E%3C%2Fsvg%3E"); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-icon-cup::before { --hg-ico: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M6%209H4.5a2.5%202.5%200%200%201%200-5H6%27%2F%3E%3Cpath%20d%3D%27M18%209h1.5a2.5%202.5%200%200%200%200-5H18%27%2F%3E%3Cpath%20d%3D%27M6%202h12v7a6%206%200%200%201-12%200V2z%27%2F%3E%3Cpath%20d%3D%27M8%2022h8%27%2F%3E%3Cpath%20d%3D%27M12%2015v7%27%2F%3E%3C%2Fsvg%3E"); }

/* 二级子菜单：全部统一为同一个实心小圆点（不使用各自不同的线形图标）。
   覆盖上面通用 ::before 的 SVG mask，改为 currentColor 实心圆。
   颜色随文字变化：常态灰、hover 绿、选中白（与一级图标一致）。 */
#pgTool [id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[id]::before,
#pgTool [id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[class*="treeJiongBoxMenus_0"]::before {
  /* 2026-08-14 二级圆点最终布局（高特异性，压过任何其他规则）：
     ::before 绝对定位在 a 左 20px，6×6 实心圆，颜色 currentColor 跟随文字（常态灰、hover 绿、选中白）。
     文字由下方 a 的 padding-left:44px 统一对齐，圆点↔文字间距 18px。 */
  content: "" !important;
  position: absolute !important;
  left: 48px !important;
  top: 50% !important;
  width: 5px !important;
  height: 5px !important;
  margin-top: -2.5px !important;
  border-radius: 50% !important;
  background: currentColor !important;
  -webkit-mask: none !important;
          mask: none !important;
}
#pgTool [id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[id] img,
#pgTool [id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[class*="treeJiongBoxMenus_0"] img {
  display: none !important;
}
#pgTool [id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[id],
#pgTool [id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[class*="treeJiongBoxMenus_0"] {
  display: block;
  text-align: left !important;
  padding: 9px 12px 9px 68px;   /* 一级 padding-left:34px，二级 68px（缩进 34px） */
  font-size: 13px;
  position: relative;
  background-image: none;         /* 圆点由 ::before 绘制，禁止 background 圆点 */
}

/* TreeView 展开/折叠切换链接（内含 tree_open/tree_close 图）：
   文字链接本身即可触发展开，隐藏切换链接避免出现双图标 */
#pgTool [id$="_treeJiongBoxMenus"] a.hg-expander {
  display: none !important;
  width: 0 !important; height: 0 !important;
  padding: 0 !important; margin: 0 !important;
}
#pgTool [id$="_treeJiongBoxMenus"] a.hg-expander::before { content: none !important; }
#pgTool [id$="_treeJiongBoxMenus"] td:has(> a.hg-expander) {
  width: 0 !important; padding: 0 !important; font-size: 0 !important;
}
/* 兜底：TreeView 展开/折叠切换链接即使没有 hg-expander 类（空文字、无子元素）也强制隐藏 */
#pgTool [id$="_treeJiongBoxMenus"] a[id]:empty,
#pgTool [id$="_treeJiongBoxMenus"] a[class*="treeJiongBoxMenus_0"]:empty {
  display: none !important;
  width: 0 !important; height: 0 !important;
}
/* hover 状态 */
#pgTool [id$="_treeJiongBoxMenus"] a[id]:hover,
#pgTool [id$="_treeJiongBoxMenus"] a[class*="treeJiongBoxMenus_0"]:hover {
  color: var(--hg-primary-deep) !important;
  border-left-color: var(--hg-primary);
  background-color: var(--hg-primary-soft) !important;
}
#pgTool [id$="_treeJiongBoxMenus"] a[id]:hover::before,
#pgTool [id$="_treeJiongBoxMenus"] a[class*="treeJiongBoxMenus_0"]:hover::before { background-color: var(--hg-primary); }
#pgTool [id$="_treeJiongBoxMenus"] a[id]:active,
#pgTool [id$="_treeJiongBoxMenus"] a[class*="treeJiongBoxMenus_0"]:active { background-color: var(--hg-primary-pale) !important; }

/* 当前选中项 — Donezo 绿色背景 */
#pgTool [id$="_treeJiongBoxMenus"] a[id].hg-active,
#pgTool [id$="_treeJiongBoxMenus"] a[class*="treeJiongBoxMenus_0"].hg-active {
  background-color: var(--hg-primary) !important;
  color: #fff !important;
  border-left-color: var(--hg-primary-deep);
}
#pgTool [id$="_treeJiongBoxMenus"] a[id].hg-active:hover,
#pgTool [id$="_treeJiongBoxMenus"] a[class*="treeJiongBoxMenus_0"].hg-active:hover {
  background-color: var(--hg-primary-deep) !important;
  color: #fff !important;
  border-left-color: var(--hg-primary-deep);
}

/* 彻底隐藏 TreeView 所有节点图标/展开折叠 img，统一用 ::before 单色 SVG 图标替代。
   之前只隐藏了二级菜单 img 与 expander 内 img，导致一级叶子节点（我的账户/安全退出）
   和 NoExpandImageUrl 默认图标（images/菜单图标.gif 绿色方块）始终显示。 */
#pgTool [id$="_treeJiongBoxMenus"] img { display: none !important; }
[id$="_treeJiongBoxMenus"] a.hg-expander img { display: none !important; }
[id$="_treeJiongBoxMenus"] a[href*="doPostBack"] img { display: none !important; }

/* 父菜单箭头：始终在右侧，折叠=朝下，展开=朝上（二级菜单无箭头） */
#pgTool [id$="_treeJiongBoxMenus"] a.hg-parent {
  position: relative;
  padding-right: 36px;
}
#pgTool [id$="_treeJiongBoxMenus"] a.hg-parent::after {
  content: "";
  position: absolute;
  right: 14px; top: 50%;
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  opacity: .55;
  transition: transform .2s var(--hg-ease-standard), border-color .2s var(--hg-ease-standard), opacity .2s var(--hg-ease-standard);
  pointer-events: none;
}
#pgTool [id$="_treeJiongBoxMenus"] a.hg-parent.hg-expanded::after {
  transform: translateY(-35%) rotate(225deg);
}
#pgTool [id$="_treeJiongBoxMenus"] a.hg-parent:hover::after { opacity: 1; border-color: var(--hg-primary); }
#pgTool [id$="_treeJiongBoxMenus"] a.hg-parent.hg-active::after { opacity: 1; border-color: #fff; }

/* 子菜单：块级通栏，悬浮/选中反色覆盖整行（不再仅文字宽度）。
   2026-08-14 此段为低特异性兜底（无 #pgTool 前缀），padding/位置以高特异性段为准；
   background 圆点已废弃（圆点由 ::before 绝对定位绘制），此处禁止 background-image。 */
[id$="_treeJiongBoxMenus"] div[id$="Nodes"] table { width: 100%; }
[id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[id],
[id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[class*="treeJiongBoxMenus_0"] {
  display: block;
  text-align: left !important;
  width: 100%; box-sizing: border-box;
  padding: 9px 12px 9px 68px;
  color: var(--hg-muted); font-size: 13px; font-weight: 500;
  background-image: none !important;   /* 禁止 background 圆点，统一由 ::before 绘制 */
}
[id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[id]:hover,
[id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[class*="treeJiongBoxMenus_0"]:hover {
  color: var(--hg-primary-deep) !important;
  background-color: var(--hg-primary-soft) !important;
}

/* 登录框 — 不依赖固定 ID 前缀 */
[id$="_edtUserName"],
[id$="_edtPasswrd"] {
  width: 100% !important; max-width: 220px;
  padding: 11px 14px;
  font-size: 14px; color: var(--hg-ink);
  background: var(--hg-surface);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  outline: none;
  transition: border-color .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
  margin-bottom: 10px;
}
[id$="_edtUserName"]:focus,
[id$="_edtPasswrd"]:focus {
  border-color: var(--hg-primary) !important;
  box-shadow: 0 0 0 3px var(--hg-primary-pale) !important;
}
[id$="_chkCookie"] { accent-color: var(--hg-primary); width: 16px; height: 16px; }
[id$="_btnEnter"],
[id$="_btnGetPasswrd"],
[id$="_btnReg"] {
  height: 34px; width: auto;
  border-radius: var(--hg-radius);
  transition: transform .15s var(--hg-ease-standard), box-shadow .15s var(--hg-ease-standard);
  cursor: pointer;
}
[id$="_btnGetPasswrd"]:hover,
[id$="_btnReg"]:hover {
  transform: translateY(-1px); box-shadow: var(--hg-shadow-sm);
}
/* [id$="_btnEnter"] 已从上方 hover 规则移除（原 translateY(-1px) 让全站所有提交按钮 hover 时上移 1px，
   与选择文件等按钮 hover 只变背景的行为不一致，2026-08-10 用户反馈） */
/* 原 [id$="_btnEnter"] { filter: hue-rotate(-10deg) saturate(1.1); } 滤镜导致提交按钮颜色与选择文件不一致（2026-08-10 用户反馈），删除 */

/* 验证器提示 */
[id$="_RequiredFieldValidator1"], [id$="_RequiredFieldValidator2"], [id$="_ValidationSummary1"] {
  color: var(--hg-danger); font-size: 12px;
}

/* 主内容区 — Donezo 风格 */
#pgForm {
  padding: 0 0 0 24px;
  background: transparent;
  vertical-align: top;
  line-height: 0;            /* 2026-09-02 消除 #pgForm 顶部 22px 经典 BOM gap：#pgForm
                                是 <td>，继承 body line-height:1.55(=21.7px)，首子文本节点
                                "\ufeff\n\n" 撑出 22px 空隙使卡片标题比左侧菜单项下沉 22px。
                                ⚠️ 子元素（tr/td/.hg-page-title/.hg-filter-* 等）必须各自显式
                                声明 line-height，否则会坍塌（销售查询 GridView 已踩坑）。 */
}
/* 兜底：表格行/单元格显式恢复行高，避免继承 #pgForm line-height:0 后整张表坍塌 */
#pgForm table tr, #pgForm table th, #pgForm table td { line-height: 1.55; }
#pgForm .hg-page-title { line-height: 26px; }
#pgForm .hg-filter-label, #pgForm .hg-filter-btn { line-height: 1.55; }
/* 2026-09-12 参与盒主范围回显（满额促销「已选盒主」）；块级文字必须显式 line-height，防继承 line-height:0 坍塌重叠 */
#pgForm .hg-boxer-scope { font-size: 13px; line-height: 1.7; font-weight: 600; color: var(--hg-primary-deep); }
/* 2026-09-03 POS 端兜底（修复在线收银 KPI 值/标签/TOP10 行/收款区 label 因继承 line-height:0 坍塌叠在一行） */
#pgForm .hg-pos-kpi > div, #pgForm .hg-pos-kpi b, #pgForm .hg-pos-kpi span,
#pgForm .hg-pos-mhead, #pgForm .hg-pos-mname, #pgForm .hg-pos-mbadge, #pgForm .hg-pos-mphone, #pgForm .hg-pos-mmeta,
#pgForm .hg-pos-coupon, #pgForm .hg-pos-coupon > span, #pgForm .hg-pos-coupon > b,
#pgForm .hg-pos-coupon-link, #pgForm .hg-pos-coupon-sel, #pgForm .hg-pos-coupon-sel .lbl,
#pgForm .hg-pos-coupon-sel .val, #pgForm .hg-pos-refund, #pgForm .hg-pos-refund .hg-filter-label,
#pgForm .hg-pos-refcheck,
#pgForm .hg-pos-tags,
#pgForm .hg-pos-topbuy, #pgForm .hg-pos-topbuy-hd, #pgForm .hg-pos-topbuy-hd > i,
#pgForm .hg-pos-topbuy li, #pgForm .hg-pos-topbuy .rank, #pgForm .hg-pos-topbuy .nm, #pgForm .hg-pos-topbuy .cnt,
#pgForm .hg-pos-tender, #pgForm .hg-pos-tender .hg-tender-cell, #pgForm .hg-pos-tender .hg-tender-cell > span { line-height: 1.45; }
#pgForm > table { width: 100%; }
#pgForm > table > tbody > tr > td:first-child { padding-right: 24px; }
#pgForm > table > tbody > tr > td:first-child > table {
  width: 100%;
  background: var(--hg-surface);
  border: 0; border-radius: var(--hg-radius-xl);
  padding: 22px 24px; margin-bottom: 20px;
  box-shadow: var(--hg-shadow-md);
  transition: box-shadow .2s var(--hg-ease-standard);
}
/* 钱包查询卡片不需要阴影（自己有轻框样式） */
#pgForm table.hg-accquery { box-shadow: none !important; }
/* 子页面（非首页）右侧内容统一包裹为圆角卡片，与首页分区卡片风格一致 */
#pgForm > table.hg-page-card {
  width: 100%;
  background: var(--hg-surface);
  border: 0; border-radius: var(--hg-radius-xl);
  box-shadow: var(--hg-shadow-md);
  padding: 22px 24px; margin-bottom: 20px;
}
#pgForm > table > tbody > tr > td:first-child > table:hover { box-shadow: var(--hg-shadow-lg); }
#pgForm > table > tbody > tr > td:first-child > table tr:first-child img { display: block; margin-bottom: 16px; }
#pgForm a[href*="wcJour"] {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--hg-ink); font-size: 14px;
  padding: 5px 0;
  transition: color .15s var(--hg-ease-standard);
}
#pgForm a[href*="wcJour"]:hover { color: var(--hg-primary) !important; }
#pgForm font { color: var(--hg-primary) !important; }
#pgForm td { font-size: 14px; color: var(--hg-ink); padding: 6px 8px; }
#pgForm b { font-weight: 600; }
#pgForm div[style*="dotted"] { border-top-color: var(--hg-border) !important; }
#pgForm > table > tbody > tr > td:last-child { vertical-align: top; }
/* 仅首页右侧两个 iframe（销售直播 wcSaleHots / 我的钱包 wcAcc）走此卡片化样式。
   注意：绝不能用裸 “#pgForm iframe”——编辑对话框（活动/公告等）里的 FreeTextBox
   富文本编辑器本身就是一个 iframe，也注入在 #pgForm 内，会被误伤成无边框白底方块，
   导致“看不到文本框”。故此处必须按 src 精确限定。 */
#pgForm iframe[src*="wcSaleHots"],
#pgForm iframe[src*="wcAcc"] {
  width: 240px; max-width: 100%; height: 280px;
  border: 0; border-radius: var(--hg-radius-xl);
  display: block; margin-bottom: 16px;
  background: var(--hg-surface);
  box-shadow: var(--hg-shadow-md);
}

/* 首页新三栏布局：最新公告 / 销售直播 / 我的钱包 一行三等分，占满右侧；最新销售整行 */
.hg-home { display: flex; flex-direction: column; gap: 12px; }
.hg-home-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.hg-col {
  background: var(--hg-surface);
  border: 0; border-radius: var(--hg-radius-xl);
  box-shadow: var(--hg-shadow-md);
  padding: 22px 24px;
  min-width: 0;
  display: flex; flex-direction: column;
}
/* 懒加载列：初始隐藏（保留布局空间），数字看板渲染后显示 */
.hg-col-lazy { visibility: hidden; }
.hg-col > table { background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
/* 裸列：去掉卡片背景/阴影/圆角/内边距，内容自行控制外观（如钱包 iframe） */
.hg-col-naked { background:transparent !important; box-shadow:none !important; border-radius:0 !important; padding:0 !important; }
/* 列内的 iframe 填满卡片，去掉自身圆角/阴影（由 .hg-col 提供外观），标题位置与文字卡片一致 */
.hg-col iframe {
  width: 100% !important; flex: none; min-height: 280px; height: 280px !important;
  border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important;
  display: block; margin: 0 !important;
}
/* 首页四栏内容文字统一：同源字体栈、相同字号（与 iframe 内 13px 一致） */
.hg-col, .hg-col td, .hg-col a { font-size: 13px; }
.hg-col a[href*="wcJour"] { font-size: 13px !important; }
/* 右侧列：数字看板在上、我的钱包在下，竖向堆叠。
   2026-08-28 收窄作用域为 .hg-home（首页专用）：原裸写 .hg-col-right 会命中
   GridView 合计金额 th（类 hg-col-right hg-col-amt）→ th 被强制 display:flex + min-width:0，
   fixed 布局列宽计算被破坏 → 零售单查询桌面列不等比放大、右侧留白 525px（用户 01:25 反馈）。 */
.hg-home .hg-col-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* 店铺目标 · 数字看板 */
.hg-shopplan {
  background: var(--hg-surface);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius-xl);
  box-shadow: var(--hg-shadow-md);
  padding: 20px 22px;
}
.hg-shopplan-raw { font-size: 13px; color: var(--hg-muted); line-height: 1.9; padding: 18px 20px; }
.hg-shopplan-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 14px; }
.hg-shopplan-name { font-size: 18px; font-weight: 700; color: var(--hg-ink); }
.hg-shopplan-date { font-size: 13px; color: var(--hg-faint); }
.hg-shopplan-section { font-size: 13px; font-weight: 600; color: var(--hg-primary); margin: 6px 0 10px; letter-spacing: .02em; }
.hg-shopplan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hg-kpi {
  background: var(--hg-canvas);
  border: 1px solid var(--hg-border-light);
  border-radius: var(--hg-radius);
  padding: 12px 8px;
  text-align: center;
}
.hg-kpi-label { font-size: 13px; color: var(--hg-muted); line-height: 1.4; margin-bottom: 6px; }
.hg-kpi-value { font-size: 20px; font-weight: 400; color: var(--hg-ink); font-variant-numeric: tabular-nums; }
.hg-kpi-note { font-size: 13px; color: var(--hg-muted); margin-top: 4px; }
.hg-kpi-accent { background: var(--hg-primary-soft); border-color: var(--hg-primary-light); }
.hg-kpi-accent .hg-kpi-value { color: var(--hg-primary-deep); }
.hg-kpi-accent .hg-kpi-note { color: var(--hg-primary); font-weight: 600; }
/* KPI 数字看板：置于三列上方、单独一行、横向铺满。
   注意：间距统一由父级 .hg-home 的 flex gap 控制，此处不能再设 margin-bottom，
   否则 KPI→三栏 会比 三栏→最新销售 多出一截，造成两段间距不一致。 */
.hg-kpi-row { width: 100%; margin-bottom: 0; }
.hg-kpi-row .hg-shopplan { margin: 0; }

/* 2026-08-17 总部经营看板（wcBoxerHQ.ascx）：外层不再用 .hg-content-card（去掉"中间那层"大白底卡），
   只保留 .hg-kpi-card-wrap 的 padding 30/24/24/30 给"经营看板"标题顶部留白；
   下面 18 个 KPI（今日/会员/本月 各 6 个）每张用独立 .hg-kpi 白底卡包起来（默认样式，不覆盖）。 */
.hg-kpi-card-wrap { padding: 30px 24px 24px 30px !important; margin-bottom: 16px; }

/* 正式盒主首页销售看板（VI 设计手册卡片语言）：
   白底卡片、圆角 12px、边框 #E5E7EB、轻阴影；标签 VI 灰 #6B7280；
   数值深墨 tabular-nums；变化行涨绿跌红（涨=绿字浅绿底 / 跌=红字浅红底）；
   hover 浅绿阴影微浮起。作用域限定 .hg-sales-kpi，不影响 shopplan 等其它 hg-kpi 组件；
   间距由父级 .hg-home 的 flex gap 控制，此处不设 margin-bottom。 */
/* 2026-08-17 经营看板 KPI 区域：响应式网格——宽屏 6 列，随浏览器宽度递减为 3/2/1 列。
   每个 KPI 独立白底卡片。 */
.hg-kpi-grid.hg-sales-kpi {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}
/* 平板：一行 3 个 */
@media (max-width: 1024px) {
  .hg-kpi-grid.hg-sales-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* 手机（竖屏/横屏）：一行 2 个（2026-08-22 用户要求手机端也分列显示，不再 1 列占满整行） */
@media (max-width: 640px) {
  .hg-kpi-grid.hg-sales-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.hg-sales-kpi .hg-kpi {
  background: var(--hg-surface);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
  transition: box-shadow .18s ease, transform .18s ease;
}
.hg-sales-kpi .hg-kpi:hover {
  box-shadow: 0 8px 24px rgba(0, 102, 204, .14);
  transform: translateY(-2px);
}
.hg-sales-kpi .hg-kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--hg-muted);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-align: center;
}
.hg-sales-kpi .hg-kpi-value {
  font-size: 26px;
  font-weight: 400;
  color: var(--hg-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.hg-sales-kpi .hg-kpi-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--hg-radius-full);
  line-height: 1.6;
}
.hg-sales-kpi .hg-kpi-change.up { color: var(--hg-primary-deep); background: var(--hg-primary-soft); }
.hg-sales-kpi .hg-kpi-change.down { color: #DC2626; background: #FEF2F2; }
/* 移动端：字体/间距微调（列数由上方 6→3→2→1 响应式规则控制，2026-08-17 移除旧的强制单列） */
@media (max-width: 768px) {
  .hg-sales-kpi .hg-kpi { padding: 12px 14px; }
  .hg-sales-kpi .hg-kpi-value { font-size: 22px; }
  .hg-sales-kpi .hg-kpi-label { font-size: 12px; }
  .hg-sales-kpi .hg-kpi-change { font-size: 11px; padding: 1px 7px; }
}

/* 最新销售表格：表头居中+浅灰底；文本列（商品名称/店铺/销量/销售日期）内容居中；
   金额列（单价/销售额/提成后收入）标题居中、金额右对齐；列宽随浏览器自适应；
   行间隔仅一条黑色线；无横向滚动条 */
.hg-sales, .hg-col.hg-sales { overflow-x: hidden; }
.hg-sales table { width: 100%; border-collapse: collapse; table-layout: auto; }
#pgForm .hg-sales table th,
#pgForm .hg-sales table td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #E6E8EB; white-space: normal; overflow-wrap: anywhere; }
/* 列间竖线分隔（与行分隔线同色 #E6E8EB）；最右列不加竖线避免悬空（首页卡片无外边框） */
#pgForm .hg-sales table th:not(:last-child),
#pgForm .hg-sales table td:not(:last-child) { border-right: 1px solid #E6E8EB; }
/* 表头行（VI 手册之外的表格样式）：浅灰底、标题居中、文字同钱包灰；灰底只落表头，不波及数据行 */
#pgForm .hg-sales table thead th,
#pgForm .hg-sales table tbody tr:first-child > th { font-weight: 700; text-align: center; background: #f3f4f6; color: var(--hg-muted); }
#pgForm .hg-sales table td { color: var(--hg-muted); text-align: left; }
/* 金额列（单价/销售额/提成后收入）右对齐、销量居中；列宽随浏览器自适应，无横向滚动条 */
#pgForm .hg-sales table td:nth-child(3) { text-align: center; }
#pgForm .hg-sales table td:nth-child(4),
#pgForm .hg-sales table td:nth-child(5),
#pgForm .hg-sales table td:nth-child(6) { text-align: right; }
#pgForm .hg-sales table tbody tr:last-child td { border-bottom: 0; }
/* 首页「最新销售」表格：与报表页表格一致，整表圆角 + 隐藏溢出，使灰表头四角圆润
   （border-collapse 必须是 separate，collapse 会让 border-radius 失效） */
#pgForm .hg-wallet-mod .hg-sales table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--hg-radius);
  overflow: hidden;
}
/* 原模板自带的虚线分隔行：隐藏，避免与分隔线叠加成双线 */
.hg-sales table tr:has(div[style*="dotted"]) > td { border: 0 !important; padding: 0 !important; }
.hg-sales table tr:has(div[style*="dotted"]) div[style*="dotted"] { display: none !important; }
.hg-sales table td:nth-child(1),
.hg-sales table td:nth-child(2),
.hg-sales table td:nth-child(3),
.hg-sales table td:nth-child(7) { text-align: center; }
.hg-sales table td:nth-child(4),
.hg-sales table td:nth-child(5),
.hg-sales table td:nth-child(6) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap !important; overflow-wrap: normal; }
/* 鼠标悬停行反色 */
.hg-sales table tr:not(:first-child):not(:nth-child(2)):hover > td { background: var(--hg-primary); color: #ffffff !important; }
.hg-sales table tr:not(:first-child):not(:nth-child(2)):hover > td a { color: #ffffff !important; }
.hg-sales table tr:not(:first-child):not(:nth-child(2)):hover > td .hg-amt-dec { color: #ffffff !important; }
/* 金额拆行：默认整段一行；窄屏下整数一行、小数点及分数另起一行，各自均不换行 */
.hg-sales table td .hg-amt-int,
.hg-sales table td .hg-amt-dec { white-space: nowrap; }
.hg-sales table td .hg-amt-dec { color: #6b7280; }

/* 首页「最新公告 / 最新销售」模块：复用「我的钱包」(forms/wcAcc) 的绿色主题。
   全部使用站点既有变量（= 我的钱包 实际使用的颜色），不新增任何硬编码色值：
   标题绿   = --hg-primary-deep (#0052A3，与我的钱包标题一致)
   下划线/链接绿 = --hg-primary      (#0066CC，与我的钱包链接/下划线一致)
   卡片白底 = --hg-surface    (#FFFFFF)
   描边     = --hg-border     (#E5E7EB，≈ 我的钱包 #E6E8EB)
   正文     = --hg-secondary-light (#374151)
   次级文字 = --hg-muted      (#6B7280)
   标题字   = --hg-ink        (#111827) */
.hg-wallet-mod {
  background: var(--hg-surface);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  box-shadow: var(--hg-shadow-sm);
  padding: 18px 20px 20px;
  margin: 0 0 12px;
}
.hg-wallet-mod > tbody > tr:first-child td { padding-top: 0; padding-left: 0; }
.hg-wallet-title {
  display: inline-block;
  font-size: 20px; font-weight: 700;
  color: var(--hg-primary-deep);
  letter-spacing: -.01em;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--hg-primary);
}
/* 首页卡片标题去掉绿色下划线：VI 手册外表格不应在表头上方出现分隔线，与报表页一致 */
.hg-wallet-mod .hg-wallet-title { border-bottom: 0; padding-bottom: 0; }
.hg-wallet-mod, .hg-wallet-mod td { color: var(--hg-secondary-light); font-size: 13px; line-height: 1.9; }
.hg-wallet-mod a { color: var(--hg-primary); text-decoration: none; }
.hg-wallet-mod a:hover { color: var(--hg-primary-deep); text-decoration: underline; }

/* 销售查询 GridView 表格：与首页“最新销售”表格完全一致
   注：本表位于 #pgForm 内，#pgForm td 默认规则会覆盖普通选择器，故全部加 #pgForm 前缀以保证优先级 */
#pgForm .hg-table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 销售查询 — 筛选栏（干净筛选条：浅灰底、大圆角、标签左置）
   关键属性全部 !important：原生 <select> 一旦 appearance 未生效会回退成系统控件，
   忽略圆角/阴影、并显示自带箭头/滚动条；故 appearance:none（含 -moz-）与圆角/阴影都必须 !important
   日期范围框统一白底（初始/选定后/聚焦均为 #fff，与 VI .hg-input 基准一致） */
.hg-date-range,
.hg-date,
.hg-date-time,
.hg-filter-input {
  width: 230px; max-width: 100%;
  padding: 8px 14px;
  font-family: var(--hg-font); font-size: 14px; color: var(--hg-ink) !important;
  background: #fff !important; border: 1px solid var(--hg-border) !important;
  border-radius: var(--hg-radius) !important;
  outline: none; cursor: pointer;
  transition: border-color .2s var(--hg-ease-standard), background .2s var(--hg-ease-standard);
}
/* 2026-08-15 日期控件全局缩小：宽 230→190、内边距 8/14→6/12、字号 14→13（用户要求"稍微缩小一点"） */
.hg-date-range,
.hg-date,
.hg-date-time {
  width: 190px;
  padding: 6px 12px;
  font-size: 13px;
}
.hg-filter-input { width: 170px; cursor: text; }
.hg-date-range:hover,
.hg-date:hover,
.hg-date-time:hover,
.hg-filter-input:hover { background: #fff !important; border-color: var(--hg-border) !important; }
.hg-date-range:focus,
.hg-date:focus,
.hg-date-time:focus,
.hg-filter-input:focus { background: #fff !important; border-color: var(--hg-primary) !important; }
.hg-date-range::placeholder { color: var(--hg-faint); }

/* ===== flatpickr 全局绿色主题（所有页面统一配色，无需每页内联） =====
   站点每个用到 flatpickr 的 dlgform 都通过 <link> 引入 flatpickr.min.css（默认蓝 #569ff7）。
   本段放在全局主题里，所有页面（销售明细查询、销售查询等）调用 flatpickr 都自动套用，统一为绿色 UI：
   - 选中的「开始 / 结尾」= 深绿 (#0052A3)
   - 区间「中间」= 中性灰（不染绿、不染蓝）
   全部 !important 以压过 flatpickr.min.css 的默认蓝，不受样式加载顺序影响。 */
.flatpickr-calendar {
  border-radius: var(--hg-radius);
  box-shadow: 0 10px 28px rgba(17,24,39,.18);
  border: 1px solid #E5E7EB;
  font-family: var(--hg-font);
}
/* 移动端（≤768px）日期面板自适应视口：日期范围选择器已降为单月，单月面板默认约 307px，
   在 320px 窄屏（iPhone SE 等）仍可能略超，这里允许整体压缩且不超出视口 */
@media (max-width: 768px) {
  .flatpickr-calendar {
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 16px) !important;
  }
  .flatpickr-calendar .flatpickr-innerContainer,
  .flatpickr-calendar .flatpickr-rContainer,
  .flatpickr-calendar .flatpickr-days,
  .flatpickr-calendar .dayContainer {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .flatpickr-calendar .dayContainer {
    display: flex !important;
    flex-wrap: wrap !important;
  }
  .flatpickr-calendar .dayContainer .flatpickr-day {
    flex: 1 0 14.2857% !important;
    max-width: 14.2857% !important;
    box-sizing: border-box;
  }
}
.flatpickr-day { border-radius: var(--hg-radius-xs); color: #374151; }
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus {
  background: #0052A3 !important;
  border-color: #0052A3 !important;
  color: #fff !important;
  box-shadow: none !important;
}
/* 区间中间保持中性灰（不染绿/蓝），与深绿端点形成对比 */
.flatpickr-day.inRange,
.flatpickr-day.prevMonthDay.inRange,
.flatpickr-day.nextMonthDay.inRange,
.flatpickr-day.today.inRange,
.flatpickr-day.prevMonthDay.today.inRange,
.flatpickr-day.nextMonthDay.today.inRange {
  background: #F3F4F6 !important;
  border-color: #E5E7EB !important;
  color: #374151 !important;
  box-shadow: none !important;
}
/* 连接端点与中间日的桥接阴影也用灰，避免蓝色露出 */
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
  -webkit-box-shadow: -10px 0 0 #F3F4F6 !important;
  box-shadow: -10px 0 0 #F3F4F6 !important;
}
.flatpickr-day.today { border-color: #0052A3 !important; }
.flatpickr-day:hover { background: #E5E7EB !important; border-color: #E5E7EB !important; }
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay { color: #B0B7C0; }
.flatpickr-day.startRange,
.flatpickr-day.endRange { border-radius: var(--hg-radius-xs); }
.flatpickr-day.selected.startRange,
.flatpickr-day.startRange.startRange,
.flatpickr-day.endRange.startRange { border-radius: 50px 0 0 50px; }
.flatpickr-day.selected.endRange,
.flatpickr-day.startRange.endRange,
.flatpickr-day.endRange.endRange { border-radius: 0 50px 50px 0; }
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg { fill: #0052A3 !important; }
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover { color: #0052A3 !important; }
.flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.flatpickr-current-month input.cur-year:focus { background: #F3F4F6 !important; }
.numInputWrapper:hover { background: #F3F4F6 !important; }

/* 筛选栏容器（filter-bar/label/btn 已统一至下方全局定义，此处仅补充独有变体） */
.hg-filter-bar-secondary { padding-top: 0; margin-bottom: 8px; gap: 8px; }
.hg-filter-bar-tertiary { padding-top: 0; margin-bottom: 8px; gap: 8px; }
.hg-filter-actions { display: flex; align-items: center; gap: 10px; }
/* ===== 设置类页面（诊断推送设置 wcDiagSet 等） ===== */
.hg-set-intro { margin: 4px 0 16px; padding: 12px 16px; background: var(--hg-primary-soft); border: 1px solid var(--hg-border); border-radius: 10px; color: var(--hg-muted); font-size: 13px; line-height: 1.7; }
.hg-set-form { flex-wrap: wrap; }
.hg-set-section-title { margin: 20px 0 10px; font-weight: 700; font-size: 14px; line-height: 20px; color: var(--hg-primary-deep); }
.hg-set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 20px; }
.hg-set-item { padding: 10px 14px; background: #fff; border: 1px solid var(--hg-border); border-radius: 10px; }
.hg-set-hint { color: var(--hg-muted); font-size: 12px; margin-left: 6px; }
/* 2026-09-12：独立成块的 hint（div.hg-set-hint，区别于行内 span）必须显式 line-height，
   否则继承 #pgForm{line-height:0} 行盒坍塌 → 文字重叠（诊断推送设置页实测踩坑） */
div.hg-set-hint { line-height: 1.7; margin: 8px 0 0 6px; }
.hg-set-msg { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: var(--hg-primary-soft); border: 1px solid var(--hg-primary); color: var(--hg-primary-deep); font-size: 13px; line-height: 1.6; }
.hg-input--time { width: 90px; text-align: center; }
.hg-input--wide { width: 260px; }
/* 商品收货处理表格：鼠标悬停行时，上货/修改/取消三按钮反色（白底、绿字、绿边；排除页脚/分页行） */
#pgForm .hg-sales-grid.hg-cl-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover .hg-filter-btn-primary {
  background: #fff !important;
  color: var(--hg-primary) !important;
  border-color: var(--hg-primary) !important;
}
#pgForm .hg-sales-grid { width: 100%; border-collapse: collapse; table-layout: auto; border: 1px solid #E6E8EB; border-radius: var(--hg-radius); overflow: hidden; background: #fff; }
#pgForm .hg-sales-grid th,
#pgForm .hg-sales-grid td { font-family: var(--hg-font); padding: 10px 12px; font-size: 13px; color: var(--hg-muted); border-bottom: 1px solid #E6E8EB; border-right: 1px solid #E6E8EB; white-space: normal !important; overflow-wrap: anywhere; font-weight: 400 !important; }
/* 表头：<thead> 标准渲染 + <tbody> 回退（ASP.NET GridView 在 tbody 内渲染表头行）。
   手册 §3.2 要求选择器同时兼容 tr:first-child > th 与 tr:first-child > td */
#pgForm .hg-sales-grid thead tr > th,
#pgForm .hg-sales-grid thead tr > td,
#pgForm .hg-sales-grid tbody:first-child tr:first-child > th,
#pgForm .hg-sales-grid tbody:first-child tr:first-child > td { font-weight: 700 !important; text-align: center; background: #f3f4f6; color: var(--hg-muted); white-space: normal !important; }

#pgForm .hg-sales-grid.hg-sticky-head {
  overflow: clip; /* 取消滚动容器、不建立 sticky 包含块，同时按 border-radius 裁剪内容 */
}
#pgForm .hg-sales-grid.hg-sticky-head thead th,
#pgForm .hg-sales-grid.hg-sticky-head tbody:first-child tr:first-child > th {
  position: sticky;
  top: var(--hg-topbar-h);
  z-index: 50;
  background: #f3f4f6 !important;
  box-shadow: 0 1px 0 #E6E8EB;
}
/* 表格第一数据行（排除表头/footer/pager/summary）去加粗+黑色：
   2014 .cs Grd_RowDataBound 给 RowIndex==0 加 Font-Bold + ForeColor=#000（inline style 优先级最高，
   普通 CSS !important 盖不住）。统一为全站规范的灰色 #6B7280，与其他行一致。
   有 <thead> 时 tbody 第一行 = 第一数据行（hgBuildNewThead 已建 thead 触发此场景）；
   无 thead 时 tbody 第一行 = 表头(th)，> td 不匹配 th，安全。
   子元素 inline color（如金额涨跌红绿、链接主题绿）不受父 td !important 影响，保留特殊色。 */
#pgForm .hg-sales-grid tbody tr:first-of-type:not(.hg-grid-footer):not(.hg-grid-pager):not(.hg-grid-summary) > td {
  font-weight: 400 !important;
  color: var(--hg-muted) !important;
}
/* 商品档案（.hg-prod-grid）：悬浮表头表格不包 .hg-table-scroll 容器（容器 overflow 会破坏 sticky 吸顶），
   故移动端列宽无法走 .hg-mobile-fit 规则，需独立适配。列宽值与 .hg-mobile-fit 商品列表等价：
   编码/金额 64px(min48)、结算方式 64px(min48)、状态 48px(min40)、名称/操作列弹性。 */
@media (max-width: 768px) {
  /* 2026-08-14 商品档案移动端列宽：已由全局移动端列宽契约（hg-col-*）统一接管，本段不再覆盖列宽。
     2026-08-26：商品名称列随全局移动契约 name 60/60（原 auto/0 弹性特例已删，fixed 下 auto 塌至 11px）。 */
}
/* 2026-08-14 已删除全局 nth-child 列规则（1547-1569 行历史残留）：
   这些规则按 DOM 位置选中所有 .hg-sales-grid 的第 2/3/4/5-8 列，用 #pgForm(ID 特异性 1,1,1)
   压过 .hg-col-*(0,2,1) 语义类的 min-width（盒主 70→20px、名称 60→40px），
   导致店铺收货处理等表格"最窄宽度不是 min-width"。
   所有表格已由 classifyTable(default.aspx) 注入 hg-col-* 语义类，对齐/宽度/换行
   由下方 1955-2094 行全局契约完整管理；wcRptSaleBill 也已弃用 nth-child（JS 重排会错位）。
   金额列换行改由 JS(hgWrapMoney) 注入 <wbr> 处理。 */
.hg-num-int { white-space: nowrap; }
.hg-num-frac { white-space: nowrap; }
/* 数据行悬停反色（排除页脚行、分页行） */
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover > td { background: #e6f2fa !important; color: var(--hg-primary) !important; }
/* hover 行内子元素（链接/内联色 span/font）也变蓝（用户要求"选中行文字蓝字"），避免白字看不清 */
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover > td * { color: var(--hg-primary) !important; }
/* 2026-08-31 复选框选中的行（点击行首 checkbox，GridView SelectedRowStyle 是 inline 白字）：
# 用 :has() 选中 + !important 强制把内联白字覆盖为蓝字，背景保留 GridView 浅蓝 */




/* 页脚“本页合计” */
#pgForm .hg-sales-grid .hg-grid-footer td { font-weight: 700; background: var(--hg-primary-soft); color: var(--hg-primary-deep); border-bottom: 0; }
/* 空数据提示行（GridView EmptyDataText，2026-08-26 上货查询等） */
#pgForm .hg-sales-grid .hg-grid-empty td { text-align: center !important; color: var(--hg-muted); padding: 28px 12px !important; font-size: 13px; }
/* 汇总行（“本页合计” / “总计” 等）：销量(5)/销售金额(7)/提成后收入(8) 右对齐 */
#pgForm .hg-sales-grid tr.hg-grid-footer td:nth-child(5),
#pgForm .hg-sales-grid tr.hg-grid-footer td:nth-child(7),
#pgForm .hg-sales-grid tr.hg-grid-footer td:nth-child(8),
#pgForm .hg-sales-grid tr.hg-grid-summary td:nth-child(5),
#pgForm .hg-sales-grid tr.hg-grid-summary td:nth-child(7),
#pgForm .hg-sales-grid tr.hg-grid-summary td:nth-child(8) {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: normal !important;
}
/* 在线销售（wcSale）合计行：销售数量是第 4 列，全局只对齐了 5/7/8，此处按页补齐。
   列序 0序号 1商品编码 2商品名称 3销售数量(→nth-child 4) 4单价 5折扣 6优惠 7实收金额 8操作 */
#pgForm .hg-sales-grid.hg-sale-grid tr.hg-grid-footer td:nth-child(4) {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: normal !important;
}
/* 零售单查询合计行「汇总单数」（2026-09-05）：销售单号列放单数，居中、等宽数字、主色强调 */
#pgForm .hg-sales-grid tr.hg-grid-footer td.hg-foot-cnt,
#pgForm .hg-sales-grid tr.hg-grid-summary td.hg-foot-cnt {
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  white-space: normal !important;
  color: var(--hg-primary);
}
/* 分页行（JS 规范化前后兜底） */
#pgForm .hg-sales-grid .hg-grid-pager td { text-align: center; color: var(--hg-muted); background: transparent; }
/* JS hgNormalizePager() 把页码重建为 flex 容器：统一间距，彻底消除 ASP.NET 默认分页
   在页码间生成的不对称空占位 <td>/&nbsp; 间隙；只有当前页（直接子 <span>）高亮为绿色。 */
#pgForm .hg-sales-grid .hg-pager-wrap {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 4px;
}
#pgForm .hg-sales-grid .hg-pager-wrap > a,
#pgForm .hg-sales-grid .hg-pager-wrap > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 6px 8px;
  border-radius: var(--hg-radius-sm);
  text-align: center;
  text-decoration: none;
  background: #f3f4f6;
  color: var(--hg-muted);
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
}
#pgForm .hg-sales-grid .hg-pager-wrap > a:hover,
#pgForm .hg-sales-grid .hg-pager-wrap > .hg-pg-link:hover {
  background: var(--hg-primary);
  color: #ffffff;
}
/* 当前页：JS 显式打 .hg-pg-current（服务端把“当前页”渲染成无链接的 <span> 时）。
   只有它染主色，不再“所有 span 都绿”，避免把被误渲染成 <span> 的其它页码也染绿。 */
#pgForm .hg-sales-grid .hg-pager-wrap > .hg-pg-current {
  background: var(--hg-primary);
  color: #ffffff;
  cursor: default;
}
/* 禁用导航（«  »  … 等）：灰色、不可点、淡化 */
#pgForm .hg-sales-grid .hg-pager-wrap > .hg-pg-disabled {
  background: transparent;
  color: var(--hg-muted);
  cursor: default;
  opacity: .45;
}
/* 链接内嵌套的 span 不继承高亮 */
#pgForm .hg-sales-grid .hg-pager-wrap > .hg-pg-link span,
#pgForm .hg-sales-grid .hg-pager-wrap > a span {
  background: transparent;
  color: inherit;
}

/* 页脚（由 wcBar.ascx 输出 .hg-footer）
   页脚 td 为 colspan=2，跨过左侧菜单列，宽度=侧边栏+内容区之和（与上方全部栏同宽）；
   桌面/手机均保留圆角 */
.hg-shell > tbody > tr:last-child td { padding: 0; }
.hg-shell > tbody > tr:last-child td .hg-footer {
  border-radius: var(--hg-radius-xl);
  margin-top: 24px;
}

/* ====== 响应式 ====== */
/* 中等屏：三栏仍等比缩小（grid minmax 已处理）；更窄时堆叠为三行 */
@media (max-width: 1024px) {
  .hg-shell { max-width: 100%; margin-top: 16px; }
}

/* 老布局根表格（table.hg-legacy-filter）撑满右侧面板：统一由全局 #pgForm > table { width:100% }（上方 L1118）
   负责，各页无需重复声明（2026-08-13 清理：原 putprodquery/myprod/downqk 三条 width:100% 均被全局覆盖属冗余，
   其中 putprodquery 已改 div 卡片布局、table 规则为死代码；专属类名保留，仅作页面专属覆盖的作用域锚点）。 */
/* 窄屏：首页三栏纵向堆叠为三行 */
@media (max-width: 880px) {
  .hg-home-row { grid-template-columns: 1fr; }
}

/* 2026-08-15 销售查询（wcSaleQuery 等 .hg-rpt-page 报表根 table）：
   桌面端同样需要 width:100% + table-layout:fixed + display:table，
   否则外层 table 默认 width:auto 会被内部 GridView（带 border+border-radius）撑宽，
   视觉上"表格跑出 .hg-content-card 白底卡片"（之前只有 @media 768 内的规则，桌面端不生效） */
#pgForm > div.hg-content-card > table.hg-rpt-page,
#pgForm > div.hg-content-card > table.hg-boxsale-page {
  display: table !important;
  table-layout: fixed !important;
  width: 100% !important;
}
#pgForm > div.hg-content-card > table.hg-rpt-page > tbody,
#pgForm > div.hg-content-card > table.hg-boxsale-page > tbody { display: table-row-group !important; }
#pgForm > div.hg-content-card > table.hg-rpt-page > tbody > tr,
#pgForm > div.hg-content-card > table.hg-boxsale-page > tbody > tr { display: table-row !important; }
#pgForm > div.hg-content-card > table.hg-rpt-page > tbody > tr > td,
#pgForm > div.hg-content-card > table.hg-boxsale-page > tbody > tr > td { display: table-cell !important; width: 100% !important; }


/* ============================================================
   中等屏（769~1024px）：左侧菜单折叠为汉堡抽屉，表格占满内容区
   （原 768 断点的抽屉机制上移到 1024，解决中等屏表格被 240px 菜单列挤压；
     2026-08-21，配合 default.aspx JS isMobile 判断 768→1024）
   ============================================================ */
@media (max-width: 1024px) {
  .hg-menu-toggle { display: block; }
  /* 2026-08-21 中等屏/移动端内容贴边：覆盖全局 #pgForm padding-left:24px（移动段另有完整 padding 声明，源序在后，需各自改 left） */
  #pgForm { padding-left: 0; }
  /* 顶栏高于遮罩(200)与展开菜单(210)，保证汉堡按钮始终可点 */
  .hg-topbar { z-index: 250; }
  /* 解除 pgTool 列 240px 锁定：内容区占满全宽（table-layout:fixed 下 width/min/max 全清）
     2026-08-21 修复：选择器收紧到 tr:first-child（只针对菜单行的第一 td 折叠为 0 宽）；
     原 tr > td:first-child 会误伤每个 tr 的第一 td（包括页脚 tr 的合并 td=0 宽→页脚容器被挤成内容宽、链接每字一行竖排） */
  .hg-shell > tbody > tr:first-child > td:first-child { width: 0 !important; min-width: 0 !important; max-width: 0 !important; padding: 0 !important; }
  /* 修复 Edge 的 fixed 列分配 bug：td1 置 0 后 td2 只分到 50% 空间，显式 width:100% 让内容区真正占满 */
  .hg-shell > tbody > tr > td:nth-child(2) { width: 100%; }
  /* 2026-08-27 用户截 955 视口：登录态下第一列 td 被某段（hg-prelogin fallback 或 line:870 var(--hg-sidebar-w)=240px 残留）
     挤成 ~50% 宽度，内容卡片视觉偏左、表格列被严重压缩（销售金额 ¥92.00 断成两行）。
     这里防御式加固第二列 td：用 !important 三件套（width:100% + min-width:0 + max-width:100%）覆盖任何残留
     的 table-cell 宽度限制（包括 prelogin fallback / InProc session 失效回退 / devtools 视口元数据异常）。
     保留 display:table-cell 与 hg-shell 桌列布局兼容——display:block 会破坏桌列布局，仅用三件套足以撬开父锁。 */
  .hg-shell > tbody > tr:first-child > td:nth-child(2) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #pgTool {
    position: fixed; top: var(--hg-topbar-h); left: 0; bottom: 0;
    width: 82% !important; max-width: 300px !important;
    background: var(--hg-surface); overflow: auto;
    z-index: 90; padding: 16px;
    border-right: 1px solid var(--hg-border);
    transform: translateX(-105%);
    transition: transform .3s var(--hg-ease-standard);
    box-shadow: var(--hg-shadow-lg);
    border-radius: 0;
  }
  #pgTool.hg-open { transform: translateX(0); z-index: 210; }
  /* 未登录（中等屏/移动）：登录表单流式显示，不弹遮罩、不自动展开抽屉。
     同时必须恢复 td 宽度（上面 width:0 会把登录表单容器也压成 0）。
     2026-08-27 修复：原 width:100% !important + line:1772 第二列 width:100%
     在 table-layout:fixed 下被等分 50/50 → 内容卡片视觉偏左 ~50%。
     改为 display:block 让第一列 td 脱离 table 列分配、流式占第一行；
     第二列 td 保持 table-cell + line:1772 width:100% 占第二行（即登录表单下方的内容区）。
     同时把登录表单外的 #pgTool 实际内容走 transform/width=0 隐藏，仅靠 #pgForm 内的 fallback 登录表单（如果存在）兜底——
     实测 default.aspx JS 在 isMobile && prelogin 时把登录表单直接挂在第一列 td 内显示（见 default.aspx:124-134），
     该容器由 prelogin 段靠边沿：position:static 不再 fixed、box-shadow 清掉。 */
  /* 同时把第二列 td 折叠为 0（原 line:1772 width:100% 让 login/prelogin 都走 100%，与 prelogin 第一列 100% 在
     table-layout:fixed 下被等分 50/50、内容卡片视觉偏左 ~50%。prelogin 时第二列没内容可显，干脆隐藏）。 */
  body.hg-prelogin .hg-shell > tbody > tr > td:nth-child(2) { display: none !important; }
  body.hg-prelogin .hg-shell > tbody > tr:first-child > td:first-child { width: 100% !important; min-width: 0 !important; max-width: 100% !important; padding: 0 !important; }
  body.hg-prelogin .hg-menu-toggle { display: none; }
  /* 把 prelogin #pgTool 全部加 !important（覆盖通用段 line:1773 max-width:300px !important）。 */
  body.hg-prelogin #pgTool {
    position: static !important; transform: none !important;
    width: 100% !important; max-width: 100% !important;
    z-index: auto !important; box-shadow: none !important; border-radius: 0 !important; margin: 0 !important;
    border-right: 0 !important;
  }
}

/* 2026-08-28 移动端未登录页也展示轮播广告：
   上面 prelogin 段把第二列（#pgForm）整体隐藏了（移动端只留登录框），轮播会一起看不见。
   这里让第二列以 block 流式出现在登录框下方（display:block 可避开 table-layout:fixed 的 50/50 等分问题），
   并继续隐藏里面的公告表格，保持原有「移动端未登录只给登录框」的体验，只是多一张广告图。 */
@media (max-width: 1024px) {
  /* 769~1024 区间 .hg-shell 仍是 display:table，td 直接改 block 会塌成 0 宽；
     所以把 shell/tbody/tr 一并流式化，两列 td 都变块级上下排列（登录框在上、轮播在下）。
     仅对 body.hg-prelogin（未登录）生效，不影响已登录后的任何布局。 */
  body.hg-prelogin .hg-shell,
  body.hg-prelogin .hg-shell > tbody,
  body.hg-prelogin .hg-shell > tbody > tr { display: block !important; width: 100% !important; }
  /* 必须用与上面 prelogin 段【相同】的 :nth-child 选择器：那条是 (0,3,4) 且带 !important，
     若这里写成 td（(0,2,4)）特异度更低，会被它的 display:none 反向覆盖。同特异度 + 源序靠后才生效。 */
  body.hg-prelogin .hg-shell > tbody > tr > td:nth-child(1),
  body.hg-prelogin .hg-shell > tbody > tr > td:nth-child(2) {
    display: block !important; width: 100% !important; min-width: 0 !important; max-width: 100% !important; padding: 0 !important;
  }
  /* 2026-08-29 轮播已移进这张 table（作为 .hg-banner-row），不能再整表隐藏，
     否则移动端轮播也会消失；改为只隐藏公告行，保留轮播行。 */
  body.hg-prelogin #pgForm > table > tbody > tr:not(.hg-banner-row) { display: none; }
}

@media (max-width: 768px) {
  .hg-menu-toggle { display: block; }
  /* 移动端：顶栏必须高于遮罩(200)，否则汉堡按钮被遮罩盖住、菜单展开后无法再次点击收起。
     同时高于展开后的侧边菜单(210)，保证顶栏始终可点。低于公告弹窗(300)不受影响。 */
  .hg-topbar { z-index: 250; }
  .hg-sales table td .hg-amt-int,
  .hg-sales table td .hg-amt-dec { display: block; }
  .hg-shell,
  .hg-shell > tbody,
  .hg-shell > tbody > tr,
  .hg-shell > tbody > tr > td { display: block; width: 100% !important; }
  /* 防报表表格撑破整页：table→block 后 width:auto 会取内容 min-width 而超出视口，
     连带把站点页脚（关于我们等 colspan=2 的 td）一起撑宽、视觉错位到表格上方。
     强制 shell 占满视口；报表根卡片 table-layout:fixed 不随内容撑开；
     表格横向滚动仍由内部 .hg-table-scroll(overflow-x:auto) 处理。 */
  .hg-shell { width: 100% !important; }
  #pgForm { min-width: 0; }
  #pgForm > table.hg-page-card { table-layout: fixed; width: 100% !important; }
  /* 页脚 td(colspan=2) 也是其所在行的 :first-child，需解除侧边栏 260px 的 min/max 锁定，才能占满整宽 */
  .hg-shell > tbody > tr > td:first-child { min-width: 0 !important; max-width: 100% !important; }
  #pgTool {
    position: fixed; top: var(--hg-topbar-h); left: 0; bottom: 0;
    width: 82% !important; max-width: 300px !important;
    background: var(--hg-surface); overflow: auto;
    z-index: 90; padding: 16px;
    border-right: 1px solid var(--hg-border);
    transform: translateX(-105%);
    transition: transform .3s var(--hg-ease-standard);
    box-shadow: var(--hg-shadow-lg);
    border-radius: 0;
  }
  #pgTool.hg-open { transform: translateX(0); z-index: 210; }
  /* 未登录（移动端）：登录表单直接流式显示，不弹灰色遮罩、不自动展开抽屉。
     body.hg-prelogin 由 default.aspx 在未检测到登录态时添加。 */
  body.hg-prelogin .hg-menu-toggle { display: none; }
  /* 把 prelogin #pgTool 全部加 !important（覆盖通用段 line:1773 max-width:300px !important）。 */
  body.hg-prelogin #pgTool {
    position: static !important; transform: none !important;
    width: 100% !important; max-width: 100% !important;
    z-index: auto !important; box-shadow: none !important; border-radius: 0 !important; margin: 0 !important;
    border-right: 0 !important;
  }
  /* 移动端遮罩 #mask 的 z-index=200；展开菜单必须高于它，否则遮罩的半透明黑底压在菜单上
     （视觉灰显）并拦截点击（菜单项点不动）。菜单置于遮罩之上、顶栏之下(250)。 */
  #pgForm { padding: 16px 0 0 0; }
  #pgForm > table > tbody > tr > td:first-child { padding-right: 0; }
  #pgForm > table,
  #pgForm > table > tbody,
  #pgForm > table > tbody > tr,
  #pgForm > table > tbody > tr > td { display: block; width: 100% !important; }
  /* 报表页根 table：移动端恢复 table 布局，避免被上面 #pgForm > table{display:block}
     破坏 table-layout:fixed，导致整页横向溢出、站点页脚(colspan=2)上浮到报表上方。
     仅作用于带 .hg-rpt-page / .hg-boxsale-page 的报表根 table，首页等其它页面不受影响。 */
  #pgForm > table.hg-rpt-page,
  #pgForm > table.hg-boxsale-page,
  /* 2026-08-13 销售查询外包 .hg-content-card 后根 table 不再直接子元素，需额外匹配 */
  #pgForm > div.hg-content-card > table.hg-rpt-page {
    display: table !important;
    table-layout: fixed !important;
    width: 100% !important;
  }
  #pgForm > table.hg-rpt-page > tbody,
  #pgForm > table.hg-boxsale-page > tbody,
  #pgForm > div.hg-content-card > table.hg-rpt-page > tbody { display: table-row-group !important; }
  #pgForm > table.hg-rpt-page > tbody > tr,
  #pgForm > table.hg-boxsale-page > tbody > tr,
  #pgForm > div.hg-content-card > table.hg-rpt-page > tbody > tr { display: table-row !important; }
  #pgForm > table.hg-rpt-page > tbody > tr > td,
  #pgForm > table.hg-boxsale-page > tbody > tr > td,
  #pgForm > div.hg-content-card > table.hg-rpt-page > tbody > tr > td { display: table-cell !important; width: 100% !important; }
  /* 首页嵌套表（公告/最新销售）在窄屏强制 fixed+100%，防止 7 列表把整页撑宽、连带页脚(colspan=2)错位到上方；
     报表页的 GridView 是 .hg-sales-grid，已用 :not() 排除，不受影响 */
  #pgForm td > table:not(.hg-sales-grid) { table-layout: fixed; width: 100% !important; }
  .hg-col { display: block; }
  .hg-col iframe { flex: none; height: 320px !important; }
  [id$="_edtUserName"],
  [id$="_edtPasswrd"] { max-width: 100%; }
  .hg-shell > tbody > tr:last-child td { padding-left: 0; }
  .hg-shell > tbody > tr:last-child td .hg-footer { margin-top: 16px; }
  /* 销售查询：窄屏下表单字段纵向堆叠、输入框占满宽度（只作用于外层表单 table，不影响内部 GridView） */
  table.hg-salequery > tbody,
  table.hg-salequery > tbody > tr,
  table.hg-salequery > tbody > tr > td { display: block; width: 100% !important; }
  table.hg-salequery > tbody > tr > td { padding: 4px 0; }
  table.hg-salequery input[type="text"],
  table.hg-salequery .hg-date-range,
  table.hg-salequery .hg-filter-input { width: 100% !important; max-width: 100%; box-sizing: border-box; }
  .hg-cselect-wrap { display: block; }
  /* 移动端下拉菜单：跟随 trigger 宽度展开（width:auto 由定位逻辑按最宽选项撑开 + minWidth=trigger 宽），
     不再强制 100vw 全屏——原 width:100%!important（position:fixed 下=视口全宽）压过定位逻辑的 width:auto，
     菜单从 trigger 处铺满整屏、右缘溢出，且大范围盖住下方按钮造成视觉"重叠错乱"；
     max-width 兜底防右缘溢出（配合定位逻辑的左移修正）。 */
  .hg-cselect-menu { width: auto !important; max-width: calc(100vw - 16px) !important; }
  /* 移动端：筛选栏竖排 + 所有条件（标签/下拉/勾选框/按钮）左对齐并占满整行。
     必须 !important：全局桌面 .hg-filter-bar/.hg-filter-group(1280/1633 行) 与部分页
     内联 <style> 在源序上位于本媒体查询之后，会以其 align-items:center 覆盖此处 stretch，
     导致移动端控件不撑满、看似“没变化”。加 !important 后统一压过桌面/内联规则。 */
  .hg-filter-bar { flex-direction: column !important; align-items: stretch !important; gap: 5px; }
  .hg-filter-group { flex-direction: column !important; align-items: stretch !important; gap: 5px; }
  .hg-filter-label { align-self: flex-start !important; text-align: left !important; }
  .hg-checkbox, .hg-radio { align-self: flex-start !important; text-align: left !important; }
  .hg-filter-group .hg-date,
  .hg-filter-group .hg-date-time,
  .hg-filter-group .hg-date-range,
  .hg-filter-group input[type="text"] { width: 100%; box-sizing: border-box; }
  /* 防御：筛选栏内直接放置的文本框 / 原生下拉也充满整行（不局限于 .hg-filter-group 内） */
  .hg-filter-bar input[type="text"],
  .hg-filter-bar-2 input[type="text"],
  /* 2026-08-23 修复：hg-native-select--shop/--cashier 等桌面变体带 max-width:280px/220px，
     移动端只设 width:100% 没覆盖 max-width → 下拉最多 280px 不占满整行。此处强制 max-width:100%。
     2026-08-23 页记录数(pagesize)也改为移动端整行显示（删除原 96px 小宽限制，用户要求）。 */
  .hg-filter-group select.hg-native-select { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
  .hg-cselect-wrap { display: block !important; width: 100% !important; }
  .hg-cselect-trigger { width: 100% !important; }
  /* 2026-08-15 修复：hgInitInputClear 把 .hg-input 包进 .hg-input-wrap(inline-block)，
     之前 1784 行 width:100% 只作用在 input 上，被 inline-block wrap 卡死。
     这里强制 wrap 撑满 group 内 100%，input 在 wrap 内 100%，解决 wcPutProd 商品名称/单价/数量不占满整行 */
  .hg-filter-group .hg-input-wrap { display: block !important; width: 100% !important; }
  .hg-filter-group .hg-input-wrap .hg-input { width: 100% !important; box-sizing: border-box; }
  /* 库存查询（.hg-stockquery）「库存数量」范围组：
   第一行 label "库存数量"（自然宽度、独占一行），
   第二行 cselect + input 各占 50% 同行平分。
   :has 选择"含 cselect-wrap 紧接 input-wrap 子项"的 group，仅命中此模式不波及其他组。
   2026-08-16 v3：label 第一行独占、cselect/input 第二行平分。 */
  .hg-filter-group:has(> .hg-cselect-wrap + .hg-input-wrap) {
    flex-wrap: wrap !important;
  }
  .hg-filter-group:has(> .hg-cselect-wrap + .hg-input-wrap) > .hg-filter-label {
    flex: 0 0 100% !important;          /* label 独占整行 */
    width: auto !important;
  }
  .hg-filter-group:has(> .hg-cselect-wrap + .hg-input-wrap) > .hg-cselect-wrap,
  .hg-filter-group:has(> .hg-cselect-wrap + .hg-input-wrap) > .hg-input-wrap {
    flex: 1 1 calc(50% - 4px) !important;  /* 第二行平分（-4px 预留 gap）*/
    min-width: 0 !important;
    max-width: 100% !important;
  }
  /* 覆盖 .hg-cselect--shop/--pagesize 桌面段 width:auto!important（源序在媒体查询之后、特异度相同）造成的移动端下拉不撑满；
     用更高特异度强制移动端所有筛选下拉占满整行、整体靠左；所有筛选条件（含标签/勾选框）统一左对齐 */
  .hg-filter-bar .hg-cselect-trigger,
  .hg-filter-bar-2 .hg-cselect-trigger { width: 100% !important; }
  /* 移动端：去掉店铺/页记录数/年度下拉桌面段的 max-width 上限（如 .hg-cselect--shop 的 300px），
     否则即使 width:100% 撑满也会被 max-width 截断成定宽、右侧留空，看似“没占满整行”。
     同时用同等 !important 压过可能残留的 width:auto（桌面段已去掉 !important，这里双保险） */
  .hg-cselect--shop,
  .hg-cselect--pagesize,
  .hg-cselect--year { width: 100% !important; max-width: 100% !important; }
  .hg-filter-bar, .hg-filter-bar-2 { text-align: left !important; }
  /* 移动端隐藏列（hg-mobile-hide）：display:none 之外必须 width:0 + padding:0——
     table-layout:fixed 下隐藏列槽仍按 CSS width 占位（如 hg-cl-grid 表格），
     会把可见列挤窄/撑出横向滚动（2026-08-27 由 wcStockQuery 页面规则迁移为全局通用） */
  .hg-sales-grid th.hg-mobile-hide,
  .hg-sales-grid td.hg-mobile-hide {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
  }
  /* 2026-08-14 移动端统一列宽契约（用户确认，全站生效）：
     由 商品档案(hg-prod-grid)/我的商品(hg-myprod)/快速上货(hg-qk) 的页面专属规则提炼统一，
     全站同名 hg-col-* 列在移动端使用同一套 width/min-width。
     页面级专属行为（对齐方向/换行/操作列按钮）仍保留在各自页面段。
     2026-08-14 移动端表格 td 收紧 padding（10px12px→8px6px，用户确认"padding 太宽"）：
     全局 1516 行 padding:10px 12px 每列左右空 24px，移动端数字/内容被挤；
     收紧后内容区扩大，列宽契约无需为此加宽，全站移动端受益。
     注意：本行必须在此 media 内定义（特异性同 1516，源序靠后压过）。 */
  #pgForm .hg-sales-grid th,
  #pgForm .hg-sales-grid td { padding: 8px 6px !important; }
  .hg-sales-grid th[class*="hg-col-"],
  .hg-sales-grid td[class*="hg-col-"] { width: auto !important; min-width: 0 !important; }
  .hg-sales-grid th.hg-col-code,   .hg-sales-grid td.hg-col-code   { width: 56px !important; min-width: 40px !important; }
  /* billno 移动契约加 #pgForm 前缀提特异性（0,1,2,0）压过桌面段 L2258 同特异性 95px（源序靠后） */
  #pgForm .hg-sales-grid th.hg-col-billno,
  #pgForm .hg-sales-grid td.hg-col-billno { width: 56px !important; min-width: 40px !important; }
  .hg-sales-grid th.hg-col-barcode, .hg-sales-grid td.hg-col-barcode { width: 40px !important; min-width: 40px !important; }
  .hg-sales-grid th.hg-col-shop,   .hg-sales-grid td.hg-col-shop   { width: 48px !important; min-width: 32px !important; }
  .hg-sales-grid th.hg-col-boxer,  .hg-sales-grid td.hg-col-boxer  { width: 48px !important; min-width: 32px !important; }
  .hg-sales-grid th.hg-col-name,   .hg-sales-grid td.hg-col-name   { width: 60px !important; min-width: 60px !important; }
  .hg-sales-grid th.hg-col-num,    .hg-sales-grid td.hg-col-num    { width: 26px !important; min-width: 26px !important; }
  .hg-sales-grid th.hg-col-applicant, .hg-sales-grid td.hg-col-applicant { width: 56px !important; min-width: 40px !important; }
  /* 手机号列（全局 hg-col-phone）：移动端 64/50，11 位号码一行显示不溢出（2026-08-21 用户全局指定桌面 140/80） */
  .hg-sales-grid th.hg-col-phone, .hg-sales-grid td.hg-col-phone { width: 64px !important; min-width: 50px !important; }
  .hg-sales-grid th.hg-col-amt,    .hg-sales-grid td.hg-col-amt    { width: 56px !important; min-width: 44px !important; }
  .hg-sales-grid th.hg-col-pct,    .hg-sales-grid td.hg-col-pct    { width: 48px !important; min-width: 48px !important; }
  /* 商品数徽章列（hg-col-cnt，2026-09-06 用于类别品牌促销聚合显示） */
  .hg-sales-grid th.hg-col-cnt,    .hg-sales-grid td.hg-col-cnt    { width: 60px !important; min-width: 48px !important; text-align:center; }
  .hg-cnt-pill { display:inline-block; min-width:28px; padding:2px 10px; border-radius:10px; background:#E8F1FC; color:#0066CC; font-weight:600; font-size:13px; }
  .hg-sales-grid th.hg-col-date,   .hg-sales-grid td.hg-col-date   { width: 56px !important; min-width: 56px !important; }
  .hg-sales-grid th.hg-col-time,   .hg-sales-grid td.hg-col-time   { width: 80px !important; min-width: 75px !important; }
  .hg-sales-grid th.hg-col-tag,    .hg-sales-grid td.hg-col-tag    { width: 44px !important; min-width: 36px !important; }
  .hg-sales-grid th.hg-col-status, .hg-sales-grid td.hg-col-status { width: 48px !important; min-width: 40px !important; }
  .hg-sales-grid th.hg-col-jstype, .hg-sales-grid td.hg-col-jstype { width: 56px !important; min-width: 44px !important; }
  .hg-sales-grid th.hg-col-stock,  .hg-sales-grid td.hg-col-stock  { width: 40px !important; min-width: 28px !important; }
  .hg-sales-grid th.hg-col-qty,    .hg-sales-grid td.hg-col-qty    { width: 48px !important; min-width: 40px !important; }
  .hg-sales-grid th.hg-col-check,  .hg-sales-grid td.hg-col-check  { width: 60px !important; min-width: 50px !important; }
  .hg-sales-grid th.hg-col-inv,    .hg-sales-grid td.hg-col-inv    { width: 44px !important; min-width: 32px !important; }
  .hg-sales-grid th.hg-col-text,   .hg-sales-grid td.hg-col-text   { width: auto !important; min-width: 64px !important; }
  .hg-sales-grid th.hg-col-center, .hg-sales-grid td.hg-col-center { width: 55px !important; min-width: 55px !important; }
  /* 移动端：表格内 input 撑满列宽（原各页专属，统一到全局） */
  .hg-sales-grid td input { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
  /* 2026-08-14 移动端统一隐藏策略（用户确认，全站生效）：
     序号/选择列 (hg-col-idx) 与图片列 (hg-col-img) 默认隐藏，优先保留核心数据列。
     页面级专属覆盖（hg-myprod/hg-qk/hg-prod-grid 等）特异性更高，仍优先于本通用规则。 */
  .hg-sales-grid th.hg-col-idx,
  .hg-sales-grid td.hg-col-idx,
  .hg-sales-grid th.hg-col-img,
  .hg-sales-grid td.hg-col-img { display: none !important; }
/* 首页"最新销售"（VI 手册外的表格）：移动端隐藏单价/提成后收入 */
#pgForm .hg-sales table th.hg-mobile-hide,
#pgForm .hg-sales table td.hg-mobile-hide { display: none !important; }
}
/* 2026-08-15 销售查询（.hg-salequery）：≤1024 隐藏「店铺/单价/提成后收入」3 个非核心列
   （原 768 段，2026-08-27 从 ascx 页内 1024 段迁移升级——中等屏也隐藏，剩 4 列），
   让 7 列收缩为 4 列（编码/名称/销量/金额） */
@media (max-width: 1024px) {
  #pgForm .hg-salequery th.hg-mobile-hide,
  #pgForm .hg-salequery td.hg-mobile-hide { display: none !important; }
}
/* 2026-08-27 修复括号错位屎山：以下规则原泄漏在 @media 块外（全端生效），收进 768 段。
   基础 .hg-table-scroll（L1454）本就是 overflow-x:auto，桌面无回归。 */
@media (max-width: 768px) {
  .hg-filter-actions { margin-left: 0; flex-direction: column; gap: 8px; }
  .hg-filter-actions .hg-filter-btn { width: 100%; box-sizing: border-box; }
  .hg-table-scroll { min-height: 0; }
  #pgForm .hg-table-scroll .hg-sales-grid { min-width: 0; }
  #pgForm .hg-table-scroll { overflow-x: auto !important; }
  /* 2026-08-28 名称列去弹性列后：移动端恢复 auto 布局（fixed 下 name 60px 固定会右侧留白 470px+），
     name 内容自适应撑开、表格充满（与去掉 hg-col-flex 前行为一致） */
  #pgForm .hg-salequery .hg-sales-grid.hg-cl-grid.hg-table-fixed { table-layout: auto !important; width: 100% !important; }
}
/* 2026-08-27 销售查询页面专属规则从 ascx <style> 迁入全局（页内 CSS 屎山清理）：
   ① 桌面 fixed 布局（原 ascx L104）
   ② 中等屏 769-1024 放弃 fixed 改 auto 充满（原 ascx L120-131，用户 928 视口反馈右侧留白：
      fixed 下 4 可见列契约和 349 < 容器 862，右侧空白 520px） */
#pgForm .hg-salequery .hg-sales-grid.hg-table-fixed { table-layout: fixed !important; width: 100% !important; }
@media (min-width: 769px) and (max-width: 1024px) {
  /* 加 .hg-cl-grid 提特异性（0,1,4,0），压过全局 sticky-head 段 L4430 的 table-layout:fixed（0,1,3,0） */
  #pgForm .hg-salequery .hg-sales-grid.hg-cl-grid.hg-table-fixed { table-layout: auto !important; width: 100% !important; }
  #pgForm .hg-salequery .hg-sales-grid th,
  #pgForm .hg-salequery .hg-sales-grid td { padding: 8px 6px !important; }
  #pgForm .hg-salequery .hg-sales-grid th[class*="hg-col-"],
  #pgForm .hg-salequery .hg-sales-grid td[class*="hg-col-"] { width: auto !important; min-width: 0 !important; }
  /* 中等屏列宽下限（防过窄）：与 768 段契约一致 */
  #pgForm .hg-salequery .hg-sales-grid th.hg-col-code { width: 56px !important; min-width: 40px !important; }
  #pgForm .hg-salequery .hg-sales-grid th.hg-col-billno { width: 95px !important; min-width: 54px !important; }
  #pgForm .hg-salequery .hg-sales-grid th.hg-col-num { width: 48px !important; min-width: 40px !important; }
  #pgForm .hg-salequery .hg-sales-grid th.hg-col-amt { width: 56px !important; min-width: 44px !important; }
  /* 名称列：2026-08-28 去页面弹性列（hg-col-flex）后，中等屏与全局 hg-col-name 一致（80/52 固定，不再 auto 吸收剩余）。
     保留 .hg-cl-grid 提特异性，压过上方 th[class*="hg-col-"] 的 width:auto 重置 */
  #pgForm .hg-salequery .hg-sales-grid.hg-cl-grid th.hg-col-name,
  #pgForm .hg-salequery .hg-sales-grid.hg-cl-grid td.hg-col-name { width: 80px !important; min-width: 52px !important; }
}
/* ===== 零售单查询（.hg-salebill，2026-08-28 从 ascx 页内 <style> 迁入全局）=====
   注意：本页由 LoadControl 动态加载，**其实在 #pgForm 内**（所有 dlgforms 控件都在 #pgForm td 里）；
   root 带 hg-salequery 类会命中销售查询特例段（含中等屏 auto），故本页用 .hg-salebill 前缀
   声明专属规则（同特异性源序靠后压过特例段）。列对齐由 JS hgReorderRow 运行时打类。

   2026-08-28b：用户截图 1280 桌面又出问题——7 列挤在 ~300px、右侧大片留白。
   根因：所有 `#pgForm .hg-cl-grid/.hg-table-fixed/.hg-sticky-head` 全局 fixed/100% 规则
   在 .hg-salebill（不在 #pgForm 内）下完全不命中 → grid table-layout:auto + 表格宽=内容宽。
   以下 7 条为 salebill 专用全局兜底（与 #pgForm 段互补，确保 grid 撑满 root container）。 */
.hg-salebill { display: table !important; table-layout: fixed !important; width: 100% !important; }
.hg-salebill > tbody { display: table-row-group !important; }
.hg-salebill > tbody > tr { display: table-row !important; }
.hg-salebill > tbody > tr > td { display: table-cell !important; width: 100% !important; }
.hg-salebill .hg-sales-grid { display: table !important; table-layout: fixed !important; width: 100% !important; min-width: 0 !important; border-collapse: collapse !important; }
.hg-salebill .hg-sales-grid th.hg-col-right,
.hg-salebill .hg-sales-grid td.hg-col-right { text-align: right !important; font-variant-numeric: tabular-nums; }
/* 销售单号：不折行 + min 20px；单据时间：min 20px */
.hg-salebill .hg-sales-grid th.hg-col-billid,
.hg-salebill .hg-sales-grid td.hg-col-billid { white-space: nowrap; min-width: 20px; }
.hg-salebill .hg-sales-grid th.hg-col-date,
.hg-salebill .hg-sales-grid td.hg-col-date { min-width: 20px; }
/* 店铺：允许随宽度换行（长店名不溢出） */
.hg-salebill .hg-sales-grid th.hg-col-shop,
.hg-salebill .hg-sales-grid td.hg-col-shop { white-space: normal !important; overflow-wrap: anywhere; word-break: break-word; }
/* 折叠列（标价/优惠/现金/银行卡/会员卡/积分抵扣）：JS hgReorderRow 加 hg-col-detail 并移末尾隐藏。
   display:none 之外必须 width:0——fixed 布局下隐藏列槽仍按 CSS width 占位（width:auto 会吸走剩余空间
   导致可见列不等比放大、表格右侧隐形留白；2026-08-28 由零售单查询 1280 留白定位，与全局 hg-mobile-hide 处理一致） */
.hg-salebill .hg-sales-grid .hg-col-detail { display: none !important; width: 0 !important; min-width: 0 !important; padding: 0 !important; }
/* 2026-08-28b：salebill 不在 #pgForm 内，全局 .hg-col-billid / .hg-col-shop 等裸类裸写
   也只是 fallback（hg-col-shop 全局 78/55 命中，但 salebill 自己的 .hg-salebill 段缺声明）——
   此处显式声明 7 列桌面契约，避免被全局 #pgForm 之外的兄弟规则带偏或漏命中 */
.hg-salebill .hg-sales-grid th.hg-col-billid, .hg-salebill .hg-sales-grid td.hg-col-billid { width: 110px !important; min-width: 90px; }
.hg-salebill .hg-sales-grid th.hg-col-date,   .hg-salebill .hg-sales-grid td.hg-col-date   { width: 165px !important; min-width: 150px; white-space: nowrap !important; }
.hg-salebill .hg-sales-grid th.hg-col-shop,   .hg-salebill .hg-sales-grid td.hg-col-shop   { width: 90px !important; min-width: 70px; }
.hg-salebill .hg-sales-grid th.hg-col-name,   .hg-salebill .hg-sales-grid td.hg-col-name   { width: 90px !important; min-width: 70px; }
.hg-salebill .hg-sales-grid th.hg-col-center, .hg-salebill .hg-sales-grid td.hg-col-center { width: 80px !important; min-width: 60px; }
.hg-salebill .hg-sales-grid th.hg-col-amt,    .hg-salebill .hg-sales-grid td.hg-col-amt    { width: 115px !important; min-width: 95px; }
/* 中等屏（769-1024）覆盖：本页 root 带 hg-salequery 类，会被 L2055 销售查询特例
   `table-layout:auto` 劫持（列按内容挤爆：销售单号 56px、合计 56px、右侧留白）。
   本页 JS 已物理移除折叠列 + pager colSpan=7，fixed 布局 7 列契约可直接等比放大撑满；
   同特异性 (0,1,4,0)、源序靠后 → 压过 L2055。 */
@media (min-width: 769px) and (max-width: 1024px) {
  #pgForm .hg-salebill .hg-sales-grid.hg-cl-grid.hg-table-fixed { table-layout: fixed !important; width: 100% !important; }
  #pgForm .hg-salebill .hg-sales-grid th[class*="hg-col-"],
  #pgForm .hg-salebill .hg-sales-grid td[class*="hg-col-"] { width: auto !important; min-width: 0 !important; }
  #pgForm .hg-salebill .hg-sales-grid th.hg-col-billid,
  #pgForm .hg-salebill .hg-sales-grid td.hg-col-billid { width: 120px !important; min-width: 95px; }
  #pgForm .hg-salebill .hg-sales-grid th.hg-col-date,
  #pgForm .hg-salebill .hg-sales-grid td.hg-col-date { width: 180px !important; min-width: 165px; white-space: nowrap !important; }
  #pgForm .hg-salebill .hg-sales-grid th.hg-col-shop,
  #pgForm .hg-salebill .hg-sales-grid td.hg-col-shop { width: 95px !important; min-width: 70px; }
  #pgForm .hg-salebill .hg-sales-grid th.hg-col-name,
  #pgForm .hg-salebill .hg-sales-grid td.hg-col-name { width: 95px !important; min-width: 70px; }
  #pgForm .hg-salebill .hg-sales-grid th.hg-col-center,
  #pgForm .hg-salebill .hg-sales-grid td.hg-col-center { width: 85px !important; min-width: 60px; }
  #pgForm .hg-salebill .hg-sales-grid th.hg-col-amt,
  #pgForm .hg-salebill .hg-sales-grid td.hg-col-amt { width: 125px !important; min-width: 95px; }
}
/* 移动端（≤768）压缩：固定列总和 ≈ 250px（375 容器 - 边距 ≈ 309，避免横滚）。
   折叠列已经 vip/guide display:none，但列槽仍占位——必须配 width:0 让 fixed 布局正确计算；中等屏同理。 */
@media (max-width: 768px) {
  .hg-salebill .hg-sales-grid th.hg-col-billid, .hg-salebill .hg-sales-grid td.hg-col-billid { width: 100px !important; min-width: 80px; }
  .hg-salebill .hg-sales-grid th.hg-col-date,   .hg-salebill .hg-sales-grid td.hg-col-date   { width: 130px !important; min-width: 120px; }
  .hg-salebill .hg-sales-grid th.hg-col-shop,   .hg-salebill .hg-sales-grid td.hg-col-shop   { width: 56px !important; min-width: 48px; }
  .hg-salebill .hg-sales-grid th.hg-col-name,   .hg-salebill .hg-sales-grid td.hg-col-name   { width: 80px !important; min-width: 60px; }
  .hg-salebill .hg-sales-grid th.hg-col-center, .hg-salebill .hg-sales-grid td.hg-col-center { width: 64px !important; min-width: 48px; }
  .hg-salebill .hg-sales-grid th.hg-col-amt,    .hg-salebill .hg-sales-grid td.hg-col-amt    { width: 95px !important; min-width: 80px; }
}
/* 表头灰底（JS hgBuildNewThead 重建 thead 后生效；.hg-cl-grid tr:first-child 全局已染灰，此处兜底带 white-space） */
.hg-salebill .hg-sales-grid thead th { background: #f3f4f6; font-weight: 700; text-align: center; color: #374151; white-space: normal !important; }
/* 数据行第一行绝不被全局 tr:first-child 规则染灰 */
.hg-salebill .hg-sales-grid tbody tr:first-child > td { background: transparent !important; font-weight: 400 !important; color: var(--hg-ink) !important; }
/* 行 hover 高亮（仅可点击行 data-hg-row） */
.hg-salebill .hg-sales-grid tbody tr[data-hg-row]:hover > td { background: var(--hg-primary) !important; color: #ffffff !important; }
.hg-salebill .hg-sales-grid tbody tr[data-hg-row]:hover > td .hg-num-frac { color: #ffffff !important; }
.hg-salebill .hg-sales-grid tbody tr[data-hg-row] { cursor: pointer; }
/* 页脚合计行高亮 */
.hg-salebill .hg-sales-grid tr.hg-grid-footer td { font-weight: 700; background: var(--hg-primary-soft); color: var(--hg-primary-deep); border-bottom: 0; }
/* 合计金额列：整数/小数整段同色（对齐销售查询「销售金额」版式，小数不灰化） */
.hg-salebill .hg-sales-grid td.hg-amt-total .hg-num-int,
.hg-salebill .hg-sales-grid td.hg-amt-total .hg-num-frac { color: inherit !important; }
/* 弹窗里的金额同样按整数/小数分段（窄屏小数换行） */
.hg-detail-v.amount .hg-num-int,
.hg-detail-v.amount .hg-num-frac { white-space: nowrap; }
/* 2026-09-15 弹窗金额数字统一蓝色：小数段不再灰化（#6b7280），跟随 .hg-detail-v.amount 的 #0052A3 */
.hg-detail-v.amount .hg-num-frac { color: inherit; }
@media (max-width: 768px) {
  .hg-detail-v.amount .hg-num-frac { display: block; }
  .hg-salebill .hg-sales-grid td.hg-amt .hg-num-frac { display: block; }
}
/* 手机端再收起「会员卡/导购员」两列（类定位，不依赖 nth-child），靠弹窗看完整信息 */
@media (max-width: 640px) {
  .hg-salebill .hg-sales-grid th.hg-col-vip, .hg-salebill .hg-sales-grid td.hg-col-vip,
  .hg-salebill .hg-sales-grid th.hg-col-guide, .hg-salebill .hg-sales-grid td.hg-col-guide { display: none !important; }
}
/* 自定义下拉：顶部搜索框（cselect 组件通用，由 hgInitCustomSelects 注入） */
.hg-cselect-search { position: sticky; top: 0; z-index: 1; padding: 2px 4px 6px; margin: 0 0 2px; background: #fff; border-bottom: 1px solid #F3F4F6; list-style: none; }
.hg-cselect-search-input { width: 100%; box-sizing: border-box; padding: 7px 10px; font-size: 13px; font-family: var(--hg-font); color: var(--hg-ink); background: #fff; border: 1px solid var(--hg-border); border-radius: var(--hg-radius-sm); outline: none; }
.hg-cselect-search-input:focus { background: #fff; border-color: var(--hg-primary); }
/* ===== 单据「明细」弹窗（2026-08-28 从 wcRptSaleBill 页内迁入全局，通用组件）===== */
.hg-detail-overlay { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: none; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.hg-detail-overlay.is-open { display: flex; }
.hg-detail-card { width: 100%; max-width: 440px; max-height: 84vh; overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(17,24,39,.28); font-family: var(--hg-font); }
.hg-detail-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #EEF1F4; background: #fff; border-radius: 18px 18px 0 0; }
.hg-detail-title { font-size: 16px; font-weight: 700; color: var(--hg-ink); }
.hg-detail-sub { font-size: 12px; color: var(--hg-faint); margin-top: 2px; }
.hg-detail-close { flex: none; width: 30px; height: 30px; border: none; border-radius: var(--hg-radius-sm); background: #fff; color: var(--hg-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.hg-detail-close:hover { background: #fff; color: var(--hg-ink); }
/* 2026-08-28 零售单详情穿透按钮：白底蓝框蓝字（outline），按下反色为蓝底白字 */
.hg-detail-link { flex: none; border: 1px solid #0066CC; background: #fff; color: #0066CC; font-size: 13px; font-family: var(--hg-font); padding: 5px 14px; border-radius: 8px; cursor: pointer; line-height: 1.4; white-space: nowrap; }
.hg-detail-link:hover { background: #EBF3FC; }
.hg-detail-link:active { background: #0066CC; color: #fff; border-color: #0066CC; }
.hg-detail-section { padding: 4px 18px 14px; }
.hg-detail-section + .hg-detail-section { border-top: 1px solid #F3F4F6; }
.hg-detail-sec-title { font-size: 12px; font-weight: 600; color: var(--hg-primary); letter-spacing: .04em; margin: 12px 0 6px; }
.hg-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.hg-detail-item { display: flex; flex-direction: column; gap: 2px; }
/* 2026-09-08 兜底：#pgForm{line-height:0}（消除首屏 22px BOM gap）会从祖先级继承到弹窗子元素，
   使 .hg-detail-item/.hg-detail-k/.hg-detail-v 行间坍塌成 2px，整个弹窗文字挤一行重叠。
   弹窗不在「表格行/单元格」里，前面 1224 行的 line-height 兜底救不到，单独恢复行高。 */
.hg-detail-overlay .hg-detail-item,
.hg-detail-overlay .hg-detail-k,
.hg-detail-overlay .hg-detail-v,
.hg-detail-overlay .hg-detail-sec-title,
.hg-detail-overlay .hg-detail-title,
.hg-detail-overlay .hg-detail-sub { line-height: 1.5; }
.hg-detail-item.full { grid-column: 1 / -1; }
.hg-detail-k { font-size: 12px; color: var(--hg-faint); }
.hg-detail-v { font-size: 14px; color: var(--hg-ink); font-variant-numeric: tabular-nums; word-break: break-all; }
.hg-detail-v.amount { font-weight: 600; color: #0052A3; }
@media (max-width: 480px) {
  .hg-detail-overlay { align-items: flex-end; padding: 0; }
  .hg-detail-card { max-width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; }
}
/* 价牌打印（.hg-pcgrid）移动端：fixed 布局 + 名称吸收剩余。
   可见 4 列：编码/名称/份数/打印 —— 编码 64/48 走全局 .hg-mobile-fit 契约；名称吸收（min40）；
   份数 64/48、打印 60/50 本页特例（覆盖 .hg-mobile-fit 的 hg-col-* 重置）。 */
@media (max-width: 768px) {
  /* 移动端必须 table-layout:auto（覆盖 .hg-mobile-fit 段 fixed）——fixed 布局下 display:none 的列槽
     仍按 auto 参与剩余均分，会把名称吸收列的剩余空间吃掉（实测名称被压到 ~18px）；
     auto 布局下 display:none 列完全不占位，名称列 auto 自然吸收剩余。 */
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid { table-layout: auto !important; width: 100% !important; }
  /* 2026-08-22 用户方法：移动端全列可换行（不再 nowrap 穿透） */
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid th,
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid td { white-space: normal !important; overflow-wrap: anywhere !important; word-break: normal !important; }
  /* 移动端隐藏列（图片/状态/条码/单价/库存） */
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid th.hg-mobile-hide,
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid td.hg-mobile-hide { display: none !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid th.hg-col-name,
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid td.hg-col-name {
    width: auto !important; min-width: 60px !important; max-width: none !important;
  }
  /* 打印份数：固定 64/48（覆盖 .hg-mobile-fit 段 th[class*=hg-col-] 的 width:auto 重置） */
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid th.hg-col-qty,
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid td.hg-col-qty { width: 64px !important; min-width: 48px !important; }
  /* 打印（勾选列 hg-col-check）：走全局移动契约 60/50（.hg-mobile-fit 段重置为 auto，此处恢复） */
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid th.hg-col-check,
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid td.hg-col-check { width: 60px !important; min-width: 50px !important; }
}
@media (max-width: 768px) {
  /* 移动端：表格内操作按钮缩小（fixed+100% 适配规则已提到媒体查询外、全宽度生效，见下方 .hg-mobile-fit） */
  #pgForm .hg-mobile-fit .hg-sales-grid .hg-filter-btn { padding: 4px 6px; font-size: 12px; white-space: normal; }
  .hg-content-card { padding: 14px; }
  /* 老布局（<table>）筛选 / 表单页：移动端左对齐 + 控件充满整行。
     仅直接子 td 变 block（保护内部 GridView 不被拆散）；控件按自身类铺满。 */
  table.hg-legacy-filter > tbody > tr > td {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    box-sizing: border-box;
  }
  table.hg-legacy-filter select,
  table.hg-legacy-filter input[type="text"],
  table.hg-legacy-filter input[type="password"],
  table.hg-legacy-filter .hg-input,
  table.hg-legacy-filter .hg-acct,
  table.hg-legacy-filter .hg-cselect-trigger,
  table.hg-legacy-filter select.hg-native-select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  /* 一般上货：桌面端固定的字段宽度在移动端恢复铺满整行（#edtSHQty/#edtPrice/#edtLabelTags 已被上方 input[type=text] 规则恢复 100%） */
  .hg-putprod-card .hg-prodname-wrap { width: 100% !important; }
  .hg-putprod-card .hg-proddesc-wrap { max-width: 100% !important; }
  .hg-putprod-card .hg-radio-list label { margin-right: 12px; }
  /* 分页器移动端自适应：允许换行、取消横向滚动，避免页码过多时撑破表格/出现水平滚动条 */
  #pgForm .hg-sales-grid .hg-pager-wrap {
    flex-wrap: wrap !important;
    justify-content: center !important;
    overflow-x: visible !important;
    gap: 3px;
  }
  #pgForm .hg-sales-grid .hg-pager-wrap > a,
  #pgForm .hg-sales-grid .hg-pager-wrap > span {
    min-width: 28px;
    padding: 4px 6px;
    font-size: 13px;
  }
}

/* 价牌打印（.hg-pcgrid）桌面特例（2026-08-21 去 nth-child 化）：
   fixed+100% 充满容器；列宽全部走全局契约（status 70/50、barcode 120/70、amt 80/75、check 80/60、
   img 80/48/max80、code 80/70、qty 80/60、stock 80/35、**name auto/min60 均为全局值**），
   名称列仅保留换行放行特例（对抗下方整表 nowrap——长名称需换行，宽度已走全局 auto/min60）。
   注意：必须位于 .hg-mobile-fit 大段（max-width:768px）之后、顶层 —— 嵌套在 media 内会成死代码。 */
@media (min-width: 769px) {
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid { table-layout: fixed !important; width: 100% !important; }
  /* 2026-08-22 防横滚 + 换行（用户方法）：固定列重算（图片80+编码80+状态70+条码100+单价95+库存50+份数80+打印80=635 + 名称 min60 = 695）；
     容器 < 695 时表格溢出横滚、名称保 60；容器充足仍撑满 + 名称吸收。契约变更须同步此值。
     2026-08-22 用户：编码列 52→80px（fixed 布局固定列不随容器变宽，52 太窄），条码 120→100、库存 60→50 找平。 */
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid { min-width: 697px !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid th.hg-col-code,
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid td.hg-col-code { width: 80px !important; min-width: 60px; }
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid th.hg-col-barcode,
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid td.hg-col-barcode { width: 100px !important; min-width: 60px; }
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid th.hg-col-stock,
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid td.hg-col-stock { width: 50px !important; min-width: 40px; }
  /* 2026-08-22 用户方法：全列可换行（normal + overflow-wrap 兜底），不再 nowrap 穿透相邻列 */
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid th,
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-pcgrid td { white-space: normal !important; overflow-wrap: anywhere !important; word-break: normal !important; }
}

@media (max-width: 480px) {
  #pgForm { padding: 12px 0 0 0; }
  #pgForm > table > tbody > tr > td:first-child > table { padding: 18px; border-radius: var(--hg-radius-lg); }
  #pgTool { padding: 12px; }
  .hg-col { padding: 18px 16px; }
  .hg-sales table tr > td { padding: 8px 6px; }
  #pgForm .hg-sales-grid th,
  #pgForm .hg-sales-grid td { padding: 8px 6px; }
}

/* =========================================================================
   列契约：按“表头文字”统一列宽 / 对齐（根治 #pgForm .hg-sales-grid 用 nth-child
   按位置套错列的问题）。由 default.aspx 内 hgStandardizeColumns() 扫描每张表的
   <th> 文字，给该列所有 th/td 注入 hg-col-* class；本段用 !important 控宽+对齐，
   对 DLL 锁死的页面同样生效。改列格式只改这里，不要再动 nth-child。
   选择器已加 .hg-sales-grid 前缀（特异度 0,3,0），确保即便各报表页内联写有
   .hg-sales-grid td:nth-child(n) 列覆盖（带 !important，特异度 0,2,1），本契约在
   !important 同层按特异度取胜，成为唯一列宽/对齐依据。
   key 含义：
   idx=序号/排名/选择 | code=单号/编码/条码/卡号 | shop=店铺 | name=名称类
   num=数量/销量 | amt=金额类 | pct=百分比 | date=日期 | text=长文本(左对齐) | center=默认居中
   ========================================================================= */
/* 表头：无论何种列，统一居中 */
.hg-sales-grid th.hg-col-idx, .hg-sales-grid th.hg-col-code, .hg-sales-grid th.hg-col-barcode, .hg-sales-grid th.hg-col-shop, .hg-sales-grid th.hg-col-boxer, .hg-sales-grid th.hg-col-name,
.hg-sales-grid th.hg-col-num, .hg-sales-grid th.hg-col-amt, .hg-sales-grid th.hg-col-pct, .hg-sales-grid th.hg-col-date,
.hg-sales-grid th.hg-col-text, .hg-sales-grid th.hg-col-center, .hg-sales-grid th.hg-col-tag, .hg-sales-grid th.hg-col-status, .hg-sales-grid th.hg-col-jstype, .hg-sales-grid th.hg-col-inv, .hg-sales-grid th.hg-col-boxqty { text-align: center !important; }
/* 单元格对齐：数字/金额/百分比右对齐；文本/代码/日期/默认居中；长文本(text)左对齐；状态/结算方式(tag)居中 */
.hg-sales-grid td.hg-col-idx, .hg-sales-grid td.hg-col-code, .hg-sales-grid td.hg-col-barcode, .hg-sales-grid td.hg-col-shop, .hg-sales-grid td.hg-col-boxer, .hg-sales-grid td.hg-col-name,
.hg-sales-grid td.hg-col-date, .hg-sales-grid td.hg-col-center, .hg-sales-grid td.hg-col-tag, .hg-sales-grid td.hg-col-status, .hg-sales-grid td.hg-col-jstype, .hg-sales-grid td.hg-col-inv, .hg-sales-grid td.hg-col-boxqty { text-align: center !important; }
.hg-sales-grid td.hg-col-num, .hg-sales-grid td.hg-col-amt, .hg-sales-grid td.hg-col-pct { text-align: right !important; font-variant-numeric: tabular-nums; }
.hg-sales-grid td.hg-col-text { text-align: left !important; }
/* 统一列宽：代码/日期列用固定宽；文本/金额/数字列用 auto + min-width（可收缩又不过窄） */
/* 序号列（hg-col-idx）：42px 宽 / 42px min（2026-08-27 用户：桌面全局改 42/42，原 80/40） */
.hg-sales-grid th.hg-col-idx, .hg-sales-grid td.hg-col-idx { width: 42px !important; min-width: 42px; }
.hg-sales-grid th.hg-col-code, .hg-sales-grid td.hg-col-code { width: 52px !important; min-width: 45px; text-align: center !important; overflow-wrap: anywhere; word-break: normal; }
/* 销售单号（hg-col-billno）：95px 宽 / 54px min（2026-08-28 用户：销售明细查询销售单号列专用全局契约，区别于 code 52/45） */
.hg-sales-grid th.hg-col-billno, .hg-sales-grid td.hg-col-billno { width: 95px !important; min-width: 54px; text-align: center !important; overflow-wrap: anywhere; word-break: normal; }
/* 条码：独立类（区别于编码 code），52px/min45px（2026-08-27 用户全局指定，原 62/50），超长自动换行 */
.hg-sales-grid th.hg-col-barcode, .hg-sales-grid td.hg-col-barcode { width: 52px !important; min-width: 45px; text-align: center !important; overflow-wrap: anywhere; word-break: break-all; }
.hg-sales-grid th.hg-col-shop, .hg-sales-grid td.hg-col-shop { width: 78px !important; min-width: 55px; text-align: center !important; overflow-wrap: anywhere; word-break: break-all; } /* 180→120→105→78px，2026-08-21 防横滚收缩（盒子租赁 10 列总和 945→696，768-1440 全不横滚） */
/* 盒主名称列：居中、自动换行 */
.hg-sales-grid th.hg-col-boxer, .hg-sales-grid td.hg-col-boxer { width: 80px !important; min-width: 70px; word-break: break-all; overflow-wrap: anywhere; }
.hg-sales-grid th.hg-col-num, .hg-sales-grid td.hg-col-num { width: 52px !important; min-width: 45px; }
/* 申请人（盒子租赁等）：100px 宽、60px min、居中、自动换行（词边界换行，不再 break-all 拆字；2026-08-21 用户全局指定） */
.hg-sales-grid th.hg-col-applicant, .hg-sales-grid td.hg-col-applicant { width: 60px !important; min-width: 50px; text-align: center !important; word-break: normal; overflow-wrap: anywhere; }
/* 当前存货：独立契约（区别于 num），窄屏下更窄，数字右对齐 */
.hg-sales-grid th.hg-col-inv, .hg-sales-grid td.hg-col-inv { width: auto !important; min-width: 56px; text-align: right !important; font-variant-numeric: tabular-nums; }
/* 库存列（通用兜底）：居中 + 等宽数字 + min-width 60px 伸缩下限。
   2026-08-14 移除 hg-cl-grid 专用宽度后，本全局规则统一提供收缩下限；
   我的商品(.hg-myprod 56px)等页面级覆盖特异性更高仍优先。
   非 cl-grid 表格（如快速下货 wcDownProdQK、打印卡 wcPrintCard）显式声明 hg-col-stock 后，
   classifyTable 跳过注入，由本规则提供居中对齐（避免按表头"库存"被推断为 num 右对齐）。2026-08-12/14 */
.hg-sales-grid th.hg-col-stock,
.hg-sales-grid td.hg-col-stock { width: 60px !important; min-width: 35px !important; text-align: center !important; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; word-break: break-all; }
/* 我的商品操作列「暂停关注」：桌面 80/min35 居中、自动换行（用户 2026-08-15 指定） */
#pgForm .hg-myprod .hg-sales-grid td.hg-op-follow { width: 80px !important; min-width: 35px !important; text-align: center !important; }
#pgForm .hg-myprod .hg-sales-grid td.hg-op-follow a { white-space: normal !important; display: inline-block; text-align: center; font-weight: 600 !important; color: var(--hg-primary) !important; }
/* 我的商品操作列「补货」：桌面 80/min35 居中、自动换行（用户 2026-08-15 指定） */
#pgForm .hg-myprod .hg-sales-grid td.hg-op-bh { width: 80px !important; min-width: 35px !important; text-align: center !important; }
#pgForm .hg-myprod .hg-sales-grid td.hg-op-bh a { white-space: normal !important; display: inline-block; text-align: center; font-weight: 600 !important; color: var(--hg-primary) !important; }
/* 我的商品「库存」列：独立契约类 hg-col-stock（表头/单元格均已加类），桌面端收紧到 4 位数字刚好容纳
   （4 位 tabular 数字 ≈31px + td 内边距 24px ≈55px → 56px），不影响同契约的「单价/销售数量」列 */
#pgForm .hg-myprod .hg-sales-grid th.hg-col-stock,
#pgForm .hg-myprod .hg-sales-grid td.hg-col-stock { min-width: 35px !important; text-align: center !important; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; word-break: break-all; }
/* 移动端：暂停关注保证每行两个字（2 字 ≈26px + <a> 内边距 12px + td 内边距 12px ≈ 50px），
   列宽 56px + min-width 防止 table-layout:auto 压缩；补货列最窄压到约一个字宽（补/货 两行竖排）；
   当前存货 min-width 56→44 腾出横向空间，避免整表溢出被 .hg-sticky-head 的 overflow:clip 裁掉最右列。
   text-align 沿用全局 center，各屏幕尺寸（≤768px 一律）水平居中一致。 */
@media (max-width: 768px) {
  /* 2026-08-14 我的商品移动端列宽：列宽已由全局契约统一接管，此处仅保留
     页面专属行为——操作列宽度（补货/暂停关注）、换行规则、库存列对齐。 */
  #pgForm .hg-myprod .hg-sales-grid { min-width: 0 !important; }
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-name,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-code { word-break: break-all; }
  /* 库存列（hg-col-stock）：文本居中（对齐页面习惯，宽度走全局契约） */
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-stock,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-stock { text-align: center !important; }
  #pgForm .hg-myprod .hg-sales-grid td.hg-op-follow { width: 48px !important; min-width: 40px !important; text-align: center !important; }
  #pgForm .hg-myprod .hg-sales-grid td.hg-op-follow a { white-space: normal !important; line-height: 1.35; display: inline-block; text-align: center; font-weight: 600 !important; color: var(--hg-primary) !important; }
  #pgForm .hg-myprod .hg-sales-grid td.hg-op-bh { width: 48px !important; min-width: 40px !important; text-align: center !important; }
  #pgForm .hg-myprod .hg-sales-grid td.hg-op-bh a { white-space: normal !important; line-height: 1.35; display: inline-block; text-align: center; font-weight: 600 !important; color: var(--hg-primary) !important; }
}
/* 快速上货（.hg-qk）：移动端关键列左对齐 + 无横向溢出
   GridView 已启用 hg-sticky-head（表头浮动、overflow:clip、不被 hgWrapGrids 包成 .hg-table-scroll 横向滚动容器）。
   2026-08-14：列宽已由全局契约统一接管（code 56/40、name 60/60、num 48/40、stock 40/28），
   此处仅保留页面专属行为：名称左对齐、换行、库存右对齐、input 撑满、按钮占满整行。 */
@media (max-width: 768px) {
  #pgForm .hg-qk .hg-sales-grid { min-width: 0 !important; }
  /* 2026-08-15 用户反馈：商品名称太窄、商品编码列可隐藏（移动端），给名称列更多空间 */
  #pgForm .hg-qk .hg-sales-grid th.hg-col-code,
  #pgForm .hg-qk .hg-sales-grid td.hg-col-code { display: none !important; }
  #pgForm .hg-qk .hg-sales-grid th.hg-col-name,
  #pgForm .hg-qk .hg-sales-grid td.hg-col-name {
    width: 100% !important; min-width: 0 !important; max-width: 100% !important;
  }
  /* 商品名称：左对齐 + break-all（长内容换行不撑宽） */
  #pgForm .hg-qk .hg-sales-grid th.hg-col-name,
  #pgForm .hg-qk .hg-sales-grid td.hg-col-name { text-align: left !important; }
  #pgForm .hg-qk .hg-sales-grid td.hg-col-name,
  #pgForm .hg-qk .hg-sales-grid td.hg-col-code { word-break: break-all; }
  /* 2026-08-15 合计行同步隐藏列（footer td 无列类，用 nth-child 与数据行对齐）：
     列序=1序号/2图片/3名称/4编码/5条码/6单价/7库存/8预上货数量/9暂停关注，移动端隐藏 1/2/4/6 */
  #pgForm .hg-qk .hg-sales-grid tr.hg-grid-footer td:nth-child(1),
  #pgForm .hg-qk .hg-sales-grid tr.hg-grid-footer td:nth-child(2),
  #pgForm .hg-qk .hg-sales-grid tr.hg-grid-footer td:nth-child(4),
  #pgForm .hg-qk .hg-sales-grid tr.hg-grid-footer td:nth-child(6) { display: none !important; }
  /* 库存列：居中（2026-08-15 全局统一，原为右对齐） */
  #pgForm .hg-qk .hg-sales-grid th.hg-col-stock { text-align: center !important; }
  #pgForm .hg-qk .hg-sales-grid td.hg-col-stock { text-align: center !important; }
  /* 库存/预上货数量列 input Width="45px" 同样不能撑列（input 默认 100% 父 td 宽，但内联 width 45 优先 → td 至少 45+padding） */
  #pgForm .hg-qk .hg-sales-grid td.hg-col-stock input,
  #pgForm .hg-qk .hg-sales-grid td.hg-col-shqty input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding: 0 !important;
  }
  /* 快速上货移动端：最下方「加入上货清单」按钮占满整行（td 已 display:block+100% 宽，按钮 inline-flex 需显式 width:100%） */
  #pgForm .hg-qk .hg-filter-btn { width: 100% !important; box-sizing: border-box; }
  /* 2026-08-16 快速上货移动端分页统一居中（删除原左对齐覆盖）：全局 css:1972 已生效 */
}
/* 名称/条码列内嵌控件撑满 td（【桌面+移动全端生效】）：
   .ascx 内 <asp:Label Width="160px"> / <asp:Label Width="100px"> 在 ASP.NET 4.0 渲染为
   <span style="display:inline-block;width:160px">。桌面端名称列 td min-width 240px，而 inline-block 160px
   会在 160px 处强制换行、剩余 80px 空白（“商品名称没占满列就自动换行”）；移动端窄列时 160px 又会把
   min-width:80 撑破产生横向滚动。故全端强制 label 变 block + width:100%：
   桌面端文字占满整列、仅超长才换行；移动端在窄列内 word-break:break-all 自然换行。 */
#pgForm .hg-qk .hg-sales-grid td.hg-col-name span,
#pgForm .hg-qk .hg-sales-grid td.hg-col-code span {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  word-break: break-all;
  overflow-wrap: anywhere;
}
/* 金额/价格列：85px/min85px（2026-09-07 用户全局指定，原 65/65；原 70/65），右对齐（对齐组见 L2124） */
.hg-sales-grid th.hg-col-amt, .hg-sales-grid td.hg-col-amt { width: 85px !important; min-width: 85px; }
/* 勾选列（价牌打印"打印"等 CheckBox 列；桌面 52/45，2026-09-02 用户全局收窄自 80/60；区别于 hg-op-col 链接操作列 30px） */
.hg-sales-grid th.hg-col-check, .hg-sales-grid td.hg-col-check { width: 52px !important; min-width: 45px; text-align: center !important; }
/* 打印份数（价牌打印等）：80px 装下 3 位份数 + 输入框，居中（2026-08-21 用户指定） */
.hg-sales-grid th.hg-col-qty, .hg-sales-grid td.hg-col-qty { width: 80px !important; min-width: 60px; text-align: center !important; }
/* ===== §19 列宽统一策略（2026-08-11 重构）：全局语义类 + 固定关键列 + 剩余列自动分配。
   classifyTable JS（default.aspx）按表头文字自动加 hg-col-{key}，页面零声明。
   桌面：.hg-mobile-fit 不再重置语义类宽度（重置已移入移动端 media query），
         固定列（code/amt/num/date/img 等）按像素宽，未设宽列（name/center）在
         table-layout:fixed 下自动平分剩余空间 —— 即"固定关键列 + 剩余自动分配"。
   关键列规格（2026-08-11 用户确认，桌面 初始/最窄）：
     图片 80/-、编码 80/70（自动换行）、条码 140/60（自动换行）、单价等金额 80/60、状态/结算方式 60/50；均居中，
     金额/数量列表头居中、内容右对齐。
     编码 80px 装下 6-8 位常见编码，超长自动换行；条码独立 140px 装下 16 位，超长 overflow-wrap:anywhere 自动换行。 */
.hg-sales-grid th.hg-col-img, .hg-sales-grid td.hg-col-img { width: 80px !important; min-width: 48px !important; max-width: 80px !important; text-align: center !important; }
/* 商品名称：固定 300px/min60px（2026-08-16 用户要求 180px→300px，桌面更宽展示完整商品名），居中，超长自动换行。
   2026-08-16 改为桌面专用（@media min-width:769px）：原全局 180px 同特异性、位置靠后，
   会覆盖 css:1851 窄屏 60px（@media 不增加特异性）。桌面 300px、窄屏 60px 各管一段，互不覆盖。 */
@media (min-width: 769px) {
  /* 名称列：桌面显式 80/52（2026-08-26 用户指定：原 auto/min60 吸收列在 fixed 下不稳/商品档案被压，
     统一改 80/52 全站生效，商品档案同用全局契约） */
  .hg-sales-grid th.hg-col-name, .hg-sales-grid td.hg-col-name { width: 80px !important; min-width: 52px !important; text-align: center !important; overflow-wrap: anywhere; }
}
/* 标签列（状态/处理方式等）：45px/min45px（2026-08-27 用户全局指定，原 60/50），居中 */
.hg-sales-grid th.hg-col-tag, .hg-sales-grid td.hg-col-tag { width: 45px !important; min-width: 45px; text-align: center !important; }
/* 状态列：60px 宽、50px min、居中、自动换行（2026-08-21 用户全局指定，原 70/50） */
.hg-sales-grid th.hg-col-status, .hg-sales-grid td.hg-col-status { width: 70px !important; min-width: 50px; text-align: center !important; word-break: break-all; overflow-wrap: anywhere; }
/* 触达方式列（会员信息 wcXcxVip 专用）：列内是 3 个 18px 圆点 .hg-touch-dot，
   需要 3×18 + 3×4 = 66px 内容宽。通用状态列 hg-col-status 只有 70px
   （2026-09-16 实测内容宽：1920→69 / 1440→68 / 1366→62 / 1280→55 / 1080→~50 / 手机390→28）
   → 1080 及以下装不下会竖排成 2~3 行。故触达列独立契约 96px/96px
   （96 − 左右 padding 12×2 = 72 ≥ 66，余 6px；列宽固定不随视口收缩 → 全视口单行）。
   ⚠️ min-width 必须 !important：移动端媒体查询里给 .hg-col-status 写了
      width:48px + min-width:40px !important，那个 !important 压过了桌面段的 min-width:50px
      （实测手机端 td 只有 40px）；本规则若不带 !important 会被同样压回去；
      位置也必须在那个媒体查询之后（同特异度靠顺序取胜）。 */
.hg-sales-grid th.hg-col-touch, .hg-sales-grid td.hg-col-touch { width: 96px !important; min-width: 96px !important; text-align: center !important; white-space: nowrap; }
/* 结算方式：独立类（区别于状态 tag），45px/min45px（2026-08-27 用户全局指定，原 80/60；"按收益率"等 4 字会竖排换行） */
.hg-sales-grid th.hg-col-jstype, .hg-sales-grid td.hg-col-jstype { width: 45px !important; min-width: 45px; text-align: center !important; }
/* 百分比列（完成%/折扣%/收益率）：65/65 居中（2026-09-07 用户全局指定 95/75→65/65；
   原 2026-08-25 用户全局 auto/90→95/75 + 内容居中；覆盖 L2104 右对齐组） */
.hg-sales-grid th.hg-col-pct, .hg-sales-grid td.hg-col-pct { width: 65px !important; min-width: 65px; text-align: center !important; }
.hg-sales-grid th.hg-col-date, .hg-sales-grid td.hg-col-date { width: 78px !important; min-width: 60px; }
/* 带时间的日期列（2026-08-14）：80px/min-75px，居中，不换行（时间戳比纯日期宽），
   与 hg-col-date（纯日期 78/60px，2026-08-25 用户全局 120/84→78/60）分设，避免长时间戳被压缩换行。
   2026-08-28 用户全局 160/70→80/75 */
.hg-sales-grid th.hg-col-time, .hg-sales-grid td.hg-col-time { width: 80px !important; min-width: 75px; text-align: center !important; white-space: nowrap !important; }
/* 长文本列（标题/备注/内容/审核结果）：90/80（2026-08-25 用户全局 auto/80→90/80 固定，防 auto 列在 fixed 布局塌缩） */
.hg-sales-grid th.hg-col-text, .hg-sales-grid td.hg-col-text { width: 90px !important; min-width: 80px; }
.hg-sales-grid th.hg-col-center, .hg-sales-grid td.hg-col-center { width: 44px !important; min-width: 40px !important; text-align: center !important; overflow-wrap: anywhere; word-break: break-all; }
/* 盒子申请表/续租退租 租用天数列（2026-08-25 用户全局 120/60→44/40 窄列，数字 1-2 位够用） */
.hg-sales-grid th.hg-col-rentdays, .hg-sales-grid td.hg-col-rentdays { width:44px !important; min-width:40px !important; text-align:center !important; }
.hg-sales-grid th.hg-col-auditresult, .hg-sales-grid td.hg-col-auditresult { width: 130px !important; min-width: 90px; text-align: center !important; }
/* 手机号列（盒子租赁等）：独立类（区别于编码 code），140px 宽、80px min、居中、自动换行（词边界换行，不再 break-all 拆字；2026-08-21 用户全局指定 140/80） */
.hg-sales-grid th.hg-col-phone, .hg-sales-grid td.hg-col-phone { width: 84px !important; min-width: 64px; text-align: center !important; word-break: normal; overflow-wrap: anywhere; }
/* 我的盒子表专属列宽 */
.hg-sales-grid th.hg-col-leftdays, .hg-sales-grid td.hg-col-leftdays { width:120px !important; min-width:60px; text-align:center !important; }
/* 盒子编号 / 专属客服：100px 居中（min 60，2026-08-25 用户全局指定 120→100）。与编号类 code(min 80)、默认回退 center 分设，避免影响全站单号/编码列与未匹配列 */
.hg-sales-grid th.hg-col-boxno, .hg-sales-grid td.hg-col-boxno { width:100px !important; min-width:60px; text-align:center !important; }
.hg-sales-grid th.hg-col-kefu, .hg-sales-grid td.hg-col-kefu { width:auto !important; min-width:80px; text-align:center !important; }
/* 盒子数量：120px 居中（min 40）。与日期类 date(min 84) 分设，避免影响申请/起租/截止日期列 */
.hg-sales-grid th.hg-col-boxqty, .hg-sales-grid td.hg-col-boxqty { width:120px !important; min-width:40px; text-align:center !important; }
/* 单据查询单号列（wcPutProdQuery Grd2）：200px/min100px、居中、自动换行。
   P-yyyyMMdd-SeqNo 长格式需更宽（2026-08-13 全局契约 → 2026-08-28 移为页面特例，
   因 hg-col-billno 已由销售明细查询占用为全局 95/54） */
#pgForm .hg-putprodquery .hg-sales-grid th.hg-col-billno,
#pgForm .hg-putprodquery .hg-sales-grid td.hg-col-billno { width: 200px !important; min-width: 100px; text-align: center !important; word-break: break-all; overflow-wrap: anywhere; }
/* 单据查询时间列：200px/min100px、居中、自动换行、等宽数字。与通用 date(120px) 分设 */
.hg-sales-grid th.hg-col-billtime, .hg-sales-grid td.hg-col-billtime { width: 200px !important; min-width: 100px; text-align: center !important; word-break: break-all; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
/* 单据查询操作员列：120px/min80px、居中、自动换行。与 center(auto) 分设 */
.hg-sales-grid th.hg-col-opuser, .hg-sales-grid td.hg-col-opuser { width: 120px !important; min-width: 80px; text-align: center !important; word-break: break-all; overflow-wrap: anywhere; }
/* 单据查询类别列（wcPutProdQuery Grd2）：100px/min60px、居中、自动换行。
   与通用 tag(60px) 分设——类别文字（一般上货/快速上货等）需更宽，避免影响全站标签列 */
.hg-sales-grid th.hg-col-billtype, .hg-sales-grid td.hg-col-billtype { width: 100px !important; min-width: 60px; text-align: center !important; word-break: break-all; overflow-wrap: anywhere; }
/* 汇总/页脚行的金额类列也右对齐（与数据行一致） */
.hg-sales-grid tr.hg-grid-footer td.hg-col-num, .hg-sales-grid tr.hg-grid-footer td.hg-col-amt, .hg-sales-grid tr.hg-grid-footer td.hg-col-pct,
.hg-sales-grid tr.hg-grid-summary td.hg-col-num, .hg-sales-grid tr.hg-grid-summary td.hg-col-amt, .hg-sales-grid tr.hg-grid-summary td.hg-col-pct { text-align: right !important; }

/* ===== §19.1 老布局表格统一（.hg-legacy-filter，2026-08-11 由 wcProd 页面级 <style> 收敛为全局）=====
   老布局（table.hg-legacy-filter）内的 GridView：全列居中打底 + 金额/数量列 th 居中、td 右对齐。 */
#pgForm .hg-legacy-filter .hg-sales-grid th,
#pgForm .hg-legacy-filter .hg-sales-grid td { text-align: center !important; }
#pgForm .hg-legacy-filter .hg-sales-grid th.hg-col-amt,
#pgForm .hg-legacy-filter .hg-sales-grid th.hg-col-num { text-align: center !important; }
#pgForm .hg-legacy-filter .hg-sales-grid td.hg-col-amt,
#pgForm .hg-legacy-filter .hg-sales-grid td.hg-col-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  /* padding-right:8px（替代 20px）：amt 列 80px 宽时，20px 让可写宽度只剩 52px，
     "￥18.00" 等 6-7 字符金额被 word-break 拆行；8px 保证 80px 列装下 "￥9999.99"。 */
  padding-right: 8px !important;
}
/* 老布局表格内操作按钮（更新/取消等）：紧凑，列窄时不溢出 */
#pgForm .hg-legacy-filter .hg-sales-grid td a.hg-filter-btn {
  padding: 6px 8px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}
/* 老布局表格内的 Label/span（asp:Label 渲染为 span）：
   GridView 模板里常硬编码 Width="Xpx"（如 lblProdName Width="200px"），当 td 列宽 < 内联 Width 时
   span 会撑出 td、溢到邻列、吞掉邻列文字（典型症状：名称列 190 + lblProdName 200 → 状态列"可用"被吞剩"用"）。
   width: auto !important 让 span 跟随内容宽度，max-width:100% 兜底防止任何情况溢出。 */
.hg-sales-grid td span,
#pgForm .hg-legacy-filter .hg-sales-grid td span { width: auto !important; max-width: 100%; box-sizing: border-box; }
/* 老布局标题行/分隔线（2026-08-11 由 wcProd 内联 style 收敛为全局类）：
   标题 td 左缩进 14px 左对齐；下划线行 35px 高左对齐；行间点状分隔线 */
/* 老布局页面标题区对齐卡片标准（.hg-content-card padding: 30px 24px 24px 30px）：
   标题左 padding 30px（原 14px）、标题上方空行 td 固定 30px 高（等效卡片 padding-top:30px），
   使标题"左 30px / 上 30px"与一般上货卡片标题完全一致（2026-08-11 用户确认） */
#pgForm .hg-legacy-filter td.hg-title-row { padding: 0 0 0 30px !important; text-align: left !important; }
#pgForm .hg-legacy-filter td.hg-lea-topsep { height: 30px !important; padding: 0 !important; overflow: hidden; }
/* 2026-08-17 我的账户：根据用户反馈去掉灰色虚线分隔（原本是 dotted border-top）。不再显示，仅保留 class 名避免冲突 */
.hg-row-divider { display: none; }
.hg-row-divider--flush { display: none; }
/* 表单标签单元格（老 table 表单 td 标签）：收敛页面内联重复样式（2026-08-13 批量，
   替代 `font-size:14px;line-height:24px;text-align:left;height:24px;width:100px;white-space:nowrap` 内联） */
.hg-legacy-filter td.hg-form-label {
  font-size: 14px; line-height: 24px; text-align: left; height: 24px;
  width: 100px; white-space: nowrap; color: var(--hg-muted);
}
/* 拆壳版表单标签（C 类页面 table 壳拆除后 td→span.hg-form-label，2026-08-13）：
   与 td 版同款样式（灰字 100px 不换行），用于 .hg-form-row 内横排；B 类老 table 页仍走 td 版 */
.hg-form-row .hg-form-label {
  font-size: 14px; line-height: 24px; text-align: right;
  flex: 0 0 auto; min-width: 60px; width: auto;
  white-space: nowrap; color: var(--hg-muted);
  padding: 0; margin-right: 4px;
}
/* 拆壳版表单字段（td→span.hg-form-field）：横向排列在 label 后，flex:1 吸收剩余。
   内嵌 input/hint/button 用 display:flex + align-items:center 垂直对齐。
   label 视觉中心 = input 视觉中心。
   窄屏有 hint+按钮换行干扰时，让 field 内只剩 input，其他元素单独成行。 */
.hg-form-row .hg-form-field { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hg-form-row .hg-form-field > input.hg-input { flex: 1 1 auto; min-width: 0; box-sizing: border-box; }
/* 促销 Dlg 促销单号输入框固定 170px（2026-09-01 用户要求，5 页统一）。
   必须 !important + 固定 flex-basis：L2589 `.hg-form-row .hg-form-field > input.hg-input`
   是 (0,3,1) 且 flex:1 1 auto 会把 input 撑满整行；L2963 `.hg-form-field > .hg-input`
   有 width:250px !important。两者都要压过。 */
.hg-form-row .hg-input.hg-billno { flex: 0 0 170px !important; width: 170px !important; max-width: 170px !important; }
/* 橙色小节标题（表格区块标题，如收入/支出明细标题）：收敛跨页 22 处同款内联（2026-08-13） */
.hg-legacy-filter td.hg-orange-title {
  font-size: 14px; line-height: 24px; font-weight: bold; color: #FF8C00;
  height: 24px; text-align: left;
}
.hg-legacy-filter td.hg-orange-title.hg-orange-title--w15 { width: 15%; }
.hg-legacy-filter td.hg-orange-title.hg-orange-title--w20 { width: 20%; }
.hg-legacy-filter td.hg-orange-title.hg-orange-title--h22 { height: 22px; }
@media (max-width: 768px) {
  /* 老布局顶部空行 td（&nbsp;）：移动端 td→block 后占整行留白，隐藏 */
  #pgForm .hg-legacy-filter td.hg-lea-topsep { display: none !important; }
  /* 老布局操作按钮（新增/查询/导出EXCEL等）：占满整行 + 居中 + 触摸高度 */
  #pgForm .hg-legacy-filter td a.hg-filter-btn {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }
}

/* ===== 销售分析报表：卡片 + 表格基础样式（日/月销售分析 ascx 共用）=====
   padding 与 .hg-content-card 对齐（30px 24px 24px 30px），保证标题间距全站一致（2026-08-13） */
.hg-rpt-card {
  background: #fff;
  border: 1px solid var(--hg-border, #E5E7EB);
  border-radius: var(--hg-radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  padding: 30px 24px 24px 30px;
  margin-bottom: 16px;
}
.hg-page-title {
  font-family: var(--hg-font); font-size: 20px; font-weight: 700;
  col.hg-page-title {
  font-family: var(--hg-font); font-size: 20px; font-weight: 700;
  color: var(--hg-primary-deep, #0052A3); margin: 2px 0 0;
  display: inline-block; padding-bottom: 8px;
  }lor: var(--hg-primary-deep, #0052A3);
}

/* 销售表格（报表页：不在 #pgForm 内） */
.hg-rpt-card .hg-sales-grid {
  width: 100%; border-collapse: collapse;
  font-family: var(--hg-font); font-size: 14px; color: var(--hg-ink);
  background: var(--hg-surface); border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius); overflow: hidden;
}
.hg-rpt-card .hg-sales-grid thead th {
  background: #f3f4f6; font-weight: 700; text-align: center;
  color: #374151; padding: 10px 12px;
  white-space: normal !important; border-bottom: 1px solid var(--hg-border);
}
.hg-rpt-card .hg-sales-grid td {
  padding: 9px 12px; border-bottom: 1px solid #F3F4F6;
  background: var(--hg-surface); white-space: normal !important;
}
.hg-rpt-card .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover > td {
  background: var(--hg-primary-soft, #EBF3FC);
}
/* 金额列：表头居中 + 内容右对齐 + 等宽数字 */
.hg-sales-grid .hg-col-amt,
.hg-rpt-card .hg-sales-grid .hg-col-amt { text-align: right !important; font-variant-numeric: tabular-nums; }
/* 百分比/进度列：居中对齐 + 等宽数字 */
.hg-sales-grid .hg-col-pct,
.hg-rpt-card .hg-sales-grid .hg-col-pct { text-align: center !important; font-variant-numeric: tabular-nums; }

/* 汇总行 */
.hg-rpt-card .hg-sales-grid tr.hg-grid-footer td {
  font-weight: 700; background: #EBF3FC; color: var(--hg-primary-deep, #0052A3);
  border-bottom: 0; border-top: 2px solid #D6E7F9;
}
/* 分页行 */
.hg-sales-grid .hg-grid-pager td {
  text-align: center !important; padding: 12px 0 !important;
  background: transparent !important;
}
/* 分页器（hgNormalizePager 重构为 flex） */
.hg-sales-grid .hg-pager-wrap {
  display: flex; flex-wrap: wrap; justify-content: flex-start;
  align-items: center; gap: 4px; width: 100%;
}
.hg-sales-grid .hg-pager-wrap > a,
.hg-sales-grid .hg-pager-wrap > span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; margin: 2px; padding: 0 8px;
  border-radius: var(--hg-radius-sm); background: #f3f4f6; color: #374151;
  text-decoration: none; font-size: 13px; font-weight: 500;
  font-family: var(--hg-font); white-space: nowrap; cursor: pointer;
}
.hg-sales-grid .hg-pager-wrap > a:hover,
.hg-sales-grid .hg-pager-wrap > .hg-pg-link:hover { background: var(--hg-primary); color: #fff; }
.hg-sales-grid .hg-pager-wrap > .hg-pg-current { background: var(--hg-primary); color: #fff; cursor: default; }
.hg-sales-grid .hg-pager-wrap > .hg-pg-disabled { background: transparent; color: var(--hg-muted); cursor: default; opacity: .45; }
.hg-sales-grid .hg-pager-wrap > .hg-pg-link span,
.hg-sales-grid .hg-pager-wrap > a span { background: transparent; color: inherit; }
/* 分页归一化前瞬态（防止闪跳） */
.hg-sales-grid .hg-grid-pager a,
.hg-sales-grid .hg-grid-pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; margin: 2px; padding: 0 8px;
  border-radius: var(--hg-radius-sm); background: #f3f4f6; color: #374151;
  text-decoration: none; font-size: 13px; font-weight: 500;
  font-family: var(--hg-font);
}
.hg-sales-grid .hg-grid-pager span { background: var(--hg-primary); color: #fff; font-weight: 600; }
/* 表头排序箭头（替换后台生成的 gif） */
.hg-sort-arrow { display: inline-flex; vertical-align: middle; margin-left: 5px; line-height: 0; }
.hg-sort-arrow svg { display: block; }
/* 2026-08-16 我的商品移动端分页统一居中（删除原左对齐覆盖）：全局 css:1972 #pgForm .hg-sales-grid
   .hg-pager-wrap justify-content:center !important 已生效，与库存查询等页一致 */

@media (min-width: 769px) {
  #pgForm .hg-qk .hg-sales-grid th.hg-col-num,
  #pgForm .hg-qk .hg-sales-grid td.hg-col-num { min-width: 45px !important; }
  #pgForm .hg-qk .hg-sales-grid td.hg-col-shqty { text-align: center !important; }
  #pgForm .hg-qk .hg-sales-grid td.hg-col-shqty input { text-align: center !important; }
  /* 快速上货「库存」列：对齐我的商品库存列（hg-col-stock 独立契约，桌面 45px tabular）；
     表头居中、数据居中（2026-08-15 全局统一，原为右对齐） */
  #pgForm .hg-qk .hg-sales-grid th.hg-col-stock { min-width: 45px !important; text-align: center !important; }
  #pgForm .hg-qk .hg-sales-grid td.hg-col-stock { min-width: 45px !important; text-align: center !important; font-variant-numeric: tabular-nums; }
  /* 快速上货「单价」列（hg-qk-price-col 专属，wcPutProdQK.ascx ItemStyle 声明）：
     桌面端价格「￥1,234.50」等最长约 10 字符，45px 窄列会强制分行（“单价分行显示”）；
     加宽到 100px + span 变 block 占满列 + white-space:nowrap 禁止换行 → 一行完整显示价格。
     预上货数量列（同为 hg-col-num）无 hg-qk-price-col 类，保持 45px 不受影响。 */
  #pgForm .hg-qk .hg-sales-grid td.hg-qk-price-col { min-width: 100px !important; }
  #pgForm .hg-qk .hg-sales-grid td.hg-qk-price-col span {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }
}

/* 快速上货控件样式（从 wcPutProdQKByShop.ascx 本地 <style> 迁移，2026-08-13） */
/* 下拉 trigger 紧凑（从 wcPutProdQK.ascx 盒主版本地 <style> 迁移，2026-08-13）：水平内边距 14→6、垂直 5 */
.hg-qk .hg-cselect-trigger { padding: 5px 6px; }
.hg-qk .hg-qk-factnum {
  border: none;
  background: transparent;
  color: var(--hg-muted);
  text-align: right;
  pointer-events: none;
}
.hg-qk .hg-qk-price {
  color: var(--hg-muted);
}
.hg-qk .hg-qk-shqty {
  text-align: center;
  color: var(--hg-primary-deep);
  -webkit-text-fill-color: var(--hg-primary-deep);
  caret-color: var(--hg-primary-deep);
  width: 60px !important; /* 与打印数量(.hg-qty-green)统一 60px，收敛 ascx 内联 Width="45px"（2026-08-12） */
}
.hg-qk .hg-qk-shqty:focus {
  color: var(--hg-primary-deep);
  -webkit-text-fill-color: var(--hg-primary-deep);
  caret-color: var(--hg-primary-deep);
  background-color: #fff;
}
.hg-qk .hg-qk-shqty::selection {
  background: rgba(0, 102, 204, .18);
  color: var(--hg-primary-deep);
  -webkit-text-fill-color: var(--hg-primary-deep);
}
.hg-qk .hg-sales-grid th.hg-sortable,
.hg-content-card.hg-downqk .hg-sales-grid th.hg-sortable { cursor: pointer; user-select: none; }
.hg-qk .hg-sales-grid th.hg-sortable:hover,
.hg-content-card.hg-downqk .hg-sales-grid th.hg-sortable:hover { color: var(--hg-primary-deep); }
.hg-qk .hg-sales-grid th .hg-sort-ico,
.hg-content-card.hg-downqk .hg-sales-grid th .hg-sort-ico { color: var(--hg-primary); font-size: 10px; margin-left: 3px; }
/* 快速上货：底部操作区（确认上货按钮）左对齐 */
.hg-qk-actions { text-align: left; }
/* 快速上货：底部汇总行数字（预上货数量/打印数量居中）。
   display:block 占满单元格宽，text-align:center 让数字真正居中（inline-block 只在自身宽度内居中、
   块本身仍靠左，视觉上不居中）
   .hg-content-card.hg-downqk：快速下货页汇总行复用同一格式（2026-08-13，拆壳后专属类在卡片 div 上） */
.hg-qk .hg-sum-shqty,
.hg-qk .hg-sum-ptqty,
.hg-content-card.hg-downqk .hg-sum-shqty {
  display: block;
  min-width: 40px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* ===== 日/月销售分析（wcRptSaleFXByDay/Month）表格收敛（2026-09-06 从页内 <style> 迁入全局）=====
   表格已显式声明 hg-col-* 类（日期 hg-col-date / 店铺 hg-col-shop / 金额 hg-col-amt /
   百分比 hg-col-pct / 进度 hg-col-center），全局列契约 L2386 接管对齐与列宽；
   此处仅保留页面专属行为——移动端（≤768px）隐藏"销售金额/退货金额"两列
   （数据行 + 汇总行同步），避免横向滚动破版。
   选择器用 .hg-fxday / .hg-fxmonth（页面锚类加在 ascx 根 div）作为作用域，
   避免污染其它 .hg-rpt-card 页面。 */
@media (max-width: 768px) {
  #pgForm .hg-fxday .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) th:nth-child(4),
  #pgForm .hg-fxday .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) td:nth-child(4),
  #pgForm .hg-fxday .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) th:nth-child(5),
  #pgForm .hg-fxday .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) td:nth-child(5),
  /* 日销售目标（2026-09-06 新增列，合计金额后）移动端与销售/退货同类隐藏 */
  #pgForm .hg-fxday .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) th:nth-child(7),
  #pgForm .hg-fxday .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) td:nth-child(7),
  #pgForm .hg-fxmonth .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) th:nth-child(3),
  #pgForm .hg-fxmonth .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) td:nth-child(3),
  #pgForm .hg-fxmonth .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) th:nth-child(4),
  #pgForm .hg-fxmonth .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) td:nth-child(4),
  /* 月销售目标（2026-09-06 新增列，合计金额后）移动端与销售/退货同类隐藏 */
  #pgForm .hg-fxmonth .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) th:nth-child(6),
  #pgForm .hg-fxmonth .hg-sales-grid tr:not(.hg-grid-pager):not(.hg-grid-footer) td:nth-child(6),
  #pgForm .hg-fxday .hg-sales-grid tr.hg-grid-footer td:nth-child(4),
  #pgForm .hg-fxday .hg-sales-grid tr.hg-grid-footer td:nth-child(5),
  #pgForm .hg-fxday .hg-sales-grid tr.hg-grid-footer td:nth-child(7),
  #pgForm .hg-fxmonth .hg-sales-grid tr.hg-grid-footer td:nth-child(3),
  #pgForm .hg-fxmonth .hg-sales-grid tr.hg-grid-footer td:nth-child(4),
  #pgForm .hg-fxmonth .hg-sales-grid tr.hg-grid-footer td:nth-child(6) {
    display: none !important; width: 0 !important; padding: 0 !important; min-width: 0 !important;
  }
}

/* =========================================================================
   后台管理页 VI 基础类（统一视觉外壳：标题 / 分隔线 / 筛选栏 / 按钮 / 下拉）
   对话框是运行时动态注入 #pgForm 的，这些类写在全局；各 .ascx 只要给控件加类名，
   再由 default.aspx 全局挂接的 hgInitCustomSelects（body-portal）统一建圆角阴影下拉。
   仅加类、不改结构、不动后台事件，对 DLL 锁死页安全。
   ========================================================================= */

/* 页面标题：用 !important 压住老页内联 <td style="font-size:18px;font-weight:bold;color:..."> */
.hg-page-title {
  font-family: Inter, "Noto Sans SC", sans-serif;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #0052A3 !important;
  margin: 2px 0 0 !important;
  line-height: 1.3 !important;
}

/* 标题下划线（与首页“最新公告”section 标题同款）：2px 纯色实线深绿，贴在标题文字正下方。
   用 display:table 收缩到内容宽 + border-bottom，使绿线宽度=标题文字宽，同时不受父级 text-align:center 影响。
   与标题的间距同样用 --hg-title-gap，与 .hg-page-title--underline 视觉一致。 */
.hg-page-title--underline {
  display: table !important;           /* 块级但收缩到内容宽，不受父级 text-align:center 影响 */
  text-align: left !important;
  border-bottom: 2px solid var(--hg-primary) !important;
  padding-bottom: var(--hg-title-gap) !important;
  margin-bottom: 14px !important;
}

/* 一般上货：标签紧贴控件（覆盖全局 .hg-filter-label 的 padding-right:12px，去掉标签↔控件的 12px 间隙） */
.hg-putprod-card .hg-filter-label { padding-right: 0 !important; }

/* 内容卡片：筛选栏 + 表格统一包在一个白底卡片里（如“店铺收货处理”）。
   桌面 padding 上/左 30px、右/下 24px = 标题距左上角的统一留白（2026-08-10 调整；
   全站标题间距统一走这里，页面不得再覆盖 .hg-content-card padding，移动端 14px 见 media 1770 行）。 */
.hg-content-card {
  background: #fff;
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius-xl);
  box-shadow: var(--hg-shadow-sm);
  padding: 30px 24px 24px 30px;
  margin-bottom: 16px;
}
/* 2026-09-02 5 个促销配置列表页曾用 hg-cx-list（padding-top 8px + margin-top -22px 与左侧菜单顶部对齐），
   用户明确要求与全站 161 页标准间距一致（.hg-content-card 基准），已移除该类与规则，页面回归纯 hg-content-card。 */
/* 2026-08-17 库存报警：顶部"标题 + 工具栏"同行（标题左、工具栏右），合并到右上白底容器 */
.hg-myproddepotbj-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.hg-myproddepotbj-head .hg-page-title--underline {
  margin-bottom: 0;
  flex: 0 0 auto;
}
.hg-myproddepotbj-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1 1 auto;
  justify-content: flex-end;
}
.hg-myproddepotbj-toolbar .hg-filter-group {
  margin: 0;
}
.hg-myproddepotbj-card > table {
  width: 100%;
  border-collapse: collapse;
}
/* 内容卡片内筛选栏统一间距（2026-08-10 统一行距标准：相邻两行 bar 间距 = 2+8+2=12px，
   比原 4+8+4=16px 更紧凑；一般上货每行一个 bar 的竖排表单与查询页多 group 并排保持同一行距） */
/* 分店盘点单（wcShopSppd .hg-sppdform）：老式 table 壳表单（服务端 tr 不可拆）——桌面铺满卡片、移动端竖排防溢出（2026-08-27） */
#pgForm table.hg-sppdform { width: 100% !important; border-collapse: collapse; }
#pgForm table.hg-sppdform td { padding: 4px 6px; vertical-align: middle; }
@media (max-width: 768px) {
  #pgForm table.hg-sppdform, #pgForm table.hg-sppdform tbody,
  #pgForm table.hg-sppdform tr, #pgForm table.hg-sppdform td { display: block; width: 100% !important; box-sizing: border-box; }
  #pgForm table.hg-sppdform td.hg-filter-label { padding: 8px 6px 2px; }
  #pgForm table.hg-sppdform td input, #pgForm table.hg-sppdform td select { max-width: 100%; }
  #pgForm table.hg-sppdform .hg-cselect-trigger { width: 100% !important; }
}
.hg-content-card > .hg-filter-bar { padding: 2px 0; margin-bottom: 5px; } /* 14→5px，2026-08-14 用户确认收紧卡片内筛选栏间距 */
/* 2026-09-02 5 个促销配置 Dlg（限时折扣/超量特价/赠品/类别品牌/满额）：
   .hg-cx-dlg 卡片内表单 bar 上下各加 8px 缓冲，让单行视觉高度从 26-46px 提升到 ~42-62px，
   对齐销售查询 tr（含 td padding 10+10）的 57-61px 行高。
   仅作用于 5 个 CX Dlg 的 .hg-filter-bar，其他 161 页不受影响。 */
.hg-content-card.hg-cx-dlg > .hg-filter-bar { padding-top: 7px; padding-bottom: 7px; margin-bottom: 0; }
/* 卡片内 underline 标题与下方筛选栏间距：padding-bottom 10px + margin-bottom 10px（2026-08-13
   用户统一要求两者均 10px，总间距 20px）。
   后代选择器（非直接子）：兼容标题位于卡片内 table>tr>td 的页面（如我的账户 wcUserInfo），
   使所有卡片内标题间距统一（2026-08-13 修复：原来 `>` 直接子选择器匹配不到表格内标题）。 */
.hg-content-card .hg-page-title--underline {
  margin-bottom: 10px !important;
  padding-bottom: 10px !important;
}
/* 报表卡片（hg-rpt-card）标题：与 hg-content-card 同款间距（2026-08-13，11 个报表页面如日销售分析/
   月销售分析/库存预警/品类销售排行/商品销量统计/滞销商品统计/顾客流量统计/员工推销统计/盒主销售排行
   标题已是容器直接子，仅缺统一间距规则；rpt-card padding 与 content-card 相同 30px 24px 24px 30px） */
.hg-rpt-card .hg-page-title--underline {
  margin-bottom: 10px !important;
  padding-bottom: 10px !important;
}
/* 报表页专属组件收敛（2026-08-13 从 10 个报表页本地 style 块迁移，删除页面重复的全局组件复制） */
/* 筛选区绿勾选框（报表页筛选项） */
.hg-filter-checkbox { font-family: var(--hg-font); font-size: 14px; color: #374151; cursor: pointer; }
.hg-filter-checkbox input { accent-color: var(--hg-primary); width: 16px; height: 16px; vertical-align: middle; margin-right: 4px; }
/* 2026-09-12 勾选框与文字垂直对齐（用户反馈「打勾框和后面的文字没有垂直对齐」）：
   WebForms CheckBox 渲染 <input><label> 兄弟结构，默认 vertical-align:baseline，
   16px 方框相对 13px 文字行心偏移 → 视觉错位。两处高频：POS 结算「打印小票」(.hg-check) +
   登录页「记住登录状态」(.hg-login-check)。同款已对齐的 .hg-filter-checkbox 也是 vertical-align:middle 口径。 */
.hg-check input[type="checkbox"],
.hg-check input[type="radio"],
.hg-login-check input[type="checkbox"],
.hg-login-check input[type="radio"] {
  width: 16px; height: 16px;
  vertical-align: middle;
  margin: 0 5px 0 0;
  accent-color: var(--hg-primary);
}
.hg-check label,
.hg-login-check label {
  vertical-align: middle;
}
/* 自定义下拉菜单 toggle 项（报表页） */
.hg-cselect-toggle { padding: 0; margin: 0 0 4px; border-bottom: 1px solid var(--hg-border-soft); list-style: none; }
/* 原生下拉宽度变体（报表页筛选器） */
select.hg-native-select--shop { min-width: 150px; width: auto; max-width: 280px; }
select.hg-native-select--pagesize { width: 96px; }
select.hg-native-select--cond { width: auto; min-width: 84px; }
select.hg-native-select--cashier { min-width: 130px; width: auto; max-width: 220px; }
select.hg-native-select--sum { width: 120px; }
.hg-content-card > .hg-filter-bar.hg-filter-bar-2 {
  padding-bottom: 2px; margin-bottom: 8px;
}
.hg-content-card > .hg-table-scroll { margin: 0; }
/* 单选：VI 灰字 + 主题绿圆点；Flow 布局下 input/label 成对水平排列，避免默认 Table 布局把标签挤到圆点下方 */
.hg-putprod-card .hg-radio-list { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 0; vertical-align: middle; }
.hg-putprod-card .hg-radio-list input[type="radio"] { accent-color: var(--hg-primary); width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: middle; flex: none; cursor: pointer; }
.hg-putprod-card .hg-radio-list label { color: var(--hg-muted); font-size: 14px; font-family: var(--hg-font); margin: 0 18px 0 0; white-space: nowrap; vertical-align: middle; cursor: pointer; }
.hg-putprod-card .hg-radio-list label:last-of-type { margin-right: 0; }
/* 一般上货：① 选择店铺下拉宽度与同列文本框(.hg-input 在卡片内为100%)对齐——撑满所在列，使上货数量/商品单价输入框与之等宽 */
.hg-putprod-card .hg-cselect-trigger.hg-cselect--shop { width: 100% !important; max-width: 100% !important; }
/* ② 商品名称：固定宽度 + 右侧实时字数提示（0/25） */
/* 以"商品名称"输入框为基准宽度，统一其它字段初始宽度（仅桌面端生效；移动端见 ≤768px 媒体查询恢复 100%） */
.hg-putprod-card { --hg-prodname-w: 320px; }
.hg-putprod-card .hg-prodname-wrap { display: inline-flex; align-items: center; gap: 8px; width: var(--hg-prodname-w); box-sizing: border-box; }
.hg-putprod-card .hg-prodname-wrap .hg-input { width: auto !important; flex: 1 1 auto; min-width: 0; }
/* 商品描述 / 标签Tag：初始宽度与商品名称一致 */
.hg-putprod-card .hg-proddesc-wrap { max-width: var(--hg-prodname-w); }
.hg-putprod-card #edtLabelTags { width: var(--hg-prodname-w); }
/* 上货数量 / 商品单价：商品名称宽度的一半（用 id 选择器，桌面压过基础 width:100%，移动端被 !important 规则恢复满宽） */
.hg-putprod-card #edtSHQty,
.hg-putprod-card #edtPrice { width: calc(var(--hg-prodname-w) / 2); }
.hg-putprod-card .hg-char-count { font-size: 12px; color: var(--hg-muted); white-space: nowrap; }
/* 文件上传：原生 input 透明覆盖 + 视觉按钮，按钮复用 .hg-filter-btn-primary（绿底白字），
   颜色/高度/圆角均与提交按钮完全同构（padding 10px 28px + 圆角 var(--hg-radius)），
   不依赖 ::file-selector-button 伪元素。
   2026-08-11 由 .hg-putprod-card 限定收敛为通用组件类 .hg-file-upload（一般上货 + 商品档案对话框共用） */
.hg-file-upload {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
}
.hg-file-upload .hg-file-input {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  margin: 0; padding: 0; opacity: 0; cursor: pointer; z-index: 1;
}
.hg-file-upload .hg-file-btn {
  pointer-events: none;
  padding: 6px 18px;  /* 与 .hg-putprod-actions .hg-filter-btn 完全同构（颜色/高度/圆角统一）；2026-08-11 统一为商品档案按钮尺寸 */
}
.hg-file-upload:hover .hg-file-btn { background: var(--hg-primary-deep); box-shadow: var(--hg-shadow-md); }
/* 商品图片预览：圆角 + 等比裁剪（商品档案对话框等全局复用） */
.hg-img-rounded { border-radius: var(--hg-radius); object-fit: cover; }
.hg-file-upload .hg-file-name {
  font-size: 13px; color: var(--hg-muted);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 2026-08-15 商品描述：普通 textarea（替换原 FreeTextBox）—— 和其他输入框同款：
   灰边 + 白底 + 圆角 + 与 .hg-input 一致的 padding/border 风格 */
.hg-putprod-card .hg-proddesc-wrap {
  border: 1px solid var(--hg-border); border-radius: var(--hg-radius);
  background: var(--hg-surface); overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.hg-putprod-card .hg-proddesc-wrap:focus-within { border-color: var(--hg-primary); box-shadow: 0 0 0 3px var(--hg-primary-pale); }
.hg-putprod-card .hg-proddesc-wrap .hg-textarea {
  border: 0 !important; border-radius: 0 !important;
  width: 100% !important; min-height: 160px;
  padding: 11px 14px; resize: vertical;
  font-family: var(--hg-font); font-size: 14px;
  color: var(--hg-ink); background: transparent;
  box-sizing: border-box; outline: none;
  white-space: pre-wrap;  /* 保留换行显示 */
}

/* ===== §16 表单页字段行 .hg-form-field（2026-08-10 由 wcPutProd 盒主版+分店版页面 style 收敛而来） =====
   用法：<div class="hg-filter-group hg-form-field"><span class="hg-filter-label">标签</span>控件</div>
   复合行（商品名称+上货类型+已有商品下拉）再加 hg-prodname-group 类。
   label 内容宽、挨着控件（gap 14px 由 .hg-filter-group 提供，与其他页面筛选区一致，不分左右大）；
   桌面输入框/下拉/文件上传固定 320px 不占满整行，商品描述多行编辑器占满整行；
   移动端由本区块 media 恢复 label 内容宽 + 控件 100% 占满。 */
.hg-form-field { flex: 0 0 auto; min-width: 0; }
.hg-form-field > .hg-filter-label { flex: 0 0 auto; }
/* 必选星号（hg-required）：2026-08-27 从 .hg-form-field 限定放宽为通用 .hg-filter-label，
   销售查询等 .hg-filter-group 筛选组也可用（向后兼容原 .hg-form-field 用法） */
.hg-filter-label.hg-required::after { content: "*"; color: #e53e3e; margin-left: 2px; font-weight: 700; }
.hg-form-field > .hg-input { flex: 0 0 auto; width: 250px !important; max-width: 100%; min-width: 0; }
.hg-form-field > .hg-file-upload { flex: 0 0 auto; min-width: 0; }
/* 下拉按内容自适应宽度，上限 300px（用户 2026-08-10 要求，防长选项撑爆） */
.hg-form-field > .hg-cselect-wrap { flex: 0 0 auto; width: auto !important; min-width: 0; max-width: 300px; }
.hg-form-field > .hg-cselect-wrap .hg-cselect-trigger { width: 100% !important; }
/* 商品描述多行编辑器 / 备注（textarea.hg-input）：桌面统一固定 250px（用户 2026-08-10 要求），移动端由 media 恢复占满 */
.hg-form-field > .hg-proddesc-wrap { flex: 0 0 auto; width: 250px !important; max-width: 100%; min-width: 0; }
.hg-form-field .hg-char-count { font-size: 12px; color: var(--hg-muted); white-space: nowrap; }
/* 复合行：名称输入框固定宽 + 单选内容宽 + 已有商品下拉按内容自适应（上限 300px） */
.hg-form-field.hg-prodname-group { flex-wrap: wrap; }
.hg-form-field.hg-prodname-group .hg-prodname-wrap { flex: 0 0 260px; }
.hg-form-field.hg-prodname-group > .hg-cselect-wrap { flex: 0 0 auto; width: auto !important; min-width: 0; max-width: 300px; }
.hg-form-field.hg-prodname-group .hg-radio-list { flex: 0 0 auto; }
/* 一般上货卡片布局（盒主版 wcPutProd + 分店版 wcPutProdByShop 共用） */
.hg-putprod-card .hg-filter-bar { width: 100%; }
.hg-putprod-card .hg-putprod-actions { margin-top: 6px; }
.hg-putprod-card .hg-putprod-actions .hg-filter-btn { padding: 10px 28px; }
/* 移动端：label 还原内容宽；所有控件恢复占满一行（覆盖桌面固定 320px 规则，见全局 media 1704/1708 行） */
@media (max-width: 768px) {
  .hg-form-field > .hg-filter-label { flex: 0 0 auto !important; }
  /* 2026-08-15 修复：hgInitInputClear 把 .hg-input 包成 .hg-input-wrap，
     原 `.hg-form-field > .hg-input` 直接子选择器匹配不到（input 不是 form-field 直接子）。
     同时命中 wrap 和 wrap 内 input，保证商品名称/单价/数量占满整行 */
  .hg-form-field > .hg-input-wrap { flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; }
  .hg-form-field > .hg-input-wrap .hg-input { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
  .hg-form-field > .hg-input,
  .hg-form-field > .hg-file-upload,
  .hg-form-field > .hg-cselect-wrap,
  .hg-form-field > .hg-proddesc-wrap { flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; }
  /* 移动端：.hg-form-field 变 flex column 后，子项 flex-basis:100% 覆盖 height 导致输入框塌缩为内容高度（18px），
     与下拉 40px 不一致。必须同时显式 height + flex-basis 双锁定 40px（仅单行 input，textarea 多行不参与） */
  .hg-form-field > input.hg-input,
  .hg-form-field > .hg-input-wrap .hg-input { height: var(--hg-control-h) !important; flex-basis: var(--hg-control-h) !important; }
  .hg-form-field.hg-prodname-group > .hg-cselect-wrap { flex: 1 1 auto !important; }
  /* 一般上货移动端：prodname-group 在 column 布局下，桌面 flex:0 0 260px 会让 wrap 高度被撑成 260px（主轴变垂直），
     改为按内容收缩 + 满宽，避免 wrap 内部空白大 */
  .hg-form-field.hg-prodname-group .hg-prodname-wrap { flex: 0 0 auto !important; width: 100% !important; display: flex !important; align-items: center !important; gap: 8px !important; min-width: 0 !important; }
  /* 2026-08-15 修复：商品名称 input 被 hgInitInputClear 包成 .hg-input-wrap，
     结构变成 .hg-prodname-wrap > .hg-input-wrap > input，flex:1 必须作用在 wrap 上才能与 char-count "0/25" 同行 */
  .hg-form-field.hg-prodname-group .hg-prodname-wrap .hg-input-wrap { display: inline-flex !important; flex: 1 1 0 !important; min-width: 0 !important; max-width: calc(100% - 50px) !important; }
  .hg-form-field.hg-prodname-group .hg-prodname-wrap .hg-input-wrap .hg-input { width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
  .hg-form-field.hg-prodname-group .hg-prodname-wrap .hg-char-count { flex: 0 0 auto !important; min-width: 0 !important; }
}

/* ===== §17 单行控件统一高度（2026-08-10 用户要求：输入框/下拉/日期/按钮等高） =====
   统一所有单行控件 height = var(--hg-control-h) 40px + box-sizing:border-box，
   用 height 取代 padding 推高（原 hg-input 11px → 45px，按钮/下拉/日期 8px → 39px，不齐）。
   注意：textarea 多行控件不参与（hg-textarea 保持 min-height 自适应），
   flex 按钮用 align-items:center 天然垂直居中，无需 line-height 处理。 */
.hg-form-field input.hg-input,
.hg-form-field .hg-cselect-trigger,
.hg-form-field input.hg-date,
.hg-form-field input.hg-date-time,
.hg-form-field input.hg-date-range,
.hg-form-field input.hg-filter-input,
.hg-filter-btn:not(.hg-filter-btn-sm),
.hg-cselect-trigger,
select.hg-native-select,
select.hg-select,
input.hg-date,
input.hg-date-time,
input.hg-date-range,
input.hg-filter-input {
  height: var(--hg-control-h);
  box-sizing: border-box;
}
/* 单行输入框/日期：定高后把上下 padding 交给 height，仅保留左右 14px。
   line-height = height(精确等于 40px)而不是 calc(40-2=38px)——
   后者在桌面 Chrome 正常但部分移动 WebView(尤其 Android 原生/小米 MIUI)line-height 渲染
   异常，文字贴在容器顶部。
   2026-08-23 改用 **padding 撑开方案**:height 40 + box-sizing border-box + padding 12 上下 +
   line-height 14(=font-size)+ border 1 上下 = 内容区 14px = 单行文字精确居中。
   不依赖浏览器 line-box 居中算法,**所有 WebView(桌面 Chrome/Edge/移动 MIUI)一致**垂直居中。
   line-height 等于 height(40px)在 box-sizing border-box 后 border 2px 占掉,文字行盒 40px > 内容 38px
   → 文字底部贴下边框(偏下),已弃用。 */
input.hg-input:not(textarea),
input.hg-date,
input.hg-date-time,
input.hg-date-range,
input.hg-filter-input,
select.hg-native-select,
select.hg-select {
  height: var(--hg-control-h);
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 14px;
  line-height: 14px;
  box-sizing: border-box;
}
/* 下拉 trigger 是 flex，padding 保留但 height 定高即垂直居中 */
.hg-cselect-trigger { padding-top: 0; padding-bottom: 0; }

.hg-btn,
.hg-filter-btn,
.hg-msg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
@media (max-width: 768px) {
  /* 弹窗按钮组：移动端竖排（容器默认 flex row，按钮 100% 后挤在一行会溢出） */
  .hg-msg-btns { flex-direction: column; }
}

/* 一般上货提交按钮：特异性 (1,1,1) > #pgForm a.hg-filter-btn 的 (1,0,1)，
   覆盖其"查询按钮统一风格"的小尺寸（6px 18px/13px/6px/inline-block），与 .hg-file-btn 同构。
   2026-08-11 用户确认：padding 对齐商品档案按钮 6px 18px */
#pgForm .hg-putprod-actions a.hg-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 18px;
  font-size: 14px; font-weight: 500;
  border-radius: var(--hg-radius);
}

/* 我的盒子模块：表格内容区统一白底（VI 手册要求）。
   仅作用于数据体 tbody，保留表头浅灰（VI 标准的标题行配色）。 */
.hg-mybox .hg-sales-grid { background: #fff !important; }
.hg-mybox .hg-sales-grid tbody td { background: #fff !important; }
/* 压制后台“审核结果”等字段自带的内联颜色标签（<font color>/<span style=color>），统一为 VI 深墨色。
   注意：必须连 td * 一起 !important，否则 <span style="color:..."> 内联色会压过 td 自身规则。 */
.hg-mybox .hg-sales-grid td,
.hg-mybox .hg-sales-grid td * { color: var(--hg-muted) !important; }
/* 鼠标悬浮“反色”：行背景变绿、文字变白（含专属客服链接），与 VI 绿主题一致 */
.hg-mybox .hg-sales-grid tbody tr { transition: background .15s ease, color .15s ease; }
.hg-mybox .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover td { background: var(--hg-primary) !important; color: #fff !important; }
.hg-mybox .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover td * { color: #fff !important; }
/* ===== 我的盒子两表格列宽（2026-08-14 用户指定，作用域限定 .hg-mybox；桌面 120px + 各列 min + 居中 + 自动换行） ===== */
@media (min-width: 769px) {
#pgForm .hg-mybox .hg-sales-grid th.hg-col-shop,
#pgForm .hg-mybox .hg-sales-grid td.hg-col-shop {
  width: 120px !important; min-width: 65px !important; text-align: center !important;
  overflow-wrap: anywhere; word-break: break-all;
}
#pgForm .hg-mybox .hg-sales-grid th.hg-col-boxno,
#pgForm .hg-mybox .hg-sales-grid td.hg-col-boxno {
  width: 120px !important; min-width: 60px !important; text-align: center !important;
  overflow-wrap: anywhere; word-break: break-all;
}
#pgForm .hg-mybox .hg-sales-grid th.hg-col-rentdays,
#pgForm .hg-mybox .hg-sales-grid td.hg-col-rentdays {
  width: 120px !important; min-width: 75px !important; text-align: center !important;
  overflow-wrap: anywhere; word-break: break-all;
}
#pgForm .hg-mybox .hg-sales-grid th.hg-col-leftdays,
#pgForm .hg-mybox .hg-sales-grid td.hg-col-leftdays {
  width: 120px !important; min-width: 75px !important; text-align: center !important;
  overflow-wrap: anywhere; word-break: break-all;
}
#pgForm .hg-mybox .hg-sales-grid th.hg-col-auditresult,
#pgForm .hg-mybox .hg-sales-grid td.hg-col-auditresult {
  width: 120px !important; min-width: 80px !important; text-align: center !important;
  overflow-wrap: anywhere; word-break: break-all;
}
#pgForm .hg-mybox .hg-sales-grid th.hg-boxdate.hg-col-date,
#pgForm .hg-mybox .hg-sales-grid td.hg-boxdate.hg-col-date {
  width: 120px !important; min-width: 58px !important; text-align: center !important;
  overflow-wrap: anywhere; word-break: break-all;
  font-variant-numeric: tabular-nums;
}
}
/* ===== §3.4 全站表格行悬浮（hover）反色（不限于 .hg-mybox；排除页脚行/分页行，与 1476 行模板一致） ===== */
#pgForm .hg-sales-grid tbody tr { transition: background .15s ease, color .15s ease; }
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover td { background: var(--hg-primary) !important; color: #fff !important; }
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover td * { color: #fff !important; }
/* 价牌打印：打印份数列(第8列) hover 反色时保持绿色加粗（覆盖上方 hover 变白规则，仅 .hg-pcgrid 表格） */
#pgForm .hg-sales-grid.hg-pcgrid tbody tr:hover td:nth-child(8) input {
  color: #0066CC !important;
  font-weight: 700 !important;
}
/* ===== §3.5 操作列链接（VI 文本链接） ===== */
#pgForm .hg-sales-grid td a { color: var(--hg-muted) !important; text-decoration: none !important; }
#pgForm .hg-sales-grid td a:hover { color: var(--hg-primary) !important; background: rgba(0, 102, 204, .08) !important; }
/* 我的盒子：盒子申请无数据时其空标题+空表由 default.aspx 的 hgCleanMyBox() 隐藏，此处不用 :has（防止误伤“我的盒子”自身的空表） */

/* 筛选栏 / 按钮（老页多为表格布局，这里提供类供手动包裹；对话框动态注入也用） */
.hg-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 0; margin-bottom: 8px; }
.hg-filter-group { display: inline-flex; align-items: center; gap: 14px; }
.hg-filter-label { font-family: var(--hg-font); font-size: 14px; color: var(--hg-muted); white-space: nowrap; }
/* 2026-08-25 日/月销售分析：月度/年度销售目标金额 —— 蓝色 + 放大加粗，突出显示 */
.hg-target-amt { font-family: var(--hg-font); font-size: 20px; font-weight: 700; color: var(--hg-primary); font-variant-numeric: tabular-nums; line-height: 1.4; }
.hg-filter-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border: 1px solid transparent; border-radius: var(--hg-radius); font-family: var(--hg-font); font-size: 14px; font-weight: 500; line-height: 1.5; text-decoration: none; cursor: pointer; white-space: nowrap; transition: all .2s var(--hg-ease-standard); }
.hg-filter-btn-primary { background: var(--hg-primary); color: #fff; }
.hg-filter-btn-primary:hover { background: var(--hg-primary-deep); box-shadow: var(--hg-shadow-md); }
.hg-filter-btn-secondary { background: var(--hg-surface); color: var(--hg-muted); border-color: var(--hg-border); }
.hg-filter-btn-secondary:hover { background: var(--hg-gray); color: var(--hg-ink); border-color: var(--hg-divider); }
/* 绿色描边白按钮（查询/导出等次要操作，与绿底主按钮成对）：白底、绿字、绿边 */
.hg-field-hint {
  display: inline-block; margin-left: 4px;
  color: var(--hg-primary); font-size: 13px; line-height: 1;
  cursor: help; vertical-align: 1px; user-select: none;
}
.hg-field-hint:hover { color: var(--hg-primary-deep); }
/* 悬停气泡提示（.hg-tip，2026-08-11 新增，全站可复用）：
   圆形小图标（可放 ? / i / ！等单字符）+ 悬停弹出白底气泡 tooltip。
   用法：<span class="hg-tip" data-tip="提示内容">?</span>
   纯 CSS 实现（::before 箭头 + ::after 气泡），不依赖原生 title、零 JS。
   内容取 data-tip 属性，宽 max-content 上限 320px，自动换行。
   图标默认深绿底白字，悬浮时白底灰字（2026-08-13 用户要求，与商品档案结算方式提示同款）。 */
.hg-tip {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  width: 16px; height: 16px;
  margin: 0 2px;
  border: 1px solid var(--hg-primary-deep);
  border-radius: 50%;
  background: var(--hg-primary-deep);
  color: #fff;
  font-family: var(--hg-font); font-size: 11px; font-weight: 600;
  line-height: 1;
  cursor: help;
  user-select: none;
  vertical-align: middle;
  transition: border-color .15s var(--hg-ease-standard), color .15s var(--hg-ease-standard), background .15s var(--hg-ease-standard);
}
.hg-tip:hover { border-color: var(--hg-border); color: var(--hg-muted); background: #fff; }
.hg-tip::before,
.hg-tip::after {
  position: absolute;
  left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%);
  opacity: 0; visibility: hidden;
  transition: opacity .15s var(--hg-ease-standard), visibility .15s;
  pointer-events: none;
  z-index: 60;
}
/* 气泡本体 */
.hg-tip::after {
  content: attr(data-tip);
  width: max-content; max-width: 320px;
  padding: 8px 12px;
  background: #fff;
  color: var(--hg-ink);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  box-shadow: var(--hg-shadow-md);
  font-size: 13px; font-weight: 400;
  line-height: 1.6; text-align: left;
  white-space: pre-line;  /* 支持 data-tip 内 \n 换行（2026-08-12） */
}
/* 小箭头 */
.hg-tip::before {
  content: "";
  width: 8px; height: 8px;
  background: #fff;
  border-right: 1px solid var(--hg-border);
  border-bottom: 1px solid var(--hg-border);
  bottom: calc(100% + 4px);
}
.hg-tip:hover::before,
.hg-tip:hover::after { opacity: 1; visibility: visible; }
.hg-filter-btn-outline { background: #fff; color: var(--hg-primary); border-color: var(--hg-primary); }
.hg-filter-btn-outline:hover { background: #EBF3FC; color: var(--hg-primary-deep); border-color: var(--hg-primary-deep); }
/* 搜索 icon 按钮（商品档案等筛选区的放大镜，2026-08-10 由 wcProd 页面 style 收敛为全局组件类） */
.hg-search-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--hg-radius); background: var(--hg-primary); color: #fff;
  flex-shrink: 0; text-decoration: none; cursor: pointer;
  transition: background .15s ease;
}
.hg-search-icon:hover { background: var(--hg-primary-deep); }
.hg-search-icon svg { display: block; }
/* 表格操作列文字链接（商品档案"修改/删除"等）：加粗绿字下划线，替代实心按钮 */
.hg-link-action {
  display: inline-block;
  padding: 2px 2px;
  font-family: var(--hg-font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--hg-primary);
  background: none;
  border: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease;
}
.hg-link-action:hover { color: var(--hg-primary-deep); }
/* #pgForm 老布局下冲突：
   ① #pgForm td (1,0,1) 继承色压过 .hg-link-action (0,1,0)；
   ② §3.5 #pgForm .hg-sales-grid td a (1,2,1)!important 强制表格链接灰字去下划线。
   故用同级 !important + 特异性 (1,3,1) 才能保证绿字下划线生效（商品档案"修改/删除"） */
#pgForm .hg-sales-grid td a.hg-link-action,
#pgForm .hg-sales-grid td a.hg-link-action:hover {
  color: var(--hg-primary) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
#pgForm .hg-sales-grid td a.hg-link-action:hover { color: var(--hg-primary-deep) !important; }
/* 表格操作列窄列（.hg-op-col，2026-08-11 由店铺收货处理 wcShopGetProdCL 页面级收敛为全局）：
   适用"修改/删除/上货/取消"等两字操作链接。
   桌面宽度 40px（2026-08-21 用户全局指定 80→50→40 防横滚，768-1440 全不横滚）——"修改/删除"两字竖排/断行显示；
   移动端收窄 40px 时用 writing-mode: vertical-lr + text-orientation: upright 竖排（字形正向）。
   GridView 操作列加 Header/ItemStyle-CssClass="hg-op-col" 即生效。 */
#pgForm .hg-sales-grid td.hg-op-col,
#pgForm .hg-sales-grid th.hg-op-col {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 80px !important;
  padding: 6px 2px !important;
  text-align: center !important;
}
/* 桌面（列宽够）：操作链接横向显示，正常文字方向 */
#pgForm .hg-sales-grid td.hg-op-col a {
  display: inline-block !important;
  text-align: center !important;
  padding: 0 !important;
}
/* 操作列内文字链接：绿字下划线（覆盖 #pgForm td 继承色，与 hg-link-action 同规格；竖排后仍是绿字下划线） */
#pgForm .hg-sales-grid td.hg-op-col a.hg-link-action {
  color: var(--hg-primary) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
#pgForm .hg-sales-grid td.hg-op-col a.hg-link-action:hover { color: var(--hg-primary-deep) !important; }
/* 表格内绿色加粗纯文字链接（无下划线、无边框/底色）——通用 action link 变体。
   用于"详单"等纯文字操作链接（2026-08-12 由 wcPutProdQuery 页面级 .hg-qry-bill 收敛为全局） */
#pgForm .hg-sales-grid td a.hg-link-action--bold {
  color: var(--hg-primary) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
}
#pgForm .hg-sales-grid td a.hg-link-action--bold:hover { color: var(--hg-primary-deep) !important; }
/* 商品档案（.hg-prod-grid）：桌面 + 移动端统一 table-layout:fixed，让 30px 操作列宽不被内容撑开、
   且"固定关键列 + 剩余自动均分"策略生效。移动端已有 #pgForm .hg-prod-grid ... 列宽规则（@media），fixed 下正常生效。 */
#pgForm .hg-prod-grid { table-layout: fixed; width: 100% !important; }
/* 2026-08-27 用户指定：商品档案「状态」列页面按类特例 52/45（全局 tag 60/50 保留其他页）；
   Header+Item 双加（铁律4：空表列宽由 th 决定）。移动端该列 hg-mobile-hide 隐藏，无需特例。 */
#pgForm .hg-prod-grid th.hg-col-tag,
#pgForm .hg-prod-grid td.hg-col-tag { width: 52px !important; min-width: 45px; text-align: center !important; }
/* 2026-08-26：商品名称列已改用全局 hg-col-name 契约（桌面 80/52、移动 60/60），
   删除原商品档案 name 页面特例（桌面 auto/min140 随容器被压不稳、移动 auto/0 塌至 11px） */
@media (max-width: 768px) {
  /* 操作列：移动端收窄为 40px 窄列，宽度不够 → 文字竖排（字形正向）（2026-08-21 用户 30→40） */
  #pgForm .hg-sales-grid td.hg-op-col,
  #pgForm .hg-sales-grid th.hg-op-col {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }
  /* 2026-08-15 暂停关注列（hg-col-pause，快速上货盒主版）：移动端默认 48px / 最小 30px
     （覆盖上方 .hg-op-col 的 30px/max30px——同位置后声明，类更具体，win） */
  #pgForm .hg-sales-grid td.hg-col-pause,
  #pgForm .hg-sales-grid th.hg-col-pause {
    width: 48px !important;
    min-width: 30px !important;
    max-width: 48px !important;
  }
  #pgForm .hg-sales-grid td.hg-op-col a {
    writing-mode: vertical-lr !important;
    text-orientation: upright !important;
    display: inline-block !important;
    text-align: center !important;
    padding: 0 !important;
  }
  /* 2026-08-16 「暂停关注」列（快速上货盒主版 .hg-qk）：
     加宽到 36px + 水平排列 + word-break 换行成"暂停 / 关注"两行（每行两字）。
     双类选择器特异性 (1,4,1)/(1,5,1) > 上方 .hg-op-col (1,3,1) 与 .hg-op-col a (1,4,1) 单一类。 */
  #pgForm .hg-sales-grid td.hg-op-col.hg-col-pause,
  #pgForm .hg-sales-grid th.hg-op-col.hg-col-pause {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding: 8px 4px !important;
  }
  #pgForm .hg-sales-grid td.hg-op-col.hg-col-pause a {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: normal !important;
    word-break: break-all !important;
    line-height: 1.35;
    padding: 0 !important;
  }
  /* 移动端表格操作列文字链接：保留文字样式，加高可点区便于触控 */
  .hg-sales-grid td .hg-link-action {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
  }
}
/* 商品名称输入框内嵌搜索按钮（2026-08-11 由 wcProd 页面级收敛为全局组件类）：
   wrap relative + icon absolute 叠在 input 内右端 + input padding-right 让位 */
.hg-search-input-wrap { position: relative; display: inline-block; vertical-align: middle; }
.hg-search-input-wrap .hg-search-input { padding-right: 36px !important; box-sizing: border-box; }
.hg-search-input-wrap .hg-search-icon {
  position: absolute !important; right: 3px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 8px !important;  /* 与输入框视觉圆角一致（输入框 40px/12px ≈ 按钮 26px/8px） */
}
.hg-search-input-wrap .hg-search-icon svg { width: 13px; height: 13px; }
@media (max-width: 768px) {
  .hg-search-input-wrap { flex: 1 1 auto !important; width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
  .hg-search-input-wrap .hg-search-input { width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
}
/* 申请新盒子等页：标签直接写在 <td class="hg-filter-label"> 上，需盖过 #pgForm td 的深墨色，
   使标签严格按 VI 渲染为灰字（--hg-muted） */
#pgForm td.hg-filter-label { color: var(--hg-muted); }
/* 申请新盒子：提交申请按钮移动端占满整行 */
@media (max-width: 768px) {
  .hg-full-mobile { width: 100% !important; box-sizing: border-box; }
  .hg-sales-grid th.hg-col-rentdays, .hg-sales-grid td.hg-col-rentdays { min-width: 60px !important; }
  /* 我的盒子 / 盒子申请表：日期列移动端严格保 84px，压过 .hg-table-scroll 的 table min-width:0 自动收缩
     （table-layout:auto 下该收缩会把列压到 min-width 以下）。作用域限定 .hg-mybox，不动 .hg-mobile-fit 报表页。 */
  #pgForm .hg-mybox .hg-sales-grid th.hg-col-date,
  #pgForm .hg-mybox .hg-sales-grid td.hg-col-date { min-width: 84px !important; }
  /* 我的盒子：起租/截止日期列收窄到一行约 6 个阿拉伯数字（58px），长日期 yyyy-MM-dd 在窄列内自动换行。
     目的：6 列 min-width 总和 60(店铺)+60(编号)+58+58(两日期)+60(剩余租期)+60(客服)=356 < 375 视口，
     表格不再出现横向滚动条。专属类 hg-boxdate（wcMyBox.ascx 起租/截止/申请日期 th+td 声明），
     hgStandardizeColumns 会再追加 hg-col-date（两者共存），本规则在后 + 更高窄宽压过上方 84px；
     盒子申请表（申请日期）2026-08-14 也补 hg-boxdate 类，与截止日期同规则。 */
  #pgForm .hg-mybox .hg-sales-grid th.hg-boxdate,
  #pgForm .hg-mybox .hg-sales-grid td.hg-boxdate {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    text-align: center !important;
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal !important;
    font-variant-numeric: tabular-nums;
  }
  /* 我的盒子：专属客服列移动端收窄 80 → 60px（2-3 个汉字足够容纳，覆盖全局 .hg-col-kefu min-width:80px）。
     仅命中「我的盒子」表（「盒子申请」表无专属客服列，不受影响）。 */
  #pgForm .hg-mybox .hg-sales-grid th.hg-col-kefu,
  #pgForm .hg-mybox .hg-sales-grid td.hg-col-kefu { min-width: 60px !important; width: 60px !important; }
  /* 我的盒子：剩余租期列移动端收窄到约 5 个阿拉伯数字（50px，覆盖全局 .hg-col-leftdays min-width:60px）+ 居中。
     调整后 6 列 min-width 总和 = 60(店铺)+60(编号)+58+58(两日期)+50(剩余租期)+60(客服) = 346px < 375px ✓ 无横向滚动。 */
  #pgForm .hg-mybox .hg-sales-grid th.hg-col-leftdays,
  #pgForm .hg-mybox .hg-sales-grid td.hg-col-leftdays {
    min-width: 50px !important;
    text-align: center !important;
    font-variant-numeric: tabular-nums;
  }
  /* 2026-08-14 用户确认：租用天数 / 审核结果 列移动端收窄到 50px + 居中 + 自动换行（与剩余租期一致） */
  #pgForm .hg-mybox .hg-sales-grid th.hg-col-rentdays,
  #pgForm .hg-mybox .hg-sales-grid td.hg-col-rentdays {
    min-width: 50px !important;
    text-align: center !important;
    overflow-wrap: anywhere; word-break: break-all;
  }
  #pgForm .hg-mybox .hg-sales-grid th.hg-col-auditresult,
  #pgForm .hg-mybox .hg-sales-grid td.hg-col-auditresult {
    min-width: 50px !important;
    text-align: center !important;
    overflow-wrap: anywhere; word-break: break-all;
  }
}

/* 关注度分页标签（我的商品）：匹配 VI 绿主题
   重要：后台 .cs 的 SetBtnColor() 会用 ForeColor 向这些 LinkButton 注入内联
   style="color:Red/Gray"，内联样式优先级高于类选择器，会冲掉下面的绿字/白字。
   因此状态相关属性一律用 !important 强制覆盖，保证：
   选中 = 绿底(#0066CC)白字；未选中 = 白底绿字。 */
.hg-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 6px; }
/* 我的商品“关注度”切换标签（正在关注 / 暂停关注 / 可能需要暂停关注）——三态清晰区分
   默认：白底 + 主题绿字 + 绿边（常规样式）
   悬浮 hover：浅绿底(--hg-primary-soft #EBF3FC) + 深绿字
   选中 active：绿底(--hg-primary #0066CC) + 白字
   选中态由后台 SetBtnColor() 注入内联 color:Red/Gray 标记，并由页面 JS 切换 .hg-tab--active；
   下方两组选择器都命中，确保即使 JS 未生效也能正确显示选中态。内联样式优先级高，故一律 !important。 */
.hg-tab {
  display: inline-block; padding: 7px 18px;
  font-family: Inter, "Noto Sans SC", sans-serif; font-size: 14px; font-weight: 600; line-height: 1.2;
  color: var(--hg-primary) !important;            /* 默认：绿字 */
  background: #fff !important;                      /* 默认：白底（常规样式） */
  border: 1px solid var(--hg-primary) !important;
  border-radius: var(--hg-radius-full); text-decoration: none !important; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.hg-tab:hover {                                     /* 悬浮：浅绿底 */
  background: var(--hg-primary-soft) !important;
  color: var(--hg-primary-deep) !important;
  border-color: var(--hg-primary-deep) !important;
}
.hg-tab:active {                                    /* 按下瞬间：深绿底白字，强化点击反馈 */
  background: var(--hg-primary-deep) !important;
  color: #fff !important;
  border-color: var(--hg-primary-deep) !important;
}
/* 选中态：后台内联 color:Red 标记 或 JS 切换 .hg-tab--active —— 绿底白字 */
.hg-tab[style*="color:Red"],
.hg-tab[style*="color:#FF0000"],
.hg-tab[style*="color:red"],
.hg-tab--active {
  color: #fff !important;
  background: var(--hg-primary) !important;
  border-color: var(--hg-primary) !important;
}
.hg-tab[style*="color:Red"]:hover,
.hg-tab[style*="color:#FF0000"]:hover,
.hg-tab[style*="color:red"]:hover,
.hg-tab--active:hover {                              /* 选中悬浮：深绿底，保持白字 */
  background: var(--hg-primary-deep) !important;
  border-color: var(--hg-primary-deep) !important;
  color: #fff !important;
}

#pgForm .hg-sales-grid th a {
  color: var(--hg-muted) !important;                /* 排序链接 = VI 灰字（覆盖默认蓝） */
  text-decoration: none !important;
  cursor: pointer;
}
#pgForm .hg-sales-grid th a:hover { color: var(--hg-primary) !important; }   /* 悬浮：主题绿 */

/* 隐藏后台注入的旧 ASP.NET 排序箭头 gif（含缺失的 sortdescending.gif 破图） */
#pgForm .hg-sales-grid th img[src*="sortascending.gif"],
#pgForm .hg-sales-grid th img[src*="sortdescending.gif"] { display: none !important; }

/* 当前排序列：主题深绿 + 加粗（:has 不支持时优雅降级为仅灰字，仍可点） */
#pgForm .hg-sales-grid th:has(img[src*="sortascending.gif"]) > a,
#pgForm .hg-sales-grid th:has(img[src*="sortdescending.gif"]) > a {
  color: var(--hg-primary-deep) !important;         /* 当前排序列：主题深绿 */
  font-weight: 700;
}
/* 升/降序 VI 绿色三角箭头：紧邻标题文字、与表头居中对齐一致，间距/字号统一 */
#pgForm .hg-sales-grid th:has(img[src*="sortascending.gif"]) > a::after {
  content: "\25B2"; margin-left: 4px; font-size: 10px; line-height: 1; color: var(--hg-primary-deep); vertical-align: middle;
}
#pgForm .hg-sales-grid th:has(img[src*="sortdescending.gif"]) > a::after {
  content: "\25BC"; margin-left: 4px; font-size: 10px; line-height: 1; color: var(--hg-primary-deep); vertical-align: middle;
}

/* 我的商品页：中和老 divstyle.css 的橙色筛选标签，统一为 VI 灰 */
table.hg-myprod #querytitle,
table.hg-myprod #queryinputto { color: var(--hg-muted) !important; font-weight: normal !important; }

/* 表格滚动容器 */
.hg-table-scroll { overflow-x: auto; }

/* 右侧栏 .hg-mobile-fit 表格：宽→窄→手机连续平滑适配，默认无横向滚动条。
   强制 table-layout:fixed + width:100%，并把列契约(.hg-col-*)的固定宽/最小宽清零
   （靠 #pgForm 提升特异度压过全局 .hg-col-* 契约），列随容器均分、内容换行不溢出。
   若某页面列过多导致破表（列宽和超出容器），滚动容器 overflow-x:auto 兜底出现横向滚动条，
   便于发现与调整。仅作用于带 .hg-mobile-fit 的表格，其它 133 个报表页不受影响。 */
#pgForm .hg-mobile-fit { overflow-x: auto; }
#pgForm .hg-mobile-fit .hg-sales-grid { min-width: 0; table-layout: fixed; width: 100% !important; }
/* 后台代码给表格内联 style="word-break:keep-all" 会禁止中文商品名换行，导致移动端列宽固定(25%)时
   长名称溢出单元格、盖住右侧列，看起来“只显示一半”。用 !important 的 break-all 压过内联 keep-all，
   让中文在列内正常折行；!important 才能覆盖内联样式。 */
#pgForm .hg-mobile-fit .hg-sales-grid th,
#pgForm .hg-mobile-fit .hg-sales-grid td { white-space: normal !important; overflow-wrap: anywhere !important; word-break: break-all !important; }
/* 申请人/手机号/编码列在 .hg-mobile-fit 容器内恢复词边界自动换行（不拆字）：
   上方通用 break-all !important（1,2,1）会压过全局 hg-col-applicant/hg-col-phone/hg-col-code
   的 word-break:normal（0,1,1），此处用 (1,3,1) + !important 恢复；overflow-wrap:anywhere 仍兜底超长串。
   2026-08-21 用户全局指定自动换行（微信/微信号列走 hg-col-code） */
#pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-applicant,
#pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-applicant,
#pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-phone,
#pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-phone,
#pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-code,
#pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-code { word-break: normal !important; }
/* 移动端：重置 JS 自动分类加的像素宽语义类（hg-col-code 120px 等），让 .hg-mobile-fit 表格能压缩到窄屏。
   桌面保留语义类像素宽 → 固定关键列 + 剩余列自动分配（table-layout:fixed 未设宽列均分剩余）。
   窄屏下语义类像素宽清零，由各列均分/页面自身移动端规则接管。 */
@media (max-width: 768px) {
  #pgForm .hg-mobile-fit .hg-sales-grid th[class*="hg-col-"],
  #pgForm .hg-mobile-fit .hg-sales-grid td[class*="hg-col-"] { width: auto !important; min-width: 0 !important; }
  /* 商品列表（商品档案等 .hg-mobile-fit 表格）：移动端可见列宽度（2026-08-11 用户确认"移动端更紧凑"）。
     编码/条码/金额 64px(min48)，状态/结算方式 48px(min40)，名称 60px 固定（2026-08-25 由 auto 改回全局契约 60/60，fixed 下 auto 列不吸收会塌 14px） */
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-code, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-code { width: 64px !important; min-width: 48px !important; }
  /* 盒主：48/32 恢复（2026-08-21 用户：店铺收货等 .hg-mobile-fit 表格盒主列被 L3218 重置为 auto，未单独恢复） */
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-boxer, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-boxer { width: 48px !important; min-width: 32px !important; }
  /* 条码：移动端稍宽以显示更多位，超长自动换行 */
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-barcode, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-barcode { width: 96px !important; min-width: 60px !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-name, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-name { width: 60px !important; min-width: 60px !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-num, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-num { width: 64px !important; min-width: 48px !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-amt, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-amt { width: 64px !important; min-width: 48px !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-tag, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-tag { width: 48px !important; min-width: 40px !important; }
  /* 结算方式：移动端 64px 装下"按收益率" */
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-jstype, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-jstype { width: 64px !important; min-width: 48px !important; }
  /* 通用列（center/text 等）：操作列"修改/删除"等无表头列常落 center，移动端不能压到内容宽度以下。
     2026-08-21 用户：center 移动端 55px 固定（不再弹性吸收，防独吞剩余宽度） */
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-center, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-center { width: 55px !important; min-width: 55px !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-text, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-text { width: auto !important; min-width: 64px !important; }
  /* 2026-08-21 补充恢复（申请新盒处理/盒子租赁 加 hg-mobile-fit 后暴露）：L3233 重置为 auto/0 的
     未恢复类——date/shop/applicant/phone/auditresult。值沿用全局移动契约（L1938-1957）。
     审核结果(auditresult)：移动端 auto/min56 + 自动换行（长文换行展示，固定 290 会压爆窄屏）。 */
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-date, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-date { width: 56px !important; min-width: 56px !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-shop, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-shop { width: 48px !important; min-width: 32px !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-applicant, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-applicant { width: 56px !important; min-width: 40px !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-phone, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-phone { width: 64px !important; min-width: 50px !important; }
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-auditresult, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-auditresult { width: 76px !important; min-width: 56px !important; white-space: normal !important; overflow-wrap: anywhere !important; word-break: break-all !important; }
  /* 盒子编号：L3258 重置后漏恢复（2026-08-25 wcBoxQuery 全局化暴露 fixed 下 auto 塌 14px）；值沿用全局 boxno 桌面 100/60 的移动压缩，与 code 同类 */
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-boxno, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-boxno { width: 64px !important; min-width: 48px !important; }
  /* 百分比列：L3258 重置后漏恢复（2026-08-25 wcBoxQuery 盒主收益率改 hg-col-pct 暴露 fixed 下 auto 塌 6px）；移动端统一 48/48（用户 2026-08-25） */
  #pgForm .hg-mobile-fit .hg-sales-grid th.hg-col-pct, #pgForm .hg-mobile-fit .hg-sales-grid td.hg-col-pct { width: 48px !important; min-width: 48px !important; }
}
/* 2026-08-21 撤回：店铺收货名称列页面特例已删——全局 .hg-mobile-fit 段 L3225 已将 name min-width 改回 60px（全站 .hg-mobile-fit 表格名称列统一 min60） */
#pgForm .hg-mobile-fit .hg-sales-grid input { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }

/* 自定义下拉（body-portal）：隐藏原生 <select>，JS 生成 trigger + 菜单 append 到 body(fixed)，
   圆角+阴影，在 #pgForm 对话框内也能正常弹出。由 default.aspx 全局 hgInitCustomSelects 构建。 */
select.hg-cselect { display: none !important; }
.hg-cselect-wrap { position: relative; display: inline-block; vertical-align: middle; }
.hg-cselect-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: auto; min-width: 80px; max-width: 100%; padding: 8px 14px; font-family: var(--hg-font); font-size: 14px; line-height: 1.4; color: var(--hg-ink); background: var(--hg-surface); border: 1px solid var(--hg-border); border-radius: var(--hg-radius); cursor: pointer; user-select: none; box-sizing: border-box; transition: background .2s var(--hg-ease-standard), border-color .2s var(--hg-ease-standard); }
.hg-cselect-trigger:hover { background: var(--hg-primary-soft); border-color: var(--hg-primary); }
.hg-cselect-trigger.is-open { border-color: var(--hg-primary); }
/* 禁用态（2026-08-12：原生 select disabled 时增强下拉一并禁用，如分店锁定的结算方式） */
.hg-cselect-trigger--disabled { background: var(--hg-gray); color: var(--hg-muted); cursor: not-allowed; }
.hg-cselect-trigger--disabled:hover { background: var(--hg-gray); border-color: var(--hg-border); }
.hg-cselect-trigger--disabled .hg-cselect-arrow { display: none; }
.hg-cselect-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-cselect-arrow { flex: none; display: inline-flex; transition: transform .2s var(--hg-ease-standard); }
.hg-cselect-trigger.is-open .hg-cselect-arrow { transform: rotate(180deg); }
.hg-cselect-menu { position: fixed; z-index: 9999; min-width: 0; max-height: 260px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--hg-surface); border: 1px solid var(--hg-border); border-radius: var(--hg-radius); box-shadow: 0 10px 28px rgba(17,24,39,.18); font-family: var(--hg-font); font-size: 14px; }
.hg-cselect-menu::-webkit-scrollbar { width: 8px; }
.hg-cselect-menu::-webkit-scrollbar-thumb { background: var(--hg-divider); border-radius: var(--hg-radius-sm); }
.hg-cselect-menu::-webkit-scrollbar-track { background: transparent; }
.hg-cselect-option { padding: 8px 12px; line-height: 1.4; border-radius: var(--hg-radius-sm); color: var(--hg-secondary-light); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-cselect-option:hover { background: var(--hg-primary-soft); color: var(--hg-primary); }
.hg-cselect-option.is-selected { background: var(--hg-primary); color: #fff; }
.hg-cselect--shop { width: auto; min-width: 150px; max-width: 300px; }
.hg-cselect--pagesize { width: auto; min-width: 80px; }
.hg-cselect--pagesize.hg-cselect-trigger,
.hg-cselect-trigger.hg-cselect--pagesize { color: #000 !important; background: var(--hg-surface) !important; }
.hg-cselect--year { width: auto; min-width: 72px; }
.hg-cselect--bare .hg-cselect-trigger { background: transparent !important; color: var(--hg-muted) !important; border-color: var(--hg-divider) !important; }
.hg-cselect--bare .hg-cselect-trigger:hover { background: transparent !important; border-color: var(--hg-faint) !important; }
.hg-cselect--bare .hg-cselect-trigger.is-open { border-color: var(--hg-primary) !important; }

/* ===== 下拉多选（select.hg-cselect-multi 生成 .hg-ms-wrap 触发器+面板） ===== */
select.hg-cselect-multi { display: none !important; }
.hg-ms-wrap { position: relative; display: block; min-width: 240px; max-width: 100%; }
.hg-ms-trigger {
  width: 100%; box-sizing: border-box;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 14px; min-height: 40px;
  background: var(--hg-surface); border: 1px solid var(--hg-border); border-radius: var(--hg-radius);
  font-family: var(--hg-font); font-size: 14px; color: var(--hg-ink);
  text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: border-color .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
}
.hg-ms-trigger::after { content: "▾"; color: var(--hg-muted); flex: none; }
.hg-ms-trigger.is-open { border-color: var(--hg-primary); box-shadow: 0 0 0 3px rgba(0, 102, 204, .12); }
.hg-ms-trigger.is-open::after { content: "▴"; color: var(--hg-primary); }
.hg-ms-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--hg-surface); border: 1px solid var(--hg-border); border-radius: var(--hg-radius);
  box-shadow: var(--hg-shadow-md); max-height: 260px; overflow-y: auto;
  padding: 6px; z-index: 60; display: none;
}
.hg-ms-panel.is-open { display: block; }
.hg-ms-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--hg-radius-sm); cursor: pointer;
  font-family: var(--hg-font); font-size: 13px; color: var(--hg-ink);
}
.hg-ms-item:hover { background: var(--hg-gray); }
.hg-ms-item input[type="checkbox"] { accent-color: var(--hg-primary); width: 16px; height: 16px; flex: none; margin: 0; }
.hg-ms-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 可筛选下拉：展开面板顶部注入的实时搜索框（仅 .hg-cselect--filterable 生效） */
.hg-cselect-menu .hg-cselect-filter {
  position: sticky; top: 0; z-index: 2;
  margin: -6px -6px 6px; padding: 8px;
  background: var(--hg-surface); border-bottom: 1px solid var(--hg-border);
}
.hg-cselect-menu .hg-cselect-filter-input {
  width: 100%; box-sizing: border-box;
  font-family: var(--hg-font); font-size: 13px; color: var(--hg-ink);
  border: 1px solid var(--hg-border); border-radius: var(--hg-radius-sm); padding: 7px 10px; outline: none;
}
.hg-cselect-menu .hg-cselect-filter-input::placeholder { color: var(--hg-faint); }
.hg-cselect-menu .hg-cselect-filter-input:focus { border-color: var(--hg-primary); box-shadow: 0 0 0 3px rgba(0, 102, 204, .15); }
.hg-cselect-menu .hg-cselect-filter-empty {
  list-style: none; padding: 10px 12px; color: var(--hg-faint); font-size: 13px; text-align: center;
}

/* 原生 select 绿主题（备用：不给 hg-cselect 时用，菜单由浏览器原生渲染，零 JS） */
select.hg-native-select { appearance: none; -webkit-appearance: none; -moz-appearance: none; padding: 8px 34px 8px 14px; font-family: var(--hg-font); font-size: 14px; color: var(--hg-ink); background: var(--hg-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid var(--hg-border); border-radius: var(--hg-radius) !important; cursor: pointer; box-sizing: border-box; -webkit-border-radius: var(--hg-radius) !important; }
select.hg-native-select:hover { background-color: var(--hg-primary-soft); border-color: var(--hg-divider); }
select.hg-native-select:focus { outline: none; border-color: var(--hg-primary); background-color: var(--hg-surface); }

/* 绿色日期输入框（flatpickr 接管 input.hg-date）：统一白底（初始/选定后/聚焦均为 #fff，与 .hg-input VI 基准一致）。
   2026-08-15 缩小：宽 130→190、padding 8/14→6/12、字号 14→13（与 .hg-date-range 缩小规则一致，避免被本块覆盖） */
.hg-date, .hg-date-time {
  width: 190px; max-width: 100%; padding: 6px 12px; font-family: var(--hg-font);
  font-size: 13px; color: var(--hg-ink); background: var(--hg-surface); border: 1px solid var(--hg-border); border-radius: var(--hg-radius);
  box-sizing: border-box; transition: background .2s var(--hg-ease-standard), border-color .2s var(--hg-ease-standard);
}
.hg-date:hover, .hg-date-time:hover { background: var(--hg-surface); border-color: var(--hg-divider); }
.hg-date:focus, .hg-date:focus-visible, .hg-date-time:focus, .hg-date-time:focus-visible { outline: none; border-color: var(--hg-primary); background: var(--hg-surface); }
.flatpickr-input { background: #fff !important; }
/* flatpickr 弹出层：显式锁定白底（压过 flatpickr.min.css 的 background:transparent 初始态） */
.flatpickr-calendar { background: #fff !important; }
.flatpickr-calendar.open, .flatpickr-calendar.inline { background: #fff !important; }
.hg-date-time { width: 190px; }
@media (max-width: 768px) {
  .hg-filter-bar .hg-date, .hg-filter-bar .hg-date-time { width: 100%; }
  .hg-modify-btn { width: 100% !important; box-sizing: border-box; }
}

/* ===== 站内信状态：单色信封图标替代老式彩色 gif（绿=未读 灰=已读） ===== */
.hg-mail-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1; }
.hg-mail-status__ico { width: 18px; height: 18px; flex: 0 0 auto; }
.hg-mail-status.is-unread { color: var(--hg-primary); font-weight: 600; }
.hg-mail-status.is-read { color: var(--hg-muted); }
.hg-mail-status.is-unread::after { content: "未读"; }
.hg-mail-status.is-read::after { content: "已读"; }
/* ===== 站内信顶部操作按钮（icon + 文字，替代彩色 GIF） ===== */
.hg-mail-actions { display: flex; align-items: center; gap: 28px; padding: 8px 0 16px; }
.hg-mail-action { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: var(--hg-muted); font-size: 13px; font-weight: 500; text-decoration: none; transition: color .15s var(--hg-ease-standard); border: 0; background: transparent; padding: 0; cursor: pointer; }
.hg-mail-action:hover, .hg-mail-action:focus { color: var(--hg-primary); text-decoration: none; }
.hg-mail-action__icon { width: 24px; height: 24px; }
.hg-mail-action__text { line-height: 1; }
.hg-mail-action.is-active { color: var(--hg-primary); font-weight: 600; }

/* ===== 站内信表单 ===== */
.hg-mail-form { width: 100%; }
.hg-mail-form td { padding: 6px 8px 6px 0; vertical-align: middle; }
.hg-mail-form .hg-filter-label { color: var(--hg-ink); font-weight: 600; white-space: nowrap; }

/* ===== 小按钮（表格内操作） ===== */
.hg-filter-btn-sm { padding: 4px 10px !important; font-size: 12px !important; border-radius: var(--hg-radius-xs) !important; }

/* ===== 首页 VI 对齐补充 ===== */
/* 最新公告：清理老式彩色（如 <font color="#ff1493"> 粉红），统一为 VI 绿强调，去除刺眼彩色 */
#pgForm .hg-col font[color] { color: var(--hg-primary) !important; }
/* 公告链接统一绿主题（与 VI 链接色一致），去掉潜在的彩色下划线杂色 */
#pgForm .hg-col a { color: var(--hg-primary) !important; }
#pgForm .hg-col a:hover { color: var(--hg-primary-deep) !important; text-decoration: underline !important; }

/* ===================== 未登录首页：会员登录卡片（VI 规范） ===================== */
/* 去掉原 hydl.gif 图片标题，改文字“会员登录”；所有文字按 VI 灰字(--hg-muted)、字号按 VI 手册。
   三个原 ImageButton（登录/忘记密码/注册新用户）保留控件 ID 与类型（DLL 强类型绑定），
   仅将图片透明铺满、文字叠在上层、点击穿透到图片触发原服务端提交。 */
.hg-login-card {
  font-family: var(--hg-font);
  color: var(--hg-muted);
  max-width: 380px;
}
/* 2026-08-17 登录标题用全局 .hg-page-title（20px 深绿 700），补回与下方 label 的间距 */
.hg-login-card .hg-page-title { margin-bottom: 18px !important; }
/* 2026-08-29 未登录首页：左侧登录卡片高度由 td 自动等高决定，内容自然流居上，
   无需用 JS 拉伸卡片（拉伸会让内高大于右侧图片框，出现底部多余白边）。 */
/* .hg-login-card.hg-stretch { ... } 已删除 —— 由 .hg-shell 表格等高处理。 */
/* 2026-08-17 登录卡片内验证码输入组：100% 撑满卡片不超宽，右侧嵌入获取验证码按钮 */
.hg-login-card .hg-input-group { width: 100% !important; max-width: 100% !important; }
/* 2026-08-17 双模式登录：验证码登录 / 密码登录 标签切换 */
.hg-login-tabs {
  display: flex; gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--hg-border);
}
.hg-login-tab {
  padding: 8px 16px;
  font-size: 14px; color: var(--hg-muted);
  cursor: pointer; user-select: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.hg-login-tab:hover { color: var(--hg-ink); }
.hg-login-tab--active {
  color: var(--hg-primary); font-weight: 600;
  border-bottom-color: var(--hg-primary);
}
.hg-login-panel { margin-bottom: 14px; }
/* 2026-08-17 手机号前缀 +86 容器（参考小红书风格）：左侧 +86 + 右侧 input */
.hg-phone-prefix {
  display: flex; align-items: stretch;
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--hg-border); border-radius: var(--hg-radius);
  background: var(--hg-surface); overflow: hidden;
  transition: border-color .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
}
.hg-phone-prefix:focus-within {
  border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 163, .15);
}
.hg-phone-prefix-code {
  display: inline-flex; align-items: center; padding: 0 12px;
  background: var(--hg-bg-2, #F8FAFC);
  color: var(--hg-muted); font-size: 14px;
  border-right: 1px solid var(--hg-border);
  user-select: none;
}
.hg-phone-prefix > input.hg-phone-input {
  flex: 1 1 auto; min-width: 0;
  border: 0 !important; border-radius: 0 !important;
  background: transparent; box-shadow: none !important;
  padding: 11px 14px; font-size: 14px;
  font-family: var(--hg-font); color: var(--hg-ink);
}
.hg-phone-prefix > input.hg-phone-input:focus { outline: none; }
/* 2026-08-17 登录/注册按钮并排（split 模式） */
.hg-login-actions--split {
  display: flex; gap: 10px;
  margin-bottom: 12px;
}
.hg-login-btn--flex { flex: 1; justify-content: center; }
.hg-login-agree {
  font-size: 12px;
  line-height: 1.6;
  color: var(--hg-muted);
  margin: 0 0 18px;
  text-align: left;
}
.hg-login-agree a {
  color: var(--hg-primary);
  text-decoration: none;
}
.hg-login-agree a:hover { text-decoration: underline; }
/* 我的账户：提示小字 + 上传头像按钮 */
.hg-hint { font-size: 12px; color: var(--hg-muted); margin-left: 6px; }
.hg-upload-btn {
  display: inline-block; cursor: pointer;
  font-family: var(--hg-font); font-size: 13px; font-weight: 600;
  color: #fff; background: var(--hg-primary);
  border: 0; border-radius: var(--hg-radius, 8px);
  padding: 7px 14px; margin-top: 6px;
}
.hg-upload-btn:hover { background: var(--hg-green-d); }
.hg-login-title {
  font-size: 18px; font-weight: 700; color: var(--hg-muted);
  margin: 0 0 18px; letter-spacing: -.01em;
}
.hg-login-field { margin-bottom: 14px; }
.hg-login-label {
  display: block; font-size: 13px; color: var(--hg-muted);
  margin-bottom: 6px;
}
.hg-login-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; font-size: 14px; font-family: var(--hg-font);
  color: var(--hg-ink); background: var(--hg-surface);
  border: 1px solid var(--hg-border); border-radius: var(--hg-radius-sm);
  transition: border-color .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
}
.hg-login-input:focus {
  outline: none; border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px var(--hg-primary-soft);
}
.hg-login-remember { margin: 4px 0 18px; font-size: 13px; }
.hg-login-check { font-size: 13px; color: var(--hg-muted); }
/* 2026-08-17 登录/注册勾选协议链接：绿色 + 下划线（全局 CSS，其他页面也可复用） */
.hg-login-remember a {
  color: var(--hg-primary);
  text-decoration: underline;
  font-size: 13px;
}
.hg-login-remember a:hover { color: var(--hg-primary-deep); }
.hg-login-err { display: block; font-size: 12px; color: var(--hg-danger); margin-top: 4px; }
.hg-login-actions { margin-bottom: 12px; }
.hg-login-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* 文字按钮：覆盖原 ImageButton 图片（透明铺满），文字在上层、点击穿透到图片触发原提交 */
.hg-login-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: var(--hg-radius);
  font-family: var(--hg-font); font-size: 14px; font-weight: 500; line-height: 1.4;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: background .2s var(--hg-ease-standard), color .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
}
.hg-login-actions .hg-login-btn { display: flex; width: 100%; }
.hg-ib-fill {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; padding: 0; cursor: pointer;
}
.hg-login-btn__txt { position: relative; pointer-events: none; }
.hg-login-btn--primary { background: var(--hg-primary); color: #fff; box-shadow: var(--hg-shadow-sm); }
.hg-login-btn--primary:hover { background: var(--hg-primary-deep); box-shadow: var(--hg-shadow-md); }
.hg-login-btn--ghost { background: transparent; color: var(--hg-muted); }
.hg-login-btn--ghost:hover { color: var(--hg-primary); background: var(--hg-primary-soft); }

/* ===================== 我的账户表单输入框（VI 设计手册） =====================
   仅作用于 wcUserInfo 页（.hg-userinfo 容器），避免裸 .hg-input 泄漏全站
   覆盖 §17 统一高度规则；该页输入框宽度 300px，padding 走 §17 定高垂直居中 */
.hg-userinfo .hg-input {
  font-family: var(--hg-font);
  font-size: 14px;
  line-height: calc(var(--hg-control-h) - 2px);
  color: var(--hg-ink);
  background: var(--hg-surface);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  padding: 0 12px;
  height: var(--hg-control-h);
  width: 300px;
  max-width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color .15s var(--hg-ease-standard), box-shadow .15s var(--hg-ease-standard);
}
.hg-userinfo .hg-input:hover { border-color: var(--hg-divider); }
.hg-userinfo .hg-input:focus {
  border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px var(--hg-primary-soft);
}
/* 只读/锁定字段（用户名称、电子邮箱）：VI 灰底 + 灰字，呼应“(不能修改)”。
   !important 统一压过页面内联 BackColor/Gainsboro 等旧写法——全站 readonly 输入框灰底一律 #F3F4F6（--hg-gray） */
.hg-input[readonly], .hg-input:disabled, .hg-input--locked {
  background: var(--hg-gray) !important;
  color: var(--hg-muted);
  cursor: not-allowed;
}
/* 公告编辑（wcGongGaoDlg）日期输入框特例（2026-08-21 用户）：readonly 但白底——
   flatpickr 点击弹日历，无需灰底"不可编辑"提示；特异性 (1,1,1)+!important 压过上方全局 readonly 灰底 */
#pgForm .hg-form-date[readonly] { background: #fff !important; cursor: pointer; }
/* 公告编辑「重要」勾选：标题输入框蓝色加粗预览（2026-08-21 用户，JS 在 wcGongGaoDlg apply() 切换类） */
#pgForm .hg-imp-title-on { color: #0066CC !important; font-weight: 700 !important; }
/* 重要公告标题（2026-08-21 用户：公告发布列表/首页重要公告加粗蓝色，替代原红叹号图标）。
   .hg-notice-cell a 变体特异性 (0,2,1) 压过 wcBoxerSY 内联 `.hg-notice-cell a{color:var(--hg-muted)!important}`(0,1,1) */
.hg-imp-title,
.hg-notice-cell a.hg-imp-title { color: #0066CC !important; font-weight: 700 !important; }
/* 首页重要公告（.hg-col 容器内）：蓝色加粗，特异性 (1,2,1) 压过
   #pgForm .hg-col a 的 VI 绿（1,1,1），hover 保持蓝色不被深绿覆盖（2026-08-21 用户） */
#pgForm .hg-col a.hg-imp-title,
#pgForm .hg-col .hg-notice-cell a.hg-imp-title,
#pgForm .hg-col a.hg-imp-title:hover,
#pgForm .hg-col .hg-notice-cell a.hg-imp-title:hover { color: #0066CC !important; font-weight: 700 !important; }
/* 公告发布权限列（2026-08-21 用户：桌面 80/60）——权限列 JS 推断为 hg-col-center，
   但 center 全局 70/60 是上货/打印等共享值（20:31 用户指定），故本页按类特例覆盖 */
@media (min-width: 769px) {
  #pgForm .hg-notice-grid th.hg-col-center,
  #pgForm .hg-notice-grid td.hg-col-center { width: 80px !important; min-width: 60px !important; }
}
/* 公告编辑日期输入框边框统一灰色（2026-08-21 用户，参考 .hg-input 灰边框 #E5E7EB）：
   覆盖 flatpickr.min.css 激活态蓝色边框+蓝色阴影，让两个日期框视觉与标题输入框统一 */
input.hg-form-date,
input.hg-form-date:focus,
input.hg-form-date.open,
input.hg-form-date.active,
.flatpickr-input,
.flatpickr-input:focus,
.flatpickr-input.open,
.flatpickr-input.active { border-color: var(--hg-border) !important; box-shadow: none !important; }
/* 我的账户：用户名称 / 旧密码 输入框与“手机号码”同宽（300px）。
   覆盖登录框规则 [id$="_edtUserName"],[id$="_edtPasswrd"]{max-width:220px!important} 的泄漏
   ——“我的账户”页与登录页共用 edtUserName/edtPasswrd 控件 ID，被误套了登录框样式。
   仅给本页这两个框加 .hg-acct 类，不影响登录页。max-width:100% 保证移动端不溢出。 */
.hg-acct { width: 300px !important; max-width: 100% !important; }

/* ===== 我的账户 - 圆形头像 ===== */
.hg-avatar{
  position:relative; width:96px; height:96px; margin:0;
  border-radius:50%; background:var(--hg-primary);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; border:3px solid #fff;
  box-shadow:0 2px 10px rgba(0, 102, 204, .25);
}
.hg-avatar:hover{ box-shadow:0 2px 14px rgba(0, 102, 204, .4); }
.hg-avatar-img{ width:100%; height:100%; object-fit:cover; border-radius:50%; display:none; }
.hg-avatar-char{ color:#fff; font-size:40px; font-weight:700; font-family:Inter,"Noto Sans SC",sans-serif; display:flex; align-items:center; justify-content:center; }
.hg-avatar-cam{
  position:absolute; right:2px; bottom:2px; width:26px; height:26px;
  border-radius:50%; background:var(--hg-primary-deep); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:13px;
  box-shadow:0 1px 3px rgba(0,0,0,.3);
}
/* ===== 我的账户 - 头像裁剪弹层 ===== */
.hg-cropper-modal{
  position:fixed; inset:0; z-index:9999; display:none;
  align-items:center; justify-content:center; background:rgba(17,24,39,.55);
}
.hg-cropper-box{
  width:300px; max-width:92vw; background:#fff; border-radius: var(--hg-radius-lg);
  padding:18px; box-shadow:0 20px 60px rgba(0,0,0,.3);
}
.hg-cropper-title{ font-size:16px; font-weight:700; color:var(--hg-primary-deep); margin-bottom:12px; }
.hg-crop-stage{
  position:relative; width:240px; height:240px; max-width:82vw; max-height:82vw;
  margin:0 auto; overflow:hidden; background:var(--hg-canvas);
  touch-action:none; cursor:grab; border:1px solid var(--hg-line);
}
.hg-crop-img{
  position:absolute; left:0; top:0; width:100%; height:100%;
  object-fit:cover; transform-origin:center center; will-change:transform; pointer-events:none;
}
.hg-crop-mask{
  position:absolute; inset:0; border-radius:50%;
  box-shadow:0 0 0 9999px rgba(17,24,39,.5); pointer-events:none;
}
.hg-cropper-bar{ display:flex; align-items:center; gap:10px; margin:14px 0 4px; }
.hg-crop-zoom{ flex:1; accent-color:var(--hg-primary); }
.hg-cropper-btns{ display:flex; gap:10px; margin-top:14px; }
.hg-cropper-btns .hg-filter-btn{ flex:1; }

/* ============================================================
   HGBOX · 提示弹窗（Notification Modal）
   统一承接服务端 ShowMsg / window.alert 输出，渲染为 VI 绿主题提示弹窗。
   结构：.hg-msg-mask(遮罩) > .hg-msg-card(卡片) > 图标 + 标题 + 正文 + 按钮
   状态：成功(.hg-msg-icon--ok 绿) / 失败(.hg-msg-icon--err 红)
   ============================================================ */
.hg-msg-mask {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, .45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.hg-msg-mask.hg-show { display: flex; }
.hg-msg-card {
  width: min(360px, 92vw);
  margin: auto;
  background: #fff;
  border-radius: var(--hg-radius-lg);
  box-shadow: 0 20px 50px rgba(17, 24, 39, .28);
  padding: 28px 24px 22px;
  text-align: center;
  font-family: Inter, "Noto Sans SC", sans-serif;
  animation: hgMsgIn .22s ease both;
}
@keyframes hgMsgIn {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.hg-msg-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  color: #fff; font-size: 28px; font-weight: 700;
}
.hg-msg-icon svg { width: 30px; height: 30px; display: block; }
.hg-msg-icon--ok  { background: var(--hg-ok); }
.hg-msg-icon--err { background: #DC2626; }
.hg-msg-title {
  margin: 0 0 6px;
  font-size: 17px; font-weight: 700; color: #111827;
  font-family: Inter, "Noto Sans SC", sans-serif;
}
.hg-msg-text {
  margin: 0 0 20px;
  font-size: 14px; line-height: 1.6; color: #374151;
  font-family: Inter, "Noto Sans SC", sans-serif;
  word-break: break-word;
}
.hg-msg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 120px;
  padding: 10px 22px;
  font-family: Inter, "Noto Sans SC", sans-serif;
  font-size: 14px; font-weight: 600;
  color: #fff; background: var(--hg-primary);
  border: 0; border-radius: var(--hg-radius-full); cursor: pointer;
  transition: background .2s ease;
}
.hg-msg-btn:hover { background: var(--hg-primary-deep); }

/* 一般上货：商品大类/小类移除“全部”后，初始空白态显示“请选择”提示（不默认选中任何类别） */
.hg-putprod-card select#edtType1 + .hg-cselect-wrap .hg-cselect-text:empty::before,
.hg-putprod-card select#edtType2 + .hg-cselect-wrap .hg-cselect-text:empty::before {
  content: '请选择';
  color: var(--hg-muted);
}

/* ============================================================
   操作确认框（Confirm Modal）：替代浏览器原生 confirm，遵循 VI 手册 §⑦ 弹窗规范
   结构：.hg-msg-mask > .hg-msg-card > 问号图标 + “操作确认”标题 + 正文 + 取消/确定 双按钮
   确定=主题绿实心；取消=白底绿字描边（hover 浅绿底）
   ============================================================ */
/* 2026-08-14 统一弹窗图标底色：确认框(--ask)也改实心绿底白问号，与成功/失败(--ok/--err)完全一致，
   消除之前浅绿底(#EBF3FC)在浅色卡片上偏蓝的观感差异 */
.hg-msg-icon--ask { background: var(--hg-primary); }
.hg-msg-icon--ask svg { stroke: #fff; }
.hg-msg-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
}
.hg-msg-btn--ghost {
  background: #fff !important;
  color: var(--hg-primary) !important;
  border: 1px solid var(--hg-border);
}
.hg-msg-btn--ghost:hover {
  background: var(--hg-primary-soft) !important;
  color: var(--hg-primary-deep) !important;
}
/* =========================================================================
   预上货清单（wcPutProdLst）表格专用样式
   ========================================================================= */
/* 图片列：加宽 + 缩略图圆角/边框，点击放大（灯箱）；保持 1:1 显示不拉伸。
   必须限定 .hg-lst-grid（2026-08-13 修复：原无容器限定泄漏到全站，把商品调价处理/库存查询等
   所有 hg-col-img 图片列都撑成 120px——这些页面应走通用契约 80px L2008） */
#pgForm .hg-sales-grid.hg-lst-grid td.hg-col-img { text-align: center !important; width: 120px !important; min-width: 120px !important; }
.hg-lst-img {
  display: inline-block;
  width: 80px !important;
  height: 80px !important;
  min-width: 80px;
  min-height: 80px;
  border-radius: var(--hg-radius);
  border: 1px solid var(--hg-border);
  object-fit: cover;
  cursor: zoom-in;
  background: #F3F4F6;
  vertical-align: middle;
  transition: box-shadow .15s ease;
}
.hg-lst-img:hover { box-shadow: 0 2px 10px rgba(0,0,0,.15); }
/* 备注列：文本居中（列契约 mtext 未定义，走默认回退 center；此处显式声明双保险） */
#pgForm .hg-sales-grid td.hg-col-mtext { text-align: center !important; }
/* 灯箱（图片大图预览）：点击缩略图弹出，遮罩深色 + 居中大图 + 关闭按钮 */
/* 商品缩略图（全站图片列统一规范，手册 §11.9）：放大镜光标 + 圆角边框 + hover 阴影，
   统一宽度 60px（与商品档案 wcProd 一致），display:block + margin:auto 居中，
   height 自由（保持原始比例，object-fit:cover 防拉伸）。
   页面禁止内联 Width/Height 覆盖此标准（2026-08-12 确立）。 */
.hg-cl-img {
  display: block;
  margin: 0 auto;
  width: 60px !important;
  height: 60px !important;  /* 2026-08-15 方形缩略图（点击放大保持原始比例） */
  min-width: 60px;
  min-height: 60px;
  border-radius: var(--hg-radius);
  border: 1px solid var(--hg-border);
  object-fit: cover;
  cursor: zoom-in;
  background: #F3F4F6;
  vertical-align: middle;
  transition: box-shadow .15s ease;
}
.hg-cl-img:hover { box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.hg-lightbox-mask {
  position: fixed; inset: 0; z-index: 2147483001;
  background: rgba(15, 23, 42, .82);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; cursor: zoom-out;
  animation: hgLightboxIn .18s ease;
}
.hg-lightbox-box {
  max-width: 92vw; max-height: 88vh;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: var(--hg-radius); padding: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.hg-lightbox-box img {
  max-width: 90vw; max-height: 84vh;
  object-fit: contain; border-radius: var(--hg-radius); display: block;
}
.hg-lightbox-close {
  position: absolute; top: 18px; right: 22px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.16); border: 0; cursor: pointer;
  color: #fff; font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.hg-lightbox-close:hover { background: rgba(255,255,255,.32); }
@keyframes hgLightboxIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

/* =========================================================================
   详单浮动窗口（从 wcPutProdQuery.ascx 本地 <style> 迁移，2026-08-13）
   VI 设计手册 §弹出层规范：遮罩 rgba(17,24,39,.45)（与全站 .hg-msg-mask 同源）；
   白卡圆角 var(--hg-radius-lg)、柔和阴影；标题栏浅绿底 + 深绿标题 + 分隔线；
   关闭按钮 VI 灰，hover 浅绿底深绿字。 */
.hg-billview-mask {
  position: fixed; inset: 0;
  background: rgba(17, 24, 39, .45);
  z-index: 2147483100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.hg-billview-box {
  position: relative;  /* 2026-08-16 让 head 右上角 absolute 相对 box 定位 */
  background: #fff; border-radius: var(--hg-radius-lg);
  width: 100%; max-width: 640px; height: 86%;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  font-family: var(--hg-font);
}
/* iframe 高度：box 是 flex column，iframe 严格撑满 box 高度（flex-basis:0 强制 grow + height:100% 兜底）→
   内页内容超出时 iframe 内部出滚动条，绝不撑大 box；box overflow:hidden 兜底截断溢出。 */
.hg-billview-iframe { flex: 1 1 0% !important; height: 100% !important; width: 100% !important; min-height: 0 !important; max-height: 100% !important; border: 0 !important; display: block !important; }
/* 窗口头：右上角 absolute 浮层（不占布局空间），仅显示 ✕ 关闭按钮；标题由内页 lblTitle 撑起。
   box 已是 position:relative，head 直接 top/right 即可。 */
.hg-billview-head {
  display: block !important;
  position: absolute !important; top: 10px !important; right: 12px !important; z-index: 10 !important;
  padding: 0 !important; border: 0 !important; background: transparent !important; flex: none !important;
}
.hg-billview-title { display: none !important; }  /* 隐藏"单据详情"标题文字 */
.hg-billview-close {
  border: 0; background: rgba(255,255,255,.9); font-size: 20px; cursor: pointer;
  color: #6B7280; padding: 4px 10px; line-height: 1; border-radius: var(--hg-radius-sm);
  transition: background .15s ease, color .15s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);  /* 浮在 iframe 上方需微弱阴影区分 */
}
.hg-billview-close:hover { background: #D6E7F9; color: #0052A3; }
.hg-billview-iframe { flex: 1; border: 0; width: 100%; background: #fff; }

/* ===== 详单页头部信息（wcBillView.aspx 弹窗内，2026-08-13）=====
   标签灰字 + 值深色加粗，flex 换行排布，用于"单号/日期/店铺/操作员/类别"等单据头字段。 */
.hg-billhead {
  display: flex; flex-wrap: wrap;
  gap: 8px 24px;
  padding: 10px 14px;
  background: #F9FAFB;
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  margin-bottom: 14px;
}
.hg-billhead-item { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.hg-billhead-label { font-size: 12px; color: var(--hg-muted); white-space: nowrap; flex: none; }
.hg-billhead-value { font-size: 13px; font-weight: 600; color: #111827; word-break: break-all; }
/* 详单弹窗 iframe 内页（wcBillView.aspx）：卡片撑满 iframe 视口高度（弹窗容器 .hg-billview-box
   是 flex 列，iframe flex:1，内页必须 100vh 才能铺满不留白） */
.hg-billview-page { min-height: 100vh; box-sizing: border-box; }
/* 详单弹窗内页表格：独立页无 #pgForm，cl-grid 的 fixed 布局与弹性列规则需单独声明。
   图片80+条码140+单价85+数量80 = 385px 固定，商品名称(hg-col-flex)弹性吸收剩余空间铺满弹窗。 */
.hg-billview-page .hg-sales-grid.hg-cl-grid { table-layout: fixed !important; width: 100% !important; }
.hg-billview-page .hg-sales-grid.hg-cl-grid th.hg-col-flex,
.hg-billview-page .hg-sales-grid.hg-cl-grid td.hg-col-flex { width: auto !important; min-width: 120px !important; }
/* 详单弹窗 iframe 内页移动端列宽（2026-08-16）：表格 width:100% + 各列百分比（合计 100%）。
   5 列：图片 18 / 名称 30 / 条码 22 / 单价 15 / 数量 15 → 不超 iframe 容器、铺满、无横向滚动。
   商品名称 hg-col-flex 在移动端改固定 30%，避免桌面 width:auto 在 fixed 布局下被压缩成 0。 */
@media (max-width: 768px) {
  .hg-billview-page .hg-table-scroll { overflow-x: hidden !important; }
  .hg-billview-page .hg-sales-grid.hg-cl-grid th,
  .hg-billview-page .hg-sales-grid.hg-cl-grid td { padding: 8px 4px !important; min-width: 0 !important; }
  .hg-billview-page .hg-sales-grid.hg-cl-grid th.hg-col-img,
  .hg-billview-page .hg-sales-grid.hg-cl-grid td.hg-col-img { width: 18% !important; max-width: none !important; }
  .hg-billview-page .hg-sales-grid.hg-cl-grid th.hg-col-flex,
  .hg-billview-page .hg-sales-grid.hg-cl-grid td.hg-col-flex { width: 30% !important; min-width: 0 !important; word-break: break-all; }
  .hg-billview-page .hg-sales-grid.hg-cl-grid th.hg-col-barcode,
  .hg-billview-page .hg-sales-grid.hg-cl-grid td.hg-col-barcode { width: 22% !important; min-width: 0 !important; }
  .hg-billview-page .hg-sales-grid.hg-cl-grid th.hg-col-amt,
  .hg-billview-page .hg-sales-grid.hg-cl-grid td.hg-col-amt { width: 15% !important; min-width: 0 !important; text-align: right !important; }
  .hg-billview-page .hg-sales-grid.hg-cl-grid th.hg-col-num,
  .hg-billview-page .hg-sales-grid.hg-cl-grid td.hg-col-num { width: 15% !important; min-width: 0 !important; text-align: center !important; }
}

/* =========================================================================
   上货查询（wcPutProdQuery）页面专属样式（从本地 <style> 迁移，2026-08-13）
   1. 上货数量列(hg-col-num)居中：覆盖全局 .hg-col-num { text-align: right !important }
   2. 查询类型下拉(--bare) trigger 颜色对齐 --shop trigger
   3. 移动端列宽适配 + 筛选竖排 + 无横向溢出 */
#pgForm .hg-putprodquery .hg-sales-grid th.hg-col-num,
#pgForm .hg-putprodquery .hg-sales-grid td.hg-col-num { text-align: center !important; }
#pgForm .hg-content-card.hg-putprodquery .hg-cselect--bare .hg-cselect-trigger,
#pgForm .hg-content-card.hg-putprodquery .hg-cselect--bare .hg-cselect-text { color: #111827 !important; }
@media (max-width: 768px) {
  #pgForm .hg-putprodquery .hg-filter-bar,
  #pgForm .hg-putprodquery .hg-filter-group {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 5px !important;
  }
  #pgForm .hg-putprodquery .hg-filter-bar { padding: 0 !important; margin-bottom: 4px !important; }
  #pgForm .hg-putprodquery .hg-filter-bar > .hg-filter-btn { margin-top: 12px !important; }
  /* 2026-08-16 上货查询移动端列宽（v2，修复横向滚动）：
     根因：table-layout:fixed 但表格未设 width:100% → 表格宽度 = 列宽总和（汇总 360 / 单据 460px）> 容器
     （360 视口 294px / 390 视口 324px / 414 视口 348px）→ 横向滚动。
     方案：表格 width:100% 填满容器 + 各列百分比宽度（总和 100%）→ 任何视口都铺满、永不溢出。
     min-width 全归 0（table-layout:fixed 下宽度由 width 决定，防百分比被 min-width 撑破）。
     汇总（Grd）5 列 + 单据（Grd2）6 列共用容器/padding；公共列 shop/num 写一次，两表专用列各写一次。 */
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid { width: 100% !important; min-width: 0 !important; table-layout: fixed !important; }
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid th,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td { padding: 8px 4px !important; min-width: 0 !important; }
  /* 公共列（汇总+单据）：shop 16% / num 11% */
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid th.hg-col-shop,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-col-shop { width: 16% !important; }
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid th.hg-col-num,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-col-num { width: 11% !important; text-align: center !important; }
  /* 汇总（Grd）专用：name 22% / status 11% / text 40%（合计 22+16+11+11+40=100%） */
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid th.hg-col-name,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-col-name { width: 22% !important; text-align: center !important; word-break: break-all; }
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid th.hg-col-status,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-col-status { width: 11% !important; text-align: center !important; word-break: break-all; }
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid th.hg-col-text,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-col-text,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-col-mtext { width: 40% !important; word-break: break-all; }
  /* 单据（Grd2）专用：billno 27% / billtime 15% / billtype 12% / op 19%（合计 27+16+15+11+12+19=100%） */
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid th.hg-col-billno,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-col-billno { width: 27% !important; word-break: break-all; }
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid th.hg-col-billtime,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-col-billtime { width: 15% !important; text-align: center !important; word-break: break-all; }
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid th.hg-col-billtype,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-col-billtype { width: 12% !important; text-align: center !important; word-break: break-all; }
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid th.hg-op-col,
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-op-col {
    width: 19% !important;
    min-width: 0 !important;
    max-width: none !important;        /* 关键：覆盖全局 hg-op-col 移动端 max-width:30px（强制竖排），让 19% 真正生效 → "详单"横排 */
    padding: 8px 4px !important;
    text-align: center !important;
  }
  /* 单据表「详单」链接：强制水平居中横排，覆盖全局竖排样式 */
  #pgForm .hg-putprodquery .hg-sales-grid.hg-cl-grid td.hg-op-col a {
    display: inline-block !important;
    text-align: center !important;
    white-space: nowrap !important;    /* 防「详单」二字被 word-break 拆行 */
    writing-mode: horizontal-tb !important;  /* 显式水平排列，覆盖全局 vertical-lr */
  }
  #pgForm .hg-putprodquery .hg-sales-grid td > * {
    max-width: 100% !important;
    box-sizing: border-box;
    word-break: break-all;
    overflow-wrap: anywhere;
  }
  #pgForm .hg-putprodquery .hg-sales-grid td > span,
  #pgForm .hg-putprodquery .hg-sales-grid td > input,
  #pgForm .hg-putprodquery .hg-sales-grid td > img {
    display: block !important;
    width: 100% !important;
  }
  #pgForm .hg-putprodquery .hg-sales-grid td label,
  #pgForm .hg-putprodquery .hg-sales-grid td > label > input { display: inline !important; width: auto !important; max-width: none !important; }
}
/* 老 table 布局（hg-legacy-filter）内的筛选栏：压紧行间间距（默认 padding 5/0 + margin-bottom 8 ≈ 13px，
   老 .ascx 用多个独立 <tr> 摆放每行筛选条件时会撑出明显垂直空隙；上货查询 wcPutProdQuery / wcPutProdQuery2 同款问题）。
   作用域限定 .hg-legacy-filter，不影响卡片内 (.hg-content-card / .hg-page-card) 的 .hg-filter-bar。 */
.hg-legacy-filter .hg-filter-bar { padding: 0 !important; margin-bottom: 0 !important; }
/* 预上货清单（wcPutProdLst）：行悬浮时整行深绿色背景、文字转白保证可读；
   「取消」按钮常态白底绿字绿边 + 加粗 700（outline，20260804 用户要求"加粗绿色样式"），
   行悬浮深绿底时按钮保持白底绿字（outline 专属规则压过 td a 的白字覆盖），与行背景形成强烈反差。
   触发层级为 tr:hover —— 鼠标悬停该行任意位置（不必移到按钮上）即生效；
   去掉按钮的 0.2s transition 渐变，行悬停瞬间按钮即时呈现。
   作用域限定 .hg-lst-grid，不影响其他表格。 */
#pgForm .hg-sales-grid.hg-lst-grid .hg-filter-btn { transition: none !important; }
#pgForm .hg-sales-grid.hg-lst-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover td {
  background: var(--hg-primary-deep) !important;
  color: #fff !important;
}
#pgForm .hg-sales-grid.hg-lst-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover td a { color: #fff !important; }
#pgForm .hg-sales-grid.hg-lst-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover .hg-filter-btn-outline,
#pgForm .hg-sales-grid.hg-lst-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover .hg-filter-btn-outline:hover {
  background: #fff !important;
  color: var(--hg-primary) !important;
  border-color: var(--hg-primary) !important;
}
/* =========================================================================
   下货查询（wcPutDownQuery）/ 库存查询（wcStockQuery）：老筛选区 VI 化
   #querytitle/#queryinput 源自 css/divstyle.css（橙色加粗 100px + 固定 180px float），
   不符合 VI（灰字、紧凑、宽度自适应）。此处覆盖为 VI 规范（不改页面结构）。
   ========================================================================= */
#pgForm #querytitle {
  float: none !important;
  display: inline-block !important;
  width: auto !important;
  margin-right: 6px;
  font-size: 14px;
  font-weight: normal !important;
  color: var(--hg-muted) !important;
  line-height: 32px;
  vertical-align: middle;
  white-space: nowrap;
}
#pgForm #queryinput {
  float: none !important;
  display: inline-block !important;
  width: auto !important;
  margin-right: 14px;
  line-height: 32px;
  vertical-align: middle;
  white-space: nowrap;
}
#pgForm #queryinput select,
#pgForm #queryinput input[type="text"],
#pgForm #queryinput .hg-input,
#pgForm #queryinput .hg-cselect-trigger { width: 150px !important; }
#pgForm #queryinputto {
  float: none !important;
  display: inline-block !important;
  width: auto !important;
  color: var(--hg-muted) !important;
  font-weight: normal !important;
  line-height: 32px;
  vertical-align: middle;
}
#pgForm #querybutton {
  float: none !important;
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  font-weight: normal !important;
  text-decoration: none !important;
  margin-left: 4px;
  vertical-align: middle;
}
/* 库存查询「商品大类/小类」的 dropdown 放在 #querybutton 里（原样式错位），同样铺到 150px */
#pgForm #querybutton select.hg-cselect,
#pgForm #querybutton select { width: 150px !important; }

/* ===== 全局输入框现代化（v8 · 替换 My97DatePicker 后统一） =====
   覆盖所有弹窗/页面中的裸 <input type="text"> 和 <asp:TextBox> 渲染的 <input>
   使旧式 table 布局查询表单中的输入框获得统一现代外观 */
#pgForm input[type="text"]:not(.hg-dp-ready):not(.flatpickr-input):not([class*="hg-range-"]) {
  height: var(--hg-control-h);
  box-sizing: border-box;
  padding: 0 10px;
  font-family: var(--hg-font); font-size: 13px; color: var(--hg-ink);
  background: var(--hg-surface);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  outline: none;
  line-height: calc(var(--hg-control-h) - 2px); /* 与 §17 单行输入框等高 40px 垂直居中 */
  transition: border-color .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
}
#pgForm input[type="text"]:not(.hg-dp-ready):not(.flatpickr-input):not([class*="hg-range-"]):focus {
  border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px var(--hg-primary-pale);
}
/* 日期输入框（已由 flatpickr 接管）：同样风格但背景微微倾斜以区分 */
#pgForm input.hg-date:not(.hg-dp-ready),
#pgForm input.flatpickr-input {
  padding: 6px 10px;
  font-family: var(--hg-font); font-size: 13px; color: var(--hg-ink);
  background: var(--hg-primary-soft);
  border: 1px solid var(--hg-primary-light);
  border-radius: var(--hg-radius-xs);
  outline: none;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
}
#pgForm input.hg-date:focus,
#pgForm input.flatpickr-input:focus {
  border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px var(--hg-primary-pale);
  background: var(--hg-surface);
}
/* 日期范围合并框 */
#pgForm input.hg-date-range {
  padding: 6px 10px;
  font-family: var(--hg-font); font-size: 13px; color: var(--hg-ink);
  /* 2026-09-02 用户：促销日期灰底改白底。!important 压过全局 .hg-input[readonly] 灰底
     （日期框是 flatpickr 只读框但可点弹日历，同 wcGongGaoDlg .hg-form-date 先例） */
  background: #fff !important;
  border: 1px solid var(--hg-primary-light);
  border-radius: var(--hg-radius-xs);
  outline: none;
  cursor: pointer;
  min-width: 220px;
}
#pgForm input.hg-date-range:focus {
  border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px var(--hg-primary-pale);
  background: var(--hg-surface);
}
/* 查询按钮统一风格（覆盖旧式 asp:LinkButton）——尺寸对齐全局 .hg-filter-btn 标准（14px/12px圆角/8px 18px/inline-flex），
   2026-08-12 修正：原 13px/--hg-radius-xs/6px/inline-block 导致三页按钮比一般上货小，现统一 */
#pgForm a.hg-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-family: var(--hg-font); font-size: 14px; font-weight: 500;
  color: #fff; background: var(--hg-primary);
  border-radius: var(--hg-radius); border: none;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .2s var(--hg-ease-standard);
  line-height: 1.5;
}
#pgForm a.hg-filter-btn:hover {
  background: var(--hg-primary-deep);
  color: #fff; text-decoration: none !important;
}
#pgForm a.hg-filter-btn-primary {
  background: var(--hg-primary);
  color: #fff;
}
#pgForm a.hg-filter-btn-primary:hover {
  background: var(--hg-primary-deep);  /* 与全局 .hg-filter-btn-primary:hover 一致（原 --hg-primary-dark 更深，hover 颜色不统一 2026-08-10） */
}
/* outline 变体（LinkButton 渲染为 <a>）：与 #pgForm a.hg-filter-btn 同级特异性、后定义，
   覆盖其绿底白字+去边框，还原白底绿字绿边；圆角 12px（压过 #pgForm a.hg-filter-btn 的 --hg-radius-xs 6px）；
   inline-flex + align-items/justify-content center 保证文字垂直居中 */
#pgForm a.hg-filter-btn-outline {
  background: #fff !important;
  color: var(--hg-primary) !important;
  border: 1px solid var(--hg-primary) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--hg-radius) !important;  /* 12px */
}
#pgForm a.hg-filter-btn-outline:hover {
  background: #EBF3FC !important;
  color: var(--hg-primary-deep) !important;
  border-color: var(--hg-primary-deep) !important;
}
/* 商品档案对话框操作按钮：恢复全局 .hg-filter-btn 标准样式
   （#pgForm a.hg-filter-btn 的"查询按钮统一风格"小尺寸 6px 18px/13px/6px 会压过全局类，
   此处用更高特异性 (1,1,1) 覆盖回 padding 8px 18px、font-size 14px、圆角 var(--hg-radius) 12px、
   inline-flex 垂直居中——即全局 CSS 的绿色主按钮完整样式） */
#pgForm .hg-proddlg-actions a.hg-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 14px;
  border-radius: var(--hg-radius);  /* 12px */
}
/* 下拉框统一微调 */
#pgForm select:not(.hg-cselect) {
  padding: 5px 8px;
  font-family: var(--hg-font); font-size: 13px;
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius-xs); outline: none;
  background: var(--hg-surface);
  color: var(--hg-ink);
  transition: border-color .2s;
}
#pgForm select:not(.hg-cselect):focus {
  border-color: var(--hg-primary);
}

/* ===================== 非模态轻提示 toast（2026-09-12） =====================
   用途：进页面时的「告知类提示」（POS 未审核单提醒等）。
   与 .hg-dlg 的区别：不带遮罩、pointer-events:none，绝不拦截点击，
   不会像全屏模态那样把左侧菜单盖住导致「点菜单没反应、要点两次」。 */
.hg-toast {
  position: fixed; top: 14px; left: 50%;
  transform: translate(-50%, -14px);
  z-index: 10000;
  display: flex; align-items: center; gap: 9px;
  max-width: 86vw; padding: 10px 16px;
  border-radius: var(--hg-radius);
  background: #111827; color: #fff;
  font-family: var(--hg-font); font-size: 14px; line-height: 1.5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  opacity: 0; transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
.hg-toast.hg-toast-in { opacity: 1; transform: translate(-50%, 0); }
.hg-toast-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: 0 0 auto; }
.hg-toast--err .hg-toast-dot { background: #ef4444; }

/* ===================== VI 弹窗组件（确认/消息，替换原生 confirm/alert） ===================== */
.hg-dlg {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
}
.hg-dlg.hg-show { display: flex; }
.hg-dlg-backdrop {
  position: absolute; inset: 0;
  background: rgba(17, 24, 39, .45);
  backdrop-filter: blur(2px);
}
.hg-dlg-panel {
  position: relative;
  width: min(400px, 92vw);
  background: var(--hg-surface);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius-xl);
  box-shadow: var(--hg-shadow-lg);
  padding: 24px 24px 20px;
  box-sizing: border-box;
  animation: hgDlgIn .18s var(--hg-ease-standard);
  /* 2026-09-11 同 .hg-modal-panel：#pgForm line-height:0 会渗透进对话框，恢复默认行高 */
  line-height: 1.5;
}
@keyframes hgDlgIn {
  from { opacity: 0; transform: scale(.94) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.hg-dlg-icon {
  width: 44px; height: 44px; margin: 0 auto 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  flex-shrink: 0;
  align-self: center; /* panel 是 column flex，必须用 align-self 居中而非 margin auto */
}
/* 2026-08-21 确认/信息 icon 与 .hg-msg-icon--ask 视觉统一：实蓝底白字问号（替代浅蓝底蓝字——更醒目、风格一致） */
.hg-dlg-icon--question { background: var(--hg-primary); color: #fff; }
.hg-dlg-icon--info     { background: var(--hg-primary); color: #fff; }
/* 确认框 SVG 问号尺寸（2026-08-21） */
.hg-dlg-icon svg { width: 24px; height: 24px; display: block; }
/* 2026-08-21 消息弹窗按文案判图标（对齐 .hg-msg 三态方案）：错误红叉 / 成功绿勾，白字实底 */
.hg-dlg-icon--ok       { background: var(--hg-ok); color: #fff; }
.hg-dlg-icon--error    { background: #DC2626; color: #fff; }
.hg-dlg-title {
  text-align: center; font-size: 16px; font-weight: 600;
  color: var(--hg-ink); margin-bottom: 10px; line-height: 1.5;
  flex-shrink: 0;
}
.hg-dlg-msg {
  text-align: center; font-size: 14px; color: var(--hg-muted);
  line-height: 1.7; margin-bottom: 20px; white-space: pre-wrap; word-break: break-word;
  flex-shrink: 0;
}
.hg-dlg-actions {
  display: flex; gap: 10px; justify-content: center;
  flex-shrink: 0;
}
.hg-dlg-actions .hg-filter-btn { min-width: 92px; }

/* ===== 店铺收货处理（.hg-cl-grid）网格契约（2026-08-12 由 wcShopGetProdCL 页面 style 收敛为全局）===== */
/* VI 表头：浅灰底、居中、钱包灰，!important 防 WebForms 内联样式覆盖 */
/* 2026-08-21：table-layout:fixed !important（让 min-width 真正约束列宽）。`#pgForm` + `!important` 压过上方
   L1583 `#pgForm .hg-sales-grid { table-layout: auto }`（特异性 0,1,1 相同→!important 胜出）。
   GridView 默认 table-layout:auto → min-width 是 hint 不强制，名称列会被压到内容宽→每字一行；
   改 fixed 后 min60 真正约束列宽≥60px。其他无 .hg-cl-grid 类的 .hg-sales-grid（如一般列表）仍走 L1583 auto。 */
#pgForm .hg-cl-grid { width: 100%; border-collapse: collapse; table-layout: fixed !important; border: 1px solid #E6E8EB; border-radius: var(--hg-radius); overflow: hidden; background: #fff; }
/* 申请新盒处理/盒子租赁：date 特例 78/60 已随全局 hg-col-date 120/84→78/60（2026-08-25）废弃，两页直接走全局契约 */
/* 申请新盒处理 数量列：居中（2026-08-22 用户；覆盖全局 td.hg-col-num 数字右对齐，仅本页） */
#pgForm .hg-sales-grid.hg-boxsqcl-grid th.hg-col-num,
#pgForm .hg-sales-grid.hg-boxsqcl-grid td.hg-col-num { text-align: center !important; }
/* 盒子调换（wcBoxChg）筛选控件间距：页面无 .hg-filter-bar 容器，Label/DropDown 紧贴（用户 2026-08-22 反馈）
   给内容卡直接子级 label/select/input/a.hg-filter-btn 统一右边距 14px，对齐全局 .hg-filter-bar 间距
   范围只匹配 .hg-content-card 直接子级（其他已重构页筛选区在 .hg-filter-bar 嵌套内，不受影响） */
#pgForm .hg-content-card > label,
#pgForm .hg-content-card > select,
#pgForm .hg-content-card > input[type=text],
#pgForm .hg-content-card > input[type=checkbox],
#pgForm .hg-content-card > a.hg-filter-btn,
#pgForm .hg-content-card > span.hg-filter-btn { margin-right: 14px; vertical-align: middle; }
/* 申请新盒处理 移动端（≤768）列宽特例（2026-08-22 用户：移动端隐藏 数量/租期/手机号/微信号 后，
   可见 6 列=申请日期+店铺+申请人+审核日期+审核结果+操作，全局移动契约总和 372 > 容器 309 会横滚；
   压缩到 55+42+50+55+65+40 = 307 ≤ 309 不横滚。审核结果窄列换行显示长文）。 */
@media (max-width: 768px) {
  #pgForm .hg-sales-grid.hg-boxsqcl-grid th.hg-col-date,
  #pgForm .hg-sales-grid.hg-boxsqcl-grid td.hg-col-date { width: 55px !important; min-width: 45px; }
  #pgForm .hg-sales-grid.hg-boxsqcl-grid th.hg-col-shop,
  #pgForm .hg-sales-grid.hg-boxsqcl-grid td.hg-col-shop { width: 42px !important; min-width: 36px; }
  #pgForm .hg-sales-grid.hg-boxsqcl-grid th.hg-col-applicant,
  #pgForm .hg-sales-grid.hg-boxsqcl-grid td.hg-col-applicant { width: 50px !important; min-width: 42px; }
  #pgForm .hg-sales-grid.hg-boxsqcl-grid th.hg-col-auditresult,
  #pgForm .hg-sales-grid.hg-boxsqcl-grid td.hg-col-auditresult { width: 65px !important; min-width: 55px; }
}

/* ===== 续租/退租（wcBoxMg，根 .hg-boxmg）列宽特例（2026-08-25 去 nth-child 化）=====
   盒主/店铺名称走全局 hg-col-shop、租金走全局 hg-col-amt（95/75 右对齐）、租用天数走全局 hg-col-rentdays、
   盒子编号走全局 hg-col-boxno（2026-08-25 已全局 120→100/60）；
   本段仅保留移动端无法用全局契约表达的压缩特例：盒子编号 34% / 截止日期 62px（固定 min/max，防日期单行破表）。 */
@media (max-width: 768px) {
  #pgForm .hg-boxmg .hg-sales-grid th.hg-col-boxno,
  #pgForm .hg-boxmg .hg-sales-grid td.hg-col-boxno { width: 34% !important; }
  #pgForm .hg-boxmg .hg-sales-grid th.hg-col-date,
  #pgForm .hg-boxmg .hg-sales-grid td.hg-col-date { width: 62px !important; min-width: 62px !important; max-width: 62px !important; }
}

/* 盒子状态查询（wcBoxQuery）：移动端列宽特例已删除（2026-08-25 用户要求全部走全局 CSS），
   移动端列宽由全局移动契约接管：boxno→auto、状态(tag)→44/36、盒主名称(name)→60/60、
   盒主收益率(amt)→56/44（fit 64/48）、日期(date)→76/56；隐藏列由 hg-mobile-hide 控制 */

/* ===== 盒子租赁（wcBoxLease）审核结果列换行特例（2026-08-25 去 nth-child(9) 化）=====
   审核结果(第9列)长文换行；原页面 th:nth-child(9) 改为按 classifyTable 实际映射的 hg-col-auditresult 语义类定位 */
#pgForm .hg-boxlease .hg-sales-grid th.hg-col-auditresult,
#pgForm .hg-boxlease .hg-sales-grid td.hg-col-auditresult { white-space: normal !important; word-break: break-word !important; overflow-wrap: anywhere !important; }
/* 店铺收货处理（.hg-shopgetgrid）桌面：fixed 布局下列总和 643px（图片80+盒主80+条码120+单价95+库存60+上货44+打印44+操作列40×3）
   + 名称列 min60 = 703（2026-08-22 用户方法：全局契约收缩后重算，785→703，769 视口容器 703 不再横滚）。
   容器 < 703 时表格溢出横向滚动、名称列保底 60 不塌 0；容器充足时表格仍撑满、名称列吸收剩余。契约变更须同步此值。 */
@media (min-width: 769px) {
  #pgForm .hg-sales-grid.hg-shopgetgrid { min-width: 703px !important; }
  /* 2026-08-22 用户：上货/打印列 44→70px；单价 90px；条码保持 95px（固定列总和 683 ≤ 703 最窄容器，无需压缩条码）——
     固定列=图片80+盒主80+条码95+单价90+库存48+上货70+打印70+操作50×3 = 683 + 名称吸收。 */
  #pgForm .hg-sales-grid.hg-shopgetgrid th.hg-col-barcode,
  #pgForm .hg-sales-grid.hg-shopgetgrid td.hg-col-barcode { width: 95px !important; min-width: 60px; }
  #pgForm .hg-sales-grid.hg-shopgetgrid th.hg-col-amt,
  #pgForm .hg-sales-grid.hg-shopgetgrid td.hg-col-amt { width: 90px !important; min-width: 60px; }
  #pgForm .hg-sales-grid.hg-shopgetgrid th.hg-col-stock,
  #pgForm .hg-sales-grid.hg-shopgetgrid td.hg-col-stock { width: 48px !important; min-width: 40px; }
  #pgForm .hg-sales-grid.hg-shopgetgrid th.hg-col-center,
  #pgForm .hg-sales-grid.hg-shopgetgrid td.hg-col-center { width: 70px !important; min-width: 60px; }
}
/* 2026-08-21：默认 table-layout:fixed——让 min-width 真正约束列宽（auto 布局下 min 是 hint 不强制，名称列会被压到内容宽→每字一行）；
   价牌打印/单据查看页/上货查询等 .hg-cl-grid 表格已是 fixed 行为；店铺收货 GridView 默认 auto→ 改为 fixed */
/* 桌面端：hg-cl-grid 表格 table-layout:fixed + width:100%，
   关键列有显式 width（如 hg-col-name 180px），浏览器严格按声明值执行。
   操作列(hg-op-col)设为 width:auto，吸收剩余空间，
   避免 fixed+100% 时各列被比例缩放（如 120px→180px）。 */
@media (min-width: 769px) {
  #pgForm .hg-mobile-fit .hg-sales-grid.hg-cl-grid { table-layout: fixed !important; width: 100% !important; }
  /* 操作列固定 50px（2026-08-21 用户全局指定 56→50 防横滚）：不再吸收剩余空间。原 width:auto 会让窗口缩小时只有操作列伸缩、
     其他数据列完全不动；剩余空间改由商品名称列（hg-col-flex）吸收。 */
  #pgForm .hg-sales-grid.hg-cl-grid th.hg-op-col,
  #pgForm .hg-sales-grid.hg-cl-grid td.hg-op-col {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
  }
  /* 快速上货（.hg-cl-grid.hg-sticky-head）：sticky 表头表格不包 .hg-table-scroll/.hg-mobile-fit
     滚动容器（容器 overflow 会破坏 sticky 吸顶），故上方 .hg-mobile-fit 作用域的 fixed 规则不适用，
     此处独立声明桌面端 fixed 布局。移动端仍走下方 .hg-cl-grid 通用移动端规则。 */
  #pgForm .hg-sales-grid.hg-cl-grid.hg-sticky-head { table-layout: fixed !important; width: 100% !important; }
  /* 暂停关注列（盒主版快速上货）：固定 120px，与 hg-op-col 叠加使用。
     固定后 hg-col-flex（商品名称）成为唯一 auto 列，吸收表格全部剩余空间。 */
  #pgForm .hg-sales-grid.hg-cl-grid th.hg-col-pause,
  #pgForm .hg-sales-grid.hg-cl-grid td.hg-col-pause {
    width: 120px !important;
    min-width: 120px !important;
  }
}
.hg-cl-grid th, .hg-cl-grid td { font-family: var(--hg-font), system-ui, -apple-system, 'Microsoft YaHei', sans-serif; padding: 10px 12px; font-size: 13px; color: var(--hg-muted); border-bottom: 1px solid #E6E8EB; border-right: 1px solid #E6E8EB; font-weight: 400 !important; }
/* GridView 表头行：现代 thead 优先；兼容无 thead 时 tbody 首行（2026-08-29 在线销售首行白底修复） */
.hg-cl-grid thead tr > th, .hg-cl-grid thead tr > td,
.hg-cl-grid tbody:first-child tr:first-child > th, .hg-cl-grid tbody:first-child tr:first-child > td { font-weight: 700 !important; text-align: center !important; background: #f3f4f6 !important; color: var(--hg-muted) !important; }
/* 操作链接（上货/修改/取消）：默认绿字加粗下划线；悬停行时变白（与全局 td * 变白一致） */
#pgForm .hg-sales-grid.hg-cl-grid td a.hg-op-link {
  color: var(--hg-primary) !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  background: none !important;
  padding: 0 !important;
  border: none !important;
}
#pgForm .hg-sales-grid.hg-cl-grid tbody tr:hover td a.hg-op-link,
#pgForm .hg-sales-grid.hg-cl-grid tbody tr:hover td a.hg-op-link:hover {
  color: #fff !important;
  text-decoration: underline !important;
}
/* 上货/打印列绿色数字：绿色文字 + 居中（收敛内联 Style="text-align:center"）。
   适用所有 .hg-sales-grid 表格，不限定 .hg-cl-grid（上货查询 GridView 无 hg-cl-grid） */
#pgForm .hg-sales-grid td .hg-qty-green {
  color: var(--hg-primary) !important;
  text-align: center;
  /* 2026-08-14 删除 width:60px !important：之前覆盖了 .hg-mobile-fit td input { width:100% } 的撑满规则，
     导致 input 在窄列（如 center 48px - padding 12 = 36px 内容区）下显示 60px 内容被截断（"40"只显示"4("）。
     现在 input 自动撑满列宽，与 .hg-mobile-fit 段一致 */
}
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover td .hg-qty-green {
  color: var(--hg-primary) !important;
}
/* 序号列：42px 宽、42px min、居中、自动换行（hg-cl-grid 表格专用，固定宽避免 table-layout:fixed 下 auto 均分导致列宽不可控；2026-08-27 用户桌面全局 42/42，随全局收敛） */
#pgForm .hg-sales-grid.hg-cl-grid th.hg-col-idx,
#pgForm .hg-sales-grid.hg-cl-grid td.hg-col-idx {
  width: 42px !important;
  min-width: 42px !important;
  text-align: center !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* 店铺列：走全局 hg-col-shop 契约（78/55）。2026-08-27 删除 hg-cl-grid 桌面特例 120/70（收敛全局，原特例是库存查询 >703 主因之一） */
/* 打印列勾选框：选中时变绿（accent-color），18px 统一尺寸、垂直居中 */
#pgForm .hg-sales-grid.hg-cl-grid td.hg-col-center input[type="checkbox"] {
  accent-color: var(--hg-primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
  vertical-align: middle;
}
/* 商品调价处理（wcPriceChgCL，hg-legacy-filter.hg-pricechgcl）打印列勾选框：同款变绿（2026-08-13，
   表格非 hg-cl-grid，需带容器限定单独声明；无容器限定的裸选择器会污染全站同名 td 的 checkbox） */
#pgForm .hg-content-card.hg-pricechgcl .hg-sales-grid td.hg-col-center input[type="checkbox"] {
  accent-color: var(--hg-primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
  vertical-align: middle;
}
/* 商品名称列：2026-08-14 统一走全局 hg-col-name 契约（180px/min-60px 居中，与首页最新销售一致）。
   原 hg-cl-grid 专用 180/min-140 已移除，避免与全局值不一致；需弹性的页面自行叠加 hg-col-flex。 */
/* 弹性列：吸收剩余空间（hg-cl-grid 表格专用）。
   table-layout:fixed + width:100% 下，若所有列都是固定宽度且总和 < 表格宽度，
   浏览器会把多余空间按比例平分给所有固定列（列宽全部失真）。
   必须至少有一列 width:auto 吸收剩余空间，其余列才严格按声明宽显示。
   用法：固定列类 + hg-col-flex 叠加，如快速上货商品名称列 "hg-col-name hg-col-flex"
   （最少 180px，超出部分弹性吸收）。 */
#pgForm .hg-sales-grid.hg-cl-grid th.hg-col-flex,
#pgForm .hg-sales-grid.hg-cl-grid td.hg-col-flex {
  width: 180px !important;
  min-width: 140px !important;
  text-align: center !important;
  overflow-wrap: anywhere;
  word-break: break-all;
}
/* 数量列：走全局 hg-col-num 契约（52/45）。2026-08-27 删除 hg-cl-grid 桌面特例 80/60（收敛全局，原特例是库存查询 >703 主因之一）。
   数量列内输入框（快速上货/下货/打印数量）撑满列宽，替代原特例保证 52px 窄列不溢出 */
#pgForm .hg-sales-grid td.hg-col-num input,
#pgForm .hg-sales-grid td.hg-col-qty input {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
/* 商品名称列 span/label 撑满 td 居中 */
#pgForm .hg-sales-grid.hg-cl-grid td.hg-col-name span,
#pgForm .hg-sales-grid.hg-cl-grid td.hg-col-name label {
  text-align: center !important;
  display: block !important;
  width: auto !important;
}
/* ===== 移动端适配（店铺收货处理） ===== */
@media (max-width: 768px) {
  /* 强制 fixed 表格布局：GridView 默认 table-layout:auto 会让 td width 被内容撑开（如"上货"2 字撑到 26px+），
     导致操作列 15px 宽度失效、文字横排。fixed 下 td width 才真正生效 */
  #pgForm .hg-sales-grid.hg-cl-grid { table-layout: fixed !important; width: 100% !important; }
  /* 店铺/盒主名称列：自动换行 + 垂直对齐（Label flex 容器占满 td 高度并居中，避免右侧行高更大时第一列底部留白） */
  #pgForm .hg-sales-grid.hg-cl-grid td.hg-col-shop {
    vertical-align: middle !important;
  }
  #pgForm .hg-sales-grid.hg-cl-grid td.hg-col-shop span,
  #pgForm .hg-sales-grid.hg-cl-grid td.hg-col-shop label {
    white-space: normal !important;
    word-break: break-all !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: 100% !important;
    text-align: center !important;
  }
  /* 上货/修改/取消操作列：窄列竖排（用专属类 hg-op-col 定位，不用 nth-child，避免序号偏差） */
  #pgForm .hg-sales-grid.hg-cl-grid td.hg-op-col,
  #pgForm .hg-sales-grid.hg-cl-grid th.hg-op-col {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    white-space: normal !important;
    word-break: break-all !important;
    padding: 6px 2px !important;
  }
  #pgForm .hg-sales-grid.hg-cl-grid td.hg-op-col a {
    white-space: normal !important;
    word-break: break-all !important;
    display: block !important;
    text-align: center !important;
    padding: 0 !important;
  }
  /* 移动端：商品名称列吸满剩余空间（table-layout:fixed 下 width:auto 不可靠，
     改 width:100% 让浏览器把剩余宽度全部分给名称列；min32 兜底） */
  #pgForm .hg-sales-grid.hg-cl-grid th.hg-col-flex,
  #pgForm .hg-sales-grid.hg-cl-grid td.hg-col-flex {
    width: 100% !important;
    min-width: 32px !important;
    text-align: center !important;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
}


/* ===== 下货查询（.hg-putdownquery）页面专属样式（2026-08-13 由 wcPutDownQuery.ascx 本地 <style> 迁移） ===== */

/* 下货查询筛选区 VI 化（彻底覆盖 divstyle.css 旧样式）：
   #querytitle/#queryinput 源自 divstyle.css（橙色 #FF8C00 + 加粗 + float:left + width:100/180px + height:26px），
   不符合 VI 手册（灰字、紧凑、宽度自适应）。本控件内特异性覆盖为 VI 规范（不改页面结构）。*/
.hg-putdownquery #querytitle,
.hg-putdownquery #queryinput {
  float: none !important;
  display: inline-flex !important;
  align-items: center;
  width: auto !important;
  height: auto !important;
  margin: 0 10px 0 0;
  line-height: normal; /* 不继承 32px 行高（否则下拉 trigger 内部文字被撑高、trigger 整体变高） */
  vertical-align: middle;
  white-space: nowrap;
  font-size: 14px;
  font-weight: normal !important;
  color: var(--hg-muted) !important;
}
.hg-putdownquery #querytitle { padding-right: 0; }
/* 输入框/下拉宽度按内容自适应（选择店铺/类型/页记录数下拉按选项文字撑开；日期范围框按内容；min-width 80 兜底防过窄） */
.hg-putdownquery #queryinput select,
.hg-putdownquery #queryinput input[type="text"],
.hg-putdownquery #queryinput .hg-input,
.hg-putdownquery #queryinput .hg-cselect-trigger {
  width: auto !important;
  min-width: 80px;
  max-width: 100%;
  box-sizing: border-box;
}
/* 日期范围框宽度对齐「上货查询」（wcPutProdQuery 日期框无专属规则 → 全局 .hg-date-range 190px，
   2026-08-15 全局缩小 230→190）；移动端由下方 @media 的 .hg-date-range 100% 兜底撑满。
   （markup 已重写为 hg-filter-bar，原 #queryinput 选择器失效，此处按类选择器。） */
.hg-putdownquery .hg-date-range {
  width: 190px !important;
  min-width: 190px;
  max-width: 100%;
  box-sizing: border-box;
}
/* 类型（edtQueryType）/ 页记录数（edtPageSize）下拉按内容精确自适应：
   压过共用规则 #queryinput select 的 min-width:80（短内容如「10」/「全部」会被拉宽到 80px），
   min-width:0 后宽度 = 内容 + trigger padding，完全贴合选项文字；店铺下拉有上方专属 150 规则不受影响。 */
.hg-putdownquery select[id$="edtQueryType"],
.hg-putdownquery select[id$="edtPageSize"],
.hg-putdownquery select[id$="edtQueryType"] + .hg-cselect-wrap .hg-cselect-trigger,
.hg-putdownquery select[id$="edtPageSize"] + .hg-cselect-wrap .hg-cselect-trigger {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100%;
}
/* 店铺下拉（edtShop）宽度与一般上货（wcPutProd 的 edtShopName，hg-cselect--shop 全局基准
   min-width:150 / max-width:300 / width:auto，css L2236）对齐——压过上方共用规则的 min-width:80；
   类型/页记录数等其他下拉仍保持 min-width:80 按内容自适应不受影响。 */
.hg-putdownquery select[id$="edtShop"],
.hg-putdownquery select[id$="edtShop"] + .hg-cselect-wrap .hg-cselect-trigger {
  width: auto !important;
  min-width: 150px !important;
  max-width: 300px !important;
}
/* 下拉 trigger 行高兜底：与全局 .hg-cselect-trigger（line-height 继承 normal）一致，防被父级行高撑高 */
.hg-putdownquery #queryinput .hg-cselect-trigger { line-height: normal !important; }
/* 表格列对齐：下货数量（hg-col-num 右对齐）、备注（hg-col-text 左对齐）均改居中；
   作用域限定本页（Grd 下货数量/备注 + Grd2 数量列统一居中，符合数字/文本列居中风格） */
.hg-putdownquery .hg-sales-grid th.hg-col-num,
.hg-putdownquery .hg-sales-grid td.hg-col-num,
.hg-putdownquery .hg-sales-grid th.hg-col-text,
.hg-putdownquery .hg-sales-grid td.hg-col-text {
  text-align: center !important;
}
/* 下货查询移动端（VI 手册，与上货查询同款）：hg-filter-bar 结构重写后（20260805），
   原 #queryinput 选择器全部失效，按 hg-filter-bar 补齐——
   ① gap 压缩（全局桌面 gap:8px 移动端过大，上货查询移动端 gap:2px）；
   ② 页记录数 bar（margin-right:16px 组）之后按钮留 12px 区分按钮区；
   ③ .hg-date-range 100%（原 #queryinput 规则失效）；④ group 内 select 100%。 */
@media (max-width: 768px) {
  .hg-putdownquery .hg-filter-bar { gap: 2px !important; padding: 0 !important; margin-bottom: 4px !important; }
  .hg-putdownquery .hg-filter-group { gap: 2px !important; }
  .hg-putdownquery .hg-filter-group[style*="margin-right"] ~ .hg-filter-btn { margin-top: 12px !important; }
  .hg-putdownquery .hg-date-range {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .hg-putdownquery .hg-filter-group select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  /* Grd（汇总查询）移动端：单价列已 hg-mobile-hide 隐藏，剩余列按内容自适应、无横向滚动。
     内嵌 Label 固定宽（160/100/90/80/70/60px inline-block）会撑破 min-width →
     td > span/input/img 强制 block + width:100% + word-break 换行；表头/数据均紧凑 padding。 */
  .hg-putdownquery .hg-sales-grid { min-width: 0 !important; }
  .hg-putdownquery .hg-sales-grid th,
  .hg-putdownquery .hg-sales-grid td { padding: 6px 4px !important; }
  .hg-putdownquery .hg-sales-grid th.hg-col-name,
  .hg-putdownquery .hg-sales-grid td.hg-col-name { min-width: 100px !important; text-align: center !important; word-break: break-all; }
  .hg-putdownquery .hg-sales-grid th.hg-col-shop,
  .hg-putdownquery .hg-sales-grid td.hg-col-shop { min-width: 56px !important; text-align: center !important; }
  .hg-putdownquery .hg-sales-grid th.hg-col-num,
  .hg-putdownquery .hg-sales-grid td.hg-col-num { min-width: 36px !important; text-align: center !important; }
  .hg-putdownquery .hg-sales-grid th.hg-col-center,
  .hg-putdownquery .hg-sales-grid td.hg-col-center { min-width: 40px !important; text-align: center !important; }
  .hg-putdownquery .hg-sales-grid th.hg-col-text,
  .hg-putdownquery .hg-sales-grid td.hg-col-text,
  .hg-putdownquery .hg-sales-grid td.hg-col-mtext { min-width: 60px !important; text-align: center !important; word-break: break-all; }
  .hg-putdownquery .hg-sales-grid th.hg-col-code,
  .hg-putdownquery .hg-sales-grid td.hg-col-code { min-width: 56px !important; text-align: center !important; word-break: break-all; }
  .hg-putdownquery .hg-sales-grid th.hg-col-date,
  .hg-putdownquery .hg-sales-grid td.hg-col-date { min-width: 64px !important; text-align: center !important; word-break: break-all; }
  .hg-putdownquery .hg-sales-grid td > span,
  .hg-putdownquery .hg-sales-grid td > input,
  .hg-putdownquery .hg-sales-grid td > img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    word-break: break-all;
    overflow-wrap: anywhere;
  }
  .hg-putdownquery .hg-sales-grid td label { display: inline !important; }
}
/* 下货查询「类型」下拉（edtQueryType，--bare 全局灰字）改黑色 #111827：
   wrap 是 select 的相邻兄弟（default.aspx L537 insertBefore(wrap, sel.nextSibling)），
   用相邻兄弟选择器精确命中，不影响页记录数/选择盒主等其它 --bare 下拉。 */
.hg-putdownquery select[id$="edtQueryType"] + .hg-cselect-wrap .hg-cselect-trigger,
.hg-putdownquery select[id$="edtQueryType"] + .hg-cselect-wrap .hg-cselect-text {
  color: #111827 !important;
}
.hg-putdownquery #queryinputto {
  float: none !important;
  display: inline-flex !important;
  align-items: center;
  width: auto !important;
  color: var(--hg-muted) !important;
  font-weight: normal !important;
  margin: 0 10px 0 0;
  line-height: normal;
  vertical-align: middle;
}
.hg-putdownquery #querybutton {
  float: none !important;
  display: inline-flex !important;
  align-items: center;
  width: auto !important;
  height: auto !important;
  font-weight: normal !important;
  text-decoration: none !important;
  margin: 0 0 0 6px;
  vertical-align: middle;
  line-height: normal;
}
/* ===== 商品调价申请（.hg-pricechgsq）页面专属样式（2026-08-13 由 wcPriceChgSQ.ascx 本地 <style> 迁移） ===== */


/* 桌面端：单价/新单价输入框初始宽度 150px（覆盖全局 .hg-input width:100% 会撑满 500px td；

   属性选择器免疫 NamingContainer 前缀；仅桌面生效，移动端由下方 @media ≤768 的 100% 撑满接管） */

@media (min-width: 769px) {

  div.hg-pricechgsq input[id$="edtPrice"],

  div.hg-pricechgsq input[id$="edtNewPrice"] {

    width: 150px !important;

    max-width: 150px !important;

    box-sizing: border-box;

  }

}

/* 商品调价申请：移动端字段独占一行 + 所有控件占满整行

   桌面端的下拉/输入框 .hg-input 100%、.hg-cselect-trigger 100%、.hg-date 100% 规则只作用于

   table.hg-salequery / .hg-filter-group 内，本页是普通 .hg-legacy-filter 直接 td 放控件，

   上述规则不命中 → 调价日期 input 桌面默认 130px（hgbox-theme.css .hg-date）移动端不会撑满。

   ① 强制 table 直接子 td 变 block 独占整行；② .hg-cselect-wrap + trigger + .hg-input + .hg-date 全部 width:100%；

   ③ 尾随文字「元」与 chk 框独立成行（不挤在 input 右侧）。 */

@media (max-width: 768px) {



  div.hg-pricechgsq .hg-cselect-wrap { display: block !important; width: 100% !important; }

  div.hg-pricechgsq .hg-cselect-trigger { width: 100% !important; max-width: 100% !important; }

  div.hg-pricechgsq .hg-cselect-menu { width: 100% !important; max-width: 100% !important; }

  div.hg-pricechgsq .hg-input { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }

  div.hg-pricechgsq .hg-date { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }

  /* 尾随「元」等纯文本节点：独占一行左对齐，与 input 之间有间距 */


  /* 提交按钮：左对齐按钮（margin:0）+ 文字居中（text-align:center !important）；

     此前全局 .hg-filter-btn 是 inline-flex + justify-content:center 居中文字，

     覆盖 display:block 后失去 flex 居中，需 text-align:center !important 补回；

     ASP.NET LinkButton 可能输出内联 text-align:left，需 !important 压过。 */

  div.hg-pricechgsq .hg-filter-btn {

    display: block !important;

    width: auto !important;

    min-width: 160px;

    margin: 0 !important;

    box-sizing: border-box;

    text-align: center !important;

  }

}


/* ===== 2026-08-13 站内信（wcUserEmail）：内联 style 收敛全局 =====
   外层容器已是 .hg-content-card（标准卡片），此处仅保留站内信专属组件样式：
   标签栏（收件箱/发件箱/新短信/刷新）、写短信表单、FreeTextBox 编辑器、表格列覆盖。 */
#pgForm .hg-usermail { font-family: var(--hg-font); }
#pgForm .hg-usermail > .hg-page-title { margin-bottom: 18px; }

/* 标签栏 */
#pgForm .hg-usermail-tabs {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 18px; flex-wrap: wrap;
}
#pgForm .hg-usermail-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--hg-radius-sm);
  background: var(--hg-surface); color: var(--hg-muted);
  border: 1px solid var(--hg-border);
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: all .15s var(--hg-ease-standard);
}
#pgForm .hg-usermail-tab:hover {
  background: var(--hg-gray); color: var(--hg-ink); border-color: var(--hg-divider);
}
#pgForm .hg-usermail-tab--primary {
  background: var(--hg-primary); color: #fff; border-color: var(--hg-primary);
}
#pgForm .hg-usermail-tab--primary:hover {
  background: var(--hg-primary-deep); border-color: var(--hg-primary-deep);
  box-shadow: var(--hg-shadow-md);
}

/* 表格列覆盖（站内信表格：标题/发件人/时间/操作） */
#pgForm .hg-usermail-grid {
  border-radius: var(--hg-radius-sm);
}
#pgForm .hg-usermail-grid th,
#pgForm .hg-usermail-grid td {
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere;
}
#pgForm .hg-usermail-grid th.hg-col-center,
#pgForm .hg-usermail-grid td.hg-col-center { width: 44px; text-align: center; }
#pgForm .hg-usermail-grid th.hg-col-title,
#pgForm .hg-usermail-grid td.hg-col-title { text-align: left; min-width: 200px; }
#pgForm .hg-usermail-grid th.hg-col-sender,
#pgForm .hg-usermail-grid td.hg-col-sender { width: 110px; text-align: center; }
#pgForm .hg-usermail-grid th.hg-col-date,
#pgForm .hg-usermail-grid td.hg-col-date { width: 150px; text-align: center; font-variant-numeric: tabular-nums; }
#pgForm .hg-usermail-grid th.hg-col-action,
#pgForm .hg-usermail-grid td.hg-col-action { width: 70px; text-align: center; }
#pgForm .hg-usermail-grid td.hg-col-title > a {
  color: var(--hg-primary); font-weight: 600; text-decoration: none;
}
#pgForm .hg-usermail-grid td.hg-col-title > a:hover { text-decoration: underline; }
#pgForm .hg-usermail-grid .hg-grid-action {
  color: var(--hg-danger); font-size: 13px; text-decoration: none;
}
#pgForm .hg-usermail-grid .hg-grid-action:hover { text-decoration: underline; }

/* 工具栏 */
#pgForm .hg-usermail-toolbar {
  display: flex; justify-content: flex-end;
  margin-top: 14px;
}

/* 写短信表单 */
#pgForm .hg-usermail-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
#pgForm .hg-usermail-field {
  display: flex; flex-direction: column; gap: 6px;
}
#pgForm .hg-usermail-field--full { grid-column: 1 / -1; }
#pgForm .hg-usermail-field > label {
  font-size: 13px; font-weight: 600; color: var(--hg-ink);
}
#pgForm .hg-usermail-field .hg-input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--hg-border); border-radius: var(--hg-radius-sm);
  font-family: var(--hg-font); font-size: 14px; color: var(--hg-ink);
  background: #fff; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#pgForm .hg-usermail-field .hg-input:focus {
  border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px var(--hg-primary-soft);
}
#pgForm .hg-usermail-actions {
  grid-column: 1 / -1;
  display: flex; gap: 12px; justify-content: flex-start;
}

/* FreeTextBox 编辑器容器 */
#pgForm .hg-mail-editor-wrap {
  border: 1px solid var(--hg-border); border-radius: var(--hg-radius-sm);
  background: #fff; overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#pgForm .hg-mail-editor-wrap:focus-within {
  border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px var(--hg-primary-soft);
}

/* 隐藏列（替代 Visible="False"，保持控件树可访问） */
#pgForm .hg-hidden-col { display: none; }

/* 移动端 */
@media (max-width: 768px) {
  #pgForm .hg-usermail-form { grid-template-columns: 1fr; }
  #pgForm .hg-usermail-tabs { gap: 6px; }
  #pgForm .hg-usermail-tab { padding: 7px 10px; font-size: 13px; }
}

/* ===== 2026-08-13 菜单选中态：icon 白色（真正的图标是 ::before，非 img） =====
   菜单图标为 a::before（一级=SVG mask，二级=实心圆点），background-color:currentColor 随文字颜色变化；
   未选中悬停时图标保持原 hover 规则（深绿/主绿色，符合预期），
   只有选中态（含选中+悬停）图标强制白色，与高亮绿底对比。用 !important 覆盖 hover 绿与 currentColor。 */
#pgTool [id$="_treeJiongBoxMenus"] a[id].hg-active::before,
#pgTool [id$="_treeJiongBoxMenus"] a[class*="treeJiongBoxMenus_0"].hg-active::before,
[id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[id].hg-active::before,
[id$="_treeJiongBoxMenus"] div[id$="Nodes"] a[class*="treeJiongBoxMenus_0"].hg-active::before {
  background-color: #fff !important;
}

/* ===== 2026-08-14 我的商品移动端列宽兜底（必须在文件末尾，压过 .hg-cl-grid 移动端规则）
   我的商品表格同时带 hg-cl-grid 类，其移动端规则（本文件 3960 行后）会把商品名称列固定 180px、
   店铺列保留 120px，导致手机端表格过宽溢出。此处用更高优先级覆盖回全局窄列契约。 ===== */
@media (max-width: 768px) {
  /* 店铺：48/min40（用户 2026-08-15 指定） */
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-shop,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-shop {
    width: 48px !important;
    min-width: 40px !important;
  }
  /* 商品名称：桌面 180/min140；移动 width:100% 吸满表格剩余空间（min32 兜底） */
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-flex,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-flex {
    width: 100% !important;
    min-width: 32px !important;
    text-align: center !important;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
  /* 条码：移动 40px（用户 2026-08-15 指定） */
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-barcode,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-barcode {
    width: 40px !important;
    min-width: 40px !important;
  }
  /* 库存：移动 48/min35 居中（用户 2026-08-15 指定） */
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-stock,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-stock {
    width: 48px !important;
    min-width: 35px !important;
    text-align: center !important;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
  /* 操作列（补货/调价、暂停关注）：移动 48/min35 居中、可换行（用户 2026-08-15 指定）
     必须在文件末尾，压过 .hg-cl-grid 移动端 op-col/flex 等规则 */
  #pgForm .hg-myprod .hg-sales-grid td.hg-op-bh,
  #pgForm .hg-myprod .hg-sales-grid td.hg-op-follow {
    width: 48px !important;
    min-width: 35px !important;
    text-align: center !important;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
  #pgForm .hg-myprod .hg-sales-grid td.hg-op-bh a,
  #pgForm .hg-myprod .hg-sales-grid td.hg-op-follow a {
    white-space: normal !important;
    line-height: 1.35;
    display: inline-block;
    text-align: center;
    font-weight: 600 !important;
    color: var(--hg-primary) !important;
  }
}
/* 2026-08-15 我的商品销量列（hg-col-num）居中对齐：覆盖全局 num 右对齐 */
#pgForm .hg-myprod .hg-sales-grid th.hg-col-num,
#pgForm .hg-myprod .hg-sales-grid td.hg-col-num {
  text-align: center !important;
  font-variant-numeric: tabular-nums;
}
/* 2026-08-15 根因修复：我的商品 op 列表头(hg-col-center) 移动端被 css:2093 桌面规则覆盖为 80px，
   table-layout:fixed 下列宽由表头决定，td 48px 无效。此处更高特异性 + 文件末尾压回 48px */
@media (max-width: 768px) {
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-center {
    width: 40px !important;
    min-width: 40px !important;
  }
  /* 我的商品表格强制撑满卡片（用户反馈：表格没撑起宽度等于屏幕） */
  #pgForm .hg-myprod .hg-sales-grid { width: 100% !important; min-width: 0 !important; }
}
/* ===== 2026-08-15 我的商品表格随视口自适应（用户确认方案 v2） =====
   table-layout:fixed 行为：剩余空间只分配给 width:auto 列，固定 px 列保持原宽。
   所以：数据列固定 px（缩放时不伸缩、速度一致），名称列 width:auto（独占吸收剩余空间）。
   作用域 .hg-myprod，仅影响我的商品页，不动全局契约。 */
#pgForm .hg-myprod .hg-sales-grid th.hg-col-center,
#pgForm .hg-myprod .hg-sales-grid td.hg-col-center { width: 80px !important; min-width: 60px !important; }
#pgForm .hg-myprod .hg-sales-grid th.hg-col-shop,
#pgForm .hg-myprod .hg-sales-grid td.hg-col-shop { width: 120px !important; min-width: 60px !important; }
#pgForm .hg-myprod .hg-sales-grid th.hg-col-barcode,
#pgForm .hg-myprod .hg-sales-grid td.hg-col-barcode { width: 140px !important; min-width: 60px !important; }
#pgForm .hg-myprod .hg-sales-grid th.hg-col-stock,
#pgForm .hg-myprod .hg-sales-grid td.hg-col-stock { width: 80px !important; min-width: 35px !important; }
#pgForm .hg-myprod .hg-sales-grid td.hg-op-bh,
#pgForm .hg-myprod .hg-sales-grid td.hg-op-follow { width: 80px !important; min-width: 35px !important; }
/* 名称列独占剩余空间：fixed 布局下 width:auto 不吸收剩余（剩余按比例摊给所有列），
   必须 width:100% 才独占；min 兜底（桌面 60/移动 48，用户 2026-08-15 指定） */
#pgForm .hg-myprod .hg-sales-grid th.hg-col-flex,
#pgForm .hg-myprod .hg-sales-grid td.hg-col-flex { width: 100% !important; min-width: 60px !important; }
@media (max-width: 768px) {
  /* 名称列移动端 min 48 */
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-flex,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-flex { width: 100% !important; min-width: 48px !important; }
  /* 2026-08-15 修复：这些列宽必须放在 @media 块内，只对移动端生效 */
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-center,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-center { width: 40px !important; min-width: 40px !important; }
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-shop,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-shop { width: 48px !important; min-width: 40px !important; }
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-barcode,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-barcode { width: 40px !important; min-width: 40px !important; }
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-stock,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-stock { width: 48px !important; min-width: 40px !important; }
  #pgForm .hg-myprod .hg-sales-grid td.hg-op-bh,
  #pgForm .hg-myprod .hg-sales-grid td.hg-op-follow { width: 48px !important; min-width: 40px !important; }
  /* 表格强制撑满卡片 + auto 布局（fixed 下列宽总和 > 容器会溢出破表） */
  #pgForm .hg-myprod .hg-sales-grid.hg-cl-grid.hg-sticky-head,
  #pgForm .hg-myprod .hg-sales-grid {
    table-layout: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}
/* 编辑模式：TextBox 撑满列宽（避免编辑时列宽被输入框内容撑破） */
#pgForm .hg-myprod .hg-sales-grid td input[type="text"],
#pgForm .hg-myprod .hg-sales-grid td input[type="number"] {
  width: 100% !important;
  box-sizing: border-box;
}
/* 2026-08-15 我的商品移动端选择列勾选框：居中 + 缩小到 16px
   （ASP.NET CheckBox 渲染为 span>input+label，td 是 hg-col-center 窄列 40px） */
@media (max-width: 768px) {
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-center {
    text-align: center !important;
    vertical-align: middle !important;
  }
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-center input[type="checkbox"] {
    accent-color: var(--hg-primary);
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    vertical-align: middle;
  }
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-center label {
    display: none !important;  /* 只留勾选框，隐藏 label 文字 */
  }
}
/* 2026-08-15 桌面端强制表格撑满卡片 + 名称列固定 380px
   table-layout 改用 auto：fixed 下各列 min-width 总和 > 容器时表格会溢出破表；
   auto 布局表格宽恒等于容器(100%)，列宽按声明+内容自动分配，内容可断行(break-all)永不溢出 */
@media (min-width: 769px) {
  #pgForm .hg-myprod .hg-sales-grid.hg-cl-grid.hg-sticky-head,
  #pgForm .hg-myprod .hg-sales-grid {
    table-layout: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #pgForm .hg-myprod .hg-sales-grid th.hg-col-flex,
  #pgForm .hg-myprod .hg-sales-grid td.hg-col-flex {
    width: 380px !important;
    min-width: 60px !important;
  }
}
/* 2026-08-15 一般上货商品图片预览：新品上传 / 已有商品原图，放在选择文件按钮前，点击放大（全局灯箱） */
.hg-prodimg-preview {
  margin: 0;
  display: inline-flex; align-items: center; gap: 10px;
}
.hg-prodimg-preview img {
  width: 120px; height: 120px;  /* 2026-08-15 方形缩略图 */
  max-width: none; max-height: none;
  border-radius: var(--hg-radius);
  border: 1px solid var(--hg-border);
  object-fit: cover; cursor: zoom-in;
  background: #fff;
}
@media (max-width: 768px) {
  .hg-prodimg-preview { width: 100%; }
  .hg-prodimg-preview img { width: 100%; height: 180px; max-height: 220px; }
}
/* 2026-08-15 disabled 输入框（无权填写）隐藏清除叉：避免点叉清掉只读数据 */
.hg-input-wrap input:disabled ~ .hg-input-clear,
.hg-input-wrap input[disabled] ~ .hg-input-clear,
.hg-input-wrap textarea:disabled ~ .hg-input-clear { display: none !important; }
/* 2026-08-15 快速上货（.hg-qk）表格破表修复：与 wcMyProd 同因——
   hg-cl-grid.hg-sticky-head 全局 table-layout:fixed（3885/3991），列宽总和 > 容器时溢出。
   auto 布局表格宽恒等于容器(100%)，配合 word-break 永不溢出；列宽声明仍生效 */
#pgForm .hg-qk .hg-sales-grid.hg-cl-grid.hg-sticky-head,
#pgForm .hg-qk .hg-sales-grid {
  table-layout: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
/* 2026-08-15 日期范围选择器：快速选择栏（今天/最近7天/最近30天/本月/清除） */
.hg-range-quick {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--hg-border);
  background: var(--hg-surface);
}
.hg-range-quick-btn {
  flex: 1 1 auto; min-width: 0;
  padding: 5px 8px;
  font-size: 12px; line-height: 1;
  /* 2026-08-15 中性灰风格：白底 + 浅灰边框 + 深灰文字，hover 变绿（用户觉得原浅绿底不好看） */
  color: var(--hg-ink);
  background: #fff;
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.hg-range-quick-btn:hover { background: var(--hg-primary); color: #fff; border-color: var(--hg-primary); }
.hg-range-quick-clear { color: var(--hg-danger, #d9534f); background: transparent; border-color: transparent; }
.hg-range-quick-clear:hover { background: var(--hg-danger, #d9534f); color: #fff; }

/* 表头排序通用样式（原 wcSaleQuery 页面级，上升全局；hg-qk/hg-downqk 已有同款保留） */
#pgForm .hg-sales-grid th.hg-sortable { cursor: pointer; user-select: none; }
#pgForm .hg-sales-grid th.hg-sortable:hover { color: var(--hg-primary-deep) !important; }
#pgForm .hg-sales-grid th .hg-sort-ico { color: var(--hg-primary); font-size: 10px; margin-left: 3px; }

/* ===== 2026-08-16 全局约定：汇总行永远在数据行最下面、不受排序影响 =====
   行为保障：default.aspx hgEnsureFooterLast() 全局兜底——任何客户端排序/JS 移动 DOM 后，
   都会把 .hg-grid-footer/.hg-grid-summary 行插回【数据行之后、分页行之前】。
   页面级排序（如 wcSaleQuery hgSaleSort）也应 continue 跳过 footer 行，避免重复移动。
   样式：footer 背景/字体见 css:1591，金额类右对齐见 css:2174，销量/金额/提成对齐见上方。 */

/* 2026-08-17 静态帮助页（hlpforms/*.aspx）统一外壳：与登录页相同头尾 + 居中卡片正文 */
.hg-static-page { background: var(--hg-bg, #F8FAFC); min-height: 100vh; }
.hg-static-head { text-align: center; padding: 24px 16px 8px; }
.hg-static-head .hg-static-logo { font-size: 22px; font-weight: 800; color: var(--hg-primary); letter-spacing: -.01em; }
/* 2026-08-17 hlpforms 6 页（关于/加入/帮助/联系方式/服务协议/隐私政策）主体宽度：1440px，居中 */
.hg-static-main { max-width: 1440px; margin: 0 auto; padding: 16px; }
.hg-static-main .hg-content-card { padding: 32px 36px; }
.hg-static-body { font-size: 14px; line-height: 1.8; color: var(--hg-ink); word-break: break-word; }
.hg-static-body p { margin: 0 0 12px; }
.hg-static-body strong { color: var(--hg-primary-deep); }
.hg-static-body h4 { font-size: 15px; font-weight: 700; color: var(--hg-ink); margin: 18px 0 6px; }

/* ===== 2026-08-17 网站相关文件管理页（wcSiteFiles） ===== */
.hg-sitefiles-list { display: flex; flex-direction: column; gap: 8px; }
.hg-sitefiles-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--hg-bg, #F8FAFC);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
}
.hg-sitefiles-name { font-size: 14px; font-weight: 600; color: var(--hg-ink); flex: 0 0 80px; }
.hg-sitefiles-file { font-size: 12px; color: var(--hg-muted); font-family: Consolas, monospace; flex: 1; min-width: 0; word-break: break-all; }
.hg-sitefiles-row .hg-filter-btn { padding: 5px 14px; font-size: 12px; }
.hg-sitefiles-filename { font-family: Consolas, monospace; color: var(--hg-primary-deep); }
.hg-sitefiles-textarea {
  width: 100%; box-sizing: border-box;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px; line-height: 1.6;
  resize: vertical; min-height: 320px;
}
.hg-sitefiles-editor-actions {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px;
}
.hg-sitefiles-msg { font-size: 13px; color: var(--hg-primary-deep); }
/* 2026-08-17 网站相关文件富文本编辑器（contenteditable + execCommand 工具条） */
.hg-richtext-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 8px 10px;
  background: var(--hg-bg, #F8FAFC);
  border: 1px solid var(--hg-border);
  border-bottom: 0;
  border-radius: var(--hg-radius) var(--hg-radius) 0 0;
}
.hg-richtext-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 30px; padding: 0 10px;
  border: 1px solid var(--hg-border);
  border-radius: 6px;
  background: #fff; color: var(--hg-ink);
  font-size: 13px; cursor: pointer;
  transition: all .15s var(--hg-ease-standard);
}
.hg-richtext-btn:hover { border-color: var(--hg-primary); color: var(--hg-primary); }
.hg-richtext-sep { width: 1px; height: 18px; background: var(--hg-border); margin: 0 4px; }
.hg-richtext-body {
  min-height: 340px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--hg-border);
  border-radius: 0 0 var(--hg-radius) var(--hg-radius);
  font-size: 14px; line-height: 1.8; color: var(--hg-ink);
  outline: none; overflow-y: auto;
}
.hg-richtext-body:focus { border-color: var(--hg-primary); box-shadow: 0 0 0 3px rgba(0, 82, 163, .15); }
.hg-richtext-body h4 { font-size: 15px; font-weight: 700; color: var(--hg-ink); margin: 14px 0 6px; }
.hg-richtext-body p { margin: 0 0 10px; }
.hg-richtext-body a { color: var(--hg-primary); text-decoration: underline; }

/* 2026-08-17 hg-input 右侧清除按钮（×）垂直居中；锁定（readonly/disabled）隐藏 + 不可清除 */
.hg-input::-webkit-search-cancel-button,
input.hg-input::-webkit-search-cancel-button,
.hg-input::-webkit-search-decoration,
.hg-input::-ms-clear,
.hg-input::-ms-reveal {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block; vertical-align: middle;
  height: 16px; width: 16px;
  margin: 0 6px 0 0;
  background: #C0C4CC;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 2L10 10M10 2L2 10' stroke='black' stroke-width='1.6' stroke-linecap='round'/></svg>") no-repeat center / 12px 12px;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 2L10 10M10 2L2 10' stroke='black' stroke-width='1.6' stroke-linecap='round'/></svg>") no-repeat center / 12px 12px;
  cursor: pointer; opacity: 0.85;
}
.hg-input:hover::-webkit-search-cancel-button { opacity: 1; }
/* 2026-08-17 锁定态：彻底隐藏 input 注入的清除叉（<button class="hg-input-clear">）+ 不可点击清除
   适用：WebForms RenderedReadOnly input + disabled input + .hg-input--locked 自定义锁定 */
.hg-input-wrap:has(.hg-input[readonly]) .hg-input-clear,
.hg-input-wrap:has(.hg-input:disabled) .hg-input-clear,
.hg-input-wrap:has(.hg-input.hg-input--locked) .hg-input-clear,
.hg-input-wrap:has(.hg-input[readonly])::-webkit-search-cancel-button,
.hg-input-wrap:has(.hg-input[disabled])::-webkit-search-cancel-button {
  display: none !important; pointer-events: none !important; visibility: hidden !important;
}
.hg-input[readonly], .hg-input[disabled] {
  -webkit-user-select: none; user-select: none;
  /* 防键盘清除/退格修改 readonly 内容（仍允许 Tab 聚焦和选中复制） */
}
.hg-input[readonly] { pointer-events: auto; } /* readonly 仍可选中复制 */



/* 2026-08-17 说明：hlpforms 与我的账户页头统一复用登录首页的 .hg-topbar + .hg-brand（见 css:122/134），
   不再使用独立页头类；.hg-page-head 已废弃删除 */

/* ===== 2026-08-17 注册获取验证码按钮嵌入输入框（参考小红书风格） ===== */
/* 把按钮塞到 input 右侧，input 和 button 共用一个边框/圆角（input 左半圆角+右 border-collapse 取消，button 右半圆角） */
.hg-input-group {
  display: flex; align-items: stretch;
  width: 100%;
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  background: var(--hg-surface);
  overflow: hidden;
  transition: border-color .2s var(--hg-ease-standard), box-shadow .2s var(--hg-ease-standard);
}
.hg-input-group:focus-within {
  border-color: var(--hg-primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 163, .15);
}
.hg-input-group > input.hg-input {
  flex: 1 1 auto; min-width: 0;
  border: 0 !important; border-radius: 0 !important;
  background: transparent;
  box-shadow: none !important;
}
.hg-input-group > input.hg-input:focus { outline: none; }
.hg-input-group > .hg-filter-btn {
  flex: none;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 18px;
  height: 42px;       /* 与 input.hg-input min-height:42px 一致 */
  box-sizing: border-box;
  font-size: 14px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== 2026-08-17 注册成功 → 账号设置页（wcAccSetup），参考阿里云/小红书风格 ===== */
.hg-accsetup-card { padding: 32px 28px; }
.hg-accsetup-success {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 16px;
}
.hg-accsetup-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--hg-primary); color: #fff;
  border-radius: 50%; font-size: 18px; font-weight: 700;
  line-height: 1;
}
.hg-accsetup-title { font-size: 18px; font-weight: 600; color: var(--hg-ink); }
.hg-accsetup-hint { font-size: 13px; color: var(--hg-muted); margin: 0 0 16px 0; }
.hg-accsetup-hint a { color: var(--hg-primary); text-decoration: none; font-weight: 500; }
.hg-accsetup-hint a:hover { color: var(--hg-primary-deep); }
.hg-accsetup-tipbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: 20px;
  background: #F0F7FF; border: 1px solid #BAE0FF;
  border-radius: var(--hg-radius);
  font-size: 13px; color: var(--hg-muted);
}
.hg-accsetup-tipicon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: var(--hg-primary); color: #fff;
  border-radius: 50%; font-size: 12px; font-weight: 700;
  line-height: 1; flex: none;
}
.hg-accsetup-actions {
  display: flex; justify-content: center;
  margin-top: 24px;
}
.hg-accsetup-actions .hg-filter-btn {
  width: 100%; padding: 12px 24px; font-size: 15px;
  box-sizing: border-box;
}

/* ===== 员工权限分组（2026-08-28）：权限按 BasAuthGroup 分组卡片显示 ===== */
/* 2026-08-28 改：卡片内权限项由单列竖排改为自适应多列（页面过长），卡片同时加宽 220→300 以容纳 2 列 */
.hg-auth-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.hg-auth-group { border: 1px solid var(--hg-border); border-radius: var(--hg-radius); padding: 10px 12px; background: #fff; }
.hg-auth-group-title { font-weight: 700; color: var(--hg-ink); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hg-border); font-size: 13px; }
.hg-auth-group-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); column-gap: 14px; row-gap: 2px; align-content: start; }
.hg-auth-item { display: flex; align-items: flex-start; gap: 6px; padding: 3px 0; font-size: 13px; color: var(--hg-muted); cursor: pointer; min-width: 0; }
.hg-auth-item input { accent-color: var(--hg-primary); flex: 0 0 auto; margin-top: 2px; }
@media (max-width: 768px) {
  .hg-auth-groups { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 480px) {
  .hg-auth-groups { grid-template-columns: 1fr; }
  .hg-auth-group-items { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
}

/* ===== 首页轮播广告（2026-08-28）：未登录页右侧 16:9 轮播，5 秒自动切换 + 圆点跳转 ===== */
/* 16:9 用 aspect-ratio（元素自身宽高比）。
   注意：不能用 padding-top:56.25% 撑高——百分比 padding 是按【父容器】宽度算的，
   本元素有 max-width:800px 时会出现 800x656 这种错误比例（实测踩坑）。 */
/* 2026-08-29：轮播改为放在下方白底圆角卡片（#pgForm > table.hg-page-card）内并铺满卡片内容区，
   所以不再设 max-width / 居中（那会留白、撑不满卡片） */
.hg-banner { position: relative; display: block; width: 100%; max-width: none; margin: 0 0 16px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--hg-radius); background: var(--hg-canvas); }
/* 轮播所在单元格去掉内边距，让图片真正顶到卡片内容区边缘 */
#pgForm table.hg-page-card .hg-banner-cell { padding: 0; }
#pgForm table.hg-page-card .hg-banner-row > td { padding: 0; }
/* 2026-08-29 未登录首页（wcNotice）：卡片内只剩轮播一张图 —— 去掉卡片自身内边距，
   图片顶到卡片四边、圆角跟随卡片（--hg-radius-xl），真正做到「充满白底容器」。
   圆角加在 .hg-banner 自身而非靠 table 的 overflow（table 不支持 overflow 裁剪）。 */
#pgForm > table.hg-page-card.hg-notice-card { padding: 0; margin-bottom: 0; }
#pgForm table.hg-page-card.hg-notice-card .hg-banner-row > td,
#pgForm table.hg-page-card.hg-notice-card .hg-banner-cell { padding: 0 !important; }
.hg-notice-card .hg-banner { margin: 0; border-radius: var(--hg-radius-xl); }

/* ===================== 首页轮播图：上传前手工裁切（2026-08-29 用户要求） =====================
   选图后弹出 16:9 裁切框：拖动定位 + 滑动条/滚轮缩放，确认后 canvas 导出 1024x576 JPEG。
   裁切框本身就是 16:9 取景窗，图片在其内平移缩放，所见即所得。
   【命名必须与"我的账户头像裁剪"区分】全局已有一套 .hg-cropper-* / .hg-crop-mask / .hg-crop-stage /
   .hg-crop-img / .hg-crop-zoom（240x240 圆形头像裁剪，且 .hg-crop-mask 是 pointer-events:none 的
   圆形遮罩）——若复用同名类，弹层会被 pointer-events:none 吃掉点击、stage 会被 240px 固定高覆盖。
   故本套统一用 .hg-bcrop-* 前缀。 */
.hg-bcrop-mask { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: rgba(17, 24, 39, .55); padding: 16px; box-sizing: border-box; }
.hg-bcrop-mask.hg-show { display: flex; }
.hg-bcrop-panel { width: 100%; max-width: 720px; background: var(--hg-surface); border-radius: var(--hg-radius-xl); box-shadow: var(--hg-shadow-xl); padding: 18px 20px 20px; box-sizing: border-box; }
.hg-bcrop-title { font-size: 15px; font-weight: 700; color: var(--hg-ink); margin-bottom: 12px; }
.hg-bcrop-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #111827; border-radius: var(--hg-radius); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.hg-bcrop-stage.is-drag { cursor: grabbing; }
.hg-bcrop-stage > img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; -webkit-user-drag: none; user-select: none; }
/* 三分构图参考线 */
.hg-bcrop-grid { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px); background-size: 33.333% 33.333%; }
.hg-bcrop-tip { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--hg-muted); }
.hg-bcrop-zoom { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.hg-bcrop-zoom input[type="range"] { flex: 1; min-width: 0; accent-color: var(--hg-primary); }
.hg-bcrop-btn { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; border: 1px solid var(--hg-border); background: var(--hg-surface); color: var(--hg-ink); font-size: 16px; line-height: 1; cursor: pointer; }
.hg-bcrop-btn:hover { background: var(--hg-primary-soft); color: var(--hg-primary-deep); }
.hg-bcrop-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
@supports not (aspect-ratio: 16 / 9) { .hg-bcrop-stage { height: 0; padding-top: 56.25%; } }
@supports not (aspect-ratio: 16 / 9) {
  .hg-banner { height: 0; padding-top: 56.25%; }
}
.hg-banner-track { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; transition: transform .5s ease-in-out; }
.hg-banner-slide { flex: 0 0 100%; height: 100%; }
.hg-banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hg-banner-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.hg-banner-dot { width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 1px 2px rgba(17, 24, 39, .28); cursor: pointer; transition: background .2s, transform .2s; }
.hg-banner-dot.is-active { background: var(--hg-primary); transform: scale(1.35); }
@media (max-width: 768px) {
  .hg-banner { margin-bottom: 14px; }
}

/* 后台「首页轮播图」列表缩略图 */
.hg-banner-thumb { width: 120px; height: 68px; object-fit: cover; display: block; border: 1px solid var(--hg-border); border-radius: 6px; }

/* 筛选区下方说明文字 */
.hg-filter-note { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--hg-muted); }

/* ===================== 销售模式（寄销 / 自采 / 自研）2026-08-29 =====================
   口径：毛利 = 销售金额 - 结算金额（结算给盒主的钱）。
   寄销按收益率分成；自采（按成本价）结算的就是采购成本；
   自研 / 自采若一次性采购成本未录入系统，毛利会偏高（页面已加提示）。 */
.hg-rpt-note { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--hg-muted); }
/* 库存查询：库存资产按销售模式分两块（寄销 / 自采 / 自研） */
.hg-stock-asset { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 6px; }
.hg-stock-asset-item {
  flex: 1 1 200px; min-width: 180px;
  padding: 12px 14px; box-sizing: border-box;
  background: var(--hg-canvas); border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  display: flex; flex-direction: column; gap: 4px;
}
.hg-stock-asset-label { font-size: 12px; line-height: 1.4; color: var(--hg-muted); display: block; }
.hg-stock-asset-value { font-size: 20px; font-weight: 700; line-height: 1.4; color: var(--hg-primary); font-variant-numeric: tabular-nums; display: block; }
.hg-stock-asset-note { font-size: 12px; line-height: 1.4; color: var(--hg-muted); overflow-wrap: anywhere; word-break: break-word; display: block; }
/* 2026-09-05 库存资产块：修复高度塌陷（5 块挤一行时父容器不能再 shrink → 子项固定高度）
   原 bug：.hg-stock-asset-item 子项 height 实际只 34px、note 不显示——
   在 flex 父容器下，子项 min-width=200px 已生效，但 height 由内容自适应时
   由于 .hg-stock-asset 是 #pgForm 表格 grid 外的 inline 流 div、渲染环境复杂，
   Chrome 把子项实际渲染压成 34px（label+value 一行）。强制 min-height: 80px + flex-shrink:0，
   撑开 5 块（容纳 label/value/note 全部可见）+ 防止被父容器压缩。 */
.hg-stock-asset-item { min-height: 80px; flex-shrink: 0; }
/* 2026-09-05 库存查询：列宽覆盖（容纳 4-5 字「本月销量/累计销量」表头）
   全局 .hg-col-num 仅 26px 会让表头竖排；这里升到 70px（再 + 8px padding = 78px 单元格），
   表头允许换行（数据为数字两字不换行），整表横向滚动如溢出。 */
#pgForm .hg-stockquery .hg-sales-grid th.hg-col-num,
#pgForm .hg-stockquery .hg-sales-grid td.hg-col-num { width: 70px !important; min-width: 70px !important; }
#pgForm .hg-stockquery .hg-sales-grid th.hg-col-num { white-space: normal; }
#pgForm .hg-stockquery .hg-sales-grid td.hg-col-num { white-space: nowrap; }
/* 2026-09-05 库存资产块：5 块挤一行时宽度更从容（容纳 note 文字完整显示） */
.hg-stock-asset { gap: 10px; }
.hg-stock-asset-item { min-width: 200px; flex: 0 0 200px; }
/* 2026-09-05 库存查询销售汇总两块：本月（橙，进行中）/ 累计（主色蓝，历史）
   与上面「库存资产」三块同构（label / value / note），仅用左侧色条与数字色区分 */
.hg-stock-asset-item--sale { border-left: 3px solid var(--hg-warning); }
.hg-stock-asset-item--sale .hg-stock-asset-value { color: #D97706; }
.hg-stock-asset-item--total { border-left: 3px solid var(--hg-primary); }
.hg-stock-asset-item--total .hg-stock-asset-value { color: var(--hg-primary); }
@media (max-width: 640px) {
  .hg-stock-asset { gap: 8px; }
  .hg-stock-asset-item { flex: 1 1 100%; }
}

/* ===================== 会员标签（2026-08-30 · wcVipTag 菜单 147） =====================
   ① .hg-chk-wrap / .hg-chk-list：此前只有结构没有样式（wcVipTagSet 的品类勾选区同样受益），
      这里补齐：CheckBoxList / RadioButtonList 的 table 布局改流式换行，勾选框用主色 accent。
   ② 打标弹窗：会员画像 4 宫格 + 按组勾选标签（互斥组单选、自动标签禁用）+ 操作记录。 */
.hg-chk-list tr { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.hg-chk-list td { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--hg-ink); }
.hg-chk-list input[type="checkbox"], .hg-chk-list input[type="radio"] {
  width: 15px; height: 15px; margin: 0; accent-color: var(--hg-primary);
}
.hg-chk-list label { margin: 0; cursor: pointer; white-space: nowrap; }
.hg-chk-list-inline tr { flex-wrap: nowrap; gap: 16px; }

.hg-viptag-panel { width: min(760px, 94vw); }
/* 2026-09-07 弹窗去掉会员资料/KPI 头（会员卡已有），标题改 .hg-disc-hd 极简行 */
.hg-viptag-panel > .hg-disc-hd { padding: 18px 20px 0; }
.hg-viptag-body { padding: 14px 20px; max-height: 44vh; overflow-y: auto; }
.hg-viptag-group { padding: 10px 0; border-bottom: 1px dashed var(--hg-border); }
.hg-viptag-group:last-child { border-bottom: 0; }
.hg-viptag-group-hd { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--hg-ink); }
.hg-viptag-group-hd i { margin-left: 6px; font-style: normal; font-weight: 400; font-size: 12px; color: var(--hg-faint); }
.hg-viptag-log { padding: 4px 20px 12px; }
.hg-viptag-subtitle { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--hg-ink); }
.hg-viptag-loggrid .hg-col-time { width: 110px; }
.hg-viptag-ft { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--hg-border); }
@media (max-width: 640px) {
  .hg-viptag-kpi { grid-template-columns: repeat(2, 1fr); }
  .hg-viptag-hd, .hg-viptag-body, .hg-viptag-log, .hg-viptag-ft { padding-left: 14px; padding-right: 14px; }
  .hg-viptag-body { max-height: 38vh; }
}

/* 会员标签 chip（POS 端常显） */
.hg-tag-chip {
  display: inline-block; margin: 2px 6px 2px 0; padding: 3px 10px;
  font-size: 12px; line-height: 1.6; color: var(--hg-primary); white-space: nowrap;
  background: var(--hg-primary-soft); border: 1px solid var(--hg-primary-pale);
  border-radius: var(--hg-radius-full);
}
.hg-tag-empty { font-size: 13px; color: var(--hg-faint); }

/* ===================== 企微侧边栏 wxside.aspx（2026-08-30） =====================
   企微「聊天工具栏」页面：窄屏（约 380px）专用，其余样式全部走全局 hg-* 类。
   注意：本页不依赖 HGBOX 登录态，也没有 default.aspx 的外壳，故这里单独定基础排版。 */
/* 只作用于侧边栏页面本体（wxside.aspx 的 <body class="wx-body">），
   绝不写裸 body 选择器，否则会污染 default.aspx 等全站页面 */
.wx-body { margin: 0; padding: 12px; background: var(--hg-canvas); font-size: 14px; }
.wx-side { max-width: 460px; margin: 0 auto; }
.wx-card {
  background: var(--hg-surface); border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius); padding: 14px; margin-bottom: 12px;
}
.wx-name { font-size: 16px; font-weight: 600; color: var(--hg-ink); }
.wx-sub { margin-top: 4px; font-size: 12px; color: var(--hg-muted); }
.wx-kpi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.wx-kpi > div {
  padding: 8px 10px; background: var(--hg-canvas);
  border: 1px solid var(--hg-border); border-radius: var(--hg-radius);
}
.wx-kpi b { display: block; font-size: 15px; font-weight: 700; color: var(--hg-primary); }
.wx-kpi span { display: block; margin-top: 2px; font-size: 11px; color: var(--hg-muted); }
.wx-sec { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--hg-ink); }
.wx-group { padding: 8px 0; border-bottom: 1px dashed var(--hg-border); }
.wx-group:last-child { border-bottom: 0; }
.wx-group-hd { margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--hg-ink); }
.wx-group-hd i { margin-left: 4px; font-style: normal; font-weight: 400; color: var(--hg-faint); }
.wx-chk { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.wx-chk label { display: flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.wx-chk input { width: 15px; height: 15px; margin: 0; accent-color: var(--hg-primary); }
.wx-tip { font-size: 12px; line-height: 1.6; color: var(--hg-muted); }
.wx-err { color: var(--hg-danger); font-size: 13px; }

/* ============ 企微侧边栏画像扩充（2026-09-01 · wxside） ============ */
.wx-trend-bars { display: flex; align-items: flex-end; gap: 4px; height: 96px; padding-top: 6px; }
.wx-trend-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; min-width: 0; }
.wx-trend-bar i { display: block; width: 60%; max-width: 22px; border-radius: 3px 3px 0 0; background: var(--hg-border-strong, #C7D2E0); transition: height .3s ease; }
.wx-trend-bar.cur i { background: var(--hg-primary); }
.wx-trend-bar b { font-size: 9px; font-weight: 400; color: var(--hg-faint); white-space: nowrap; }
.wx-cats { display: flex; flex-direction: column; gap: 7px; margin-top: 2px; }
.wx-cat { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.wx-cat span { flex: 0 0 64px; color: var(--hg-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-cat i { flex: 1; height: 8px; border-radius: 4px; background: var(--hg-bg-2, #F1F5F9); overflow: hidden; }
.wx-cat i b { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--hg-primary), var(--hg-primary-soft)); }
.wx-cat em { flex: 0 0 auto; min-width: 52px; text-align: right; font-style: normal; color: var(--hg-primary); font-weight: 600; }
.wx-orders { display: flex; flex-direction: column; }
.wx-order { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--hg-border); }
.wx-order:last-child { border-bottom: 0; padding-bottom: 0; }
.wx-order-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wx-order-l b { font-size: 13px; color: var(--hg-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-order-l span { font-size: 11px; color: var(--hg-faint); }
.wx-order-r { flex: 0 0 auto; margin-left: 10px; font-size: 13px; font-weight: 700; color: var(--hg-ink); }
.wx-coupons { display: flex; flex-wrap: wrap; gap: 6px; }
.wx-coupon { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--hg-border-strong, #C7D2E0); color: var(--hg-muted); background: var(--hg-canvas); }
.wx-coupon.ok { border-color: var(--hg-primary); color: var(--hg-primary); background: var(--hg-primary-soft); }
.wx-coupon i { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 999px; background: var(--hg-bg-2, #F1F5F9); }
.wx-coupon.ok i { background: var(--hg-primary); color: #fff; }
.wx-coupon-ct { margin-top: 8px; }

/* 2026-09-13 .hg-sub-title：wcXcx* 系列（Vip / Report / Order / Activity）在用的区块小标题语义类，
   此前 CSS 未定义、只靠内联 font-weight/font-size → 没有 line-height，继承 #pgForm{line-height:0}
   后行盒塌成 0、与下一行重叠（会员详情抽屉实测 h=0）。此处补齐，四处页面同时受益。 */
.hg-sub-title { line-height: 1.6; }

/* ===================== 会员列表右侧抽屉的区块（2026-08-30 · wcXcxVip） =====================
   抽屉里原有区块都是内联样式，新增的「会员标签」区统一走这几类，便于后续收敛。 */

/* 2026-09-13 抽屉整体行高兜底（用户实测报「文字重叠」）：
   抽屉根 div 是 runat=server（id 带 ctl00_ 前缀，故用后缀选择器）且不声明 line-height，
   内部 21 处标题/小标签/链接（会员详情、关闭 ✕、会员标签、+打标、券/积分/余额面板 12px 标签、
   .hg-drawer-sec-title、.hg-drawer-taghd 等）也只有 font-size → 全部继承 #pgForm{line-height:0}，
   行盒塌成 0（实测 h=0、textH=15）→ 文字相互重叠。
   抽屉是 fixed 浮层、不参与 #pgForm 表格布局，故在根上恢复行高即可（line-height 是继承属性，
   后代自动跟随，无需 `*`）。用 :where() 保持零特异性：子块自有声明（pVipInfo 1.9 / pTouch 1.7 /
   .hg-drawer-note 1.7 / 表格 th,td 1.55 / .hg-sub-title 1.6）与 .hg-drawer-* 类一律优先。 */
/* 2026-09-19 抽屉整体左对齐兜底：抽屉根是外壳 .hg-shell 中间 td（text-align:center）的
   DOM 后代，会继承居中 —— flex 区块（.hg-drawer-sec-hd）看不出来，但「触达状态」这类
   普通 div 的行内内容（标题 + pTouch 圆点行）会被居中。在根上显式压回 left，
   一次性兜住抽屉里所有普通块（触达状态、最近订单标题等）。 */
:where([id$="divDrawer"]) { line-height: 1.6; text-align: left; }

.hg-drawer-sec { margin-top: 18px; }
.hg-drawer-sec-hd { display: flex; justify-content: space-between; align-items: center; }
.hg-drawer-sec-title { font-weight: 700; font-size: 14px; color: var(--hg-ink); }
.hg-drawer-panel {
  margin-top: 10px; padding: 14px; background: var(--hg-canvas);
  border: 1px solid var(--hg-border); border-radius: var(--hg-radius);
}
.hg-drawer-note { font-size: 12px; line-height: 1.7; color: var(--hg-muted); }
.hg-drawer-tagrow { padding: 8px 0; border-bottom: 1px dashed var(--hg-border); }
.hg-drawer-tagrow:last-child { border-bottom: 0; }
.hg-drawer-taghd { margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--hg-ink); }
.hg-drawer-taghd i { margin-left: 4px; font-style: normal; font-weight: 400; color: var(--hg-faint); }

/* 会员标签管理：规则配置区的醒目说明条 + 已选计数（2026-08-30） */
.hg-rule-hl {
  margin: 0 0 12px; padding: 10px 12px; font-size: 13px; line-height: 1.7; color: var(--hg-ink);
  background: var(--hg-primary-soft); border: 1px solid var(--hg-primary-pale);
  border-left: 3px solid var(--hg-primary); border-radius: var(--hg-radius-xs);
}
.hg-rule-hl b { color: var(--hg-primary); }
.hg-cate-picked { font-size: 13px; font-weight: 600; color: var(--hg-primary); font-variant-numeric: tabular-nums; }

/* 会员标签管理：品类按大类分组的组标题（2026-08-30） */
.hg-cate-group-hd {
  margin: 12px 0 6px; padding-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--hg-ink);
  border-bottom: 1px solid var(--hg-border);
}
.hg-cate-group-hd:first-child { margin-top: 0; }
/* 2026-08-31 促销配置：各门店收益率对照（多门店差异提示） */
.hg-sy-shop { margin: 12px 0; padding: 16px 16px; }
.hg-sy-shop table.hg-sales-grid { margin-top: 0; }
.hg-sy-shop table.hg-sales-grid td { padding: 6px 10px; }
.hg-sy-diff td { color: var(--hg-danger); font-weight: 500; }
/* 2026-09-07 该「盒主×门店」未配置收益率（按消费端兜底 75% 结算），黄行警示 */
.hg-sy-nocfg td { background: #FFF7E6; color: #B26A00; font-weight: 500; }
.hg-sy-na { margin-left: 4px; font-size: 11px; font-weight: 400; color: #B26A00; opacity: .85; }
.hg-sy-warn { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--hg-danger); }
.hg-sy-confirm { margin-top: 10px; font-size: 13px; color: var(--hg-ink); }
/* 2026-08-31 促销配置：实际折扣率显示 */
.hg-sy-rate { margin-left: 4px; font-size: 12px; color: var(--hg-muted); white-space: nowrap; }
.hg-sy-nodisc { color: var(--hg-danger); font-weight: 500; }
.hg-sy-sum { font-size: 13px; line-height: 1.7; color: var(--hg-ink); }
.hg-sy-sum b { font-weight: 500; color: var(--hg-primary); }
/* 2026-08-31 促销完整规则预览卡片 */
.hg-sy-prow { display: flex; font-size: 13px; line-height: 1.9; }
.hg-sy-pk { width: 88px; flex: none; color: var(--hg-muted); }
.hg-sy-pval { color: var(--hg-ink); }
.hg-sy-pval b { font-weight: 500; color: var(--hg-primary); }
.hg-sy-demo { margin-top: 8px; background: var(--hg-gray); border-radius: 6px; padding: 8px 12px; font-size: 15px; font-weight: 600; line-height: 1.7; color: var(--hg-primary); }

/* 2026-09-02 促销配置 Dlg：左 GridView + 右规则预览 双栏布局（沿用 .hg-content-card + .hg-sy-shop 视觉壳） */
.hg-cx-board { display: flex; gap: 16px; align-items: stretch; margin: 12px 0; }
.hg-cx-board__main { flex: 1 1 auto; min-width: 0; margin-bottom: 0; align-self: stretch; }
.hg-cx-board__side { flex: 0 0 340px; max-width: 380px; margin-bottom: 0; align-self: stretch; }
@media (max-width: 900px) {
  .hg-cx-board { flex-direction: column; }
  .hg-cx-board__side { flex: 1 1 auto; max-width: 100%; }
}

/* 2026-09-02 促销配置 Dlg"每周星期"7 checkbox：移动端(.hg-filter-group 被全局强制 column)下也排成一行；桌面端保持横排不换行 */
.hg-week-row { display: flex !important; align-items: center; flex-wrap: nowrap; gap: 6px; width: 100%; }
.hg-week-row input[type="checkbox"] { margin: 0 2px 0 0; vertical-align: middle; }
.hg-week-row > label { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; color: var(--hg-ink); margin-right: 8px; }

/* 2026-08-31 促销页区块标题：蓝色加粗加大 */
/* 2026-09-02 显式 text-align:left：祖先 .hg-content-card 在老 hg-shell td 内继承居中，
   导致"请选择需要促销的商品"等章节标题全宽居中显示。覆盖继承确保全站 5 个 CX Dlg 章节小标题统一靠左对齐 */
.hg-sec-title { color: var(--hg-primary); font-weight: 600; font-size: 16px; margin: 10px 0; text-align: left; }

/* 2026-09-03 池式规则提示卡：池式区域首段说明（主商品池合计→赠池最贵）。
   line-height 兜底（祖先 #pgForm{line-height:0} 会让所有子元素坍缩）；
   蓝边淡底卡片形态与 .hg-sec-title 主商品池/赠品池 标题明确分层，避免视觉重叠 */
.hg-pool-tip {
    display: block;
    line-height: 1.55;
    color: #555;
    font-size: 13px;
    padding: 10px 14px 10px 14px;
    margin: 4px 0 14px;
    border-left: 3px solid var(--hg-primary);
    background: #f4f8ff;
    border-radius: 4px;
    text-align: left;
    overflow: hidden;
}
.hg-pool-tip b { color: var(--hg-primary); font-weight: 600; }

/* 2026-09-02 5 个 CX Dlg 章节小标题：上方再加 18px 形成分节感（与上一组分隔开） */
.hg-content-card.hg-cx-dlg .hg-sec-title { margin: 18px 0 10px; }

/* 2026-09-02 CX 5 Dlg 明细表「特价」「原价」等输入框：白底灰线蓝字 —— 对齐快速上货 wcPutProdQK 的 .hg-qk-shqty
   （用户 09-02 指定，替换原 08-31 浅蓝底 #e6f2fa 灰字方案）。
   蓝字 #0052A3(--hg-primary-deep) 双写 -webkit-text-fill-color + caret-color：
   Chromium disabled/readonly 会忽略 color 只认 text-fill，双写保色（09-02 记忆铁律）。
   显式 border 1px var(--hg-border) #E5E7EB 灰线 = 全站 .hg-input 标准边框，替代被删的 BorderStyle 内联。
   白底让灰线清晰可见（原浅蓝底与灰线对比弱）。 */
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager) td input.hg-input-cx {
  background-color: #ffffff;
  border: 1px solid var(--hg-border);
  color: #0052A3;
  -webkit-text-fill-color: #0052A3;
  caret-color: #0052A3;
  /* 2026-09-02 5 个 CX Dlg 产品列 hg-input-cx 全局宽度接管：替代 inline Width="80px/30px"/Font-Bold/Font-Size/BorderStyle="none" 内联屎山。
     文本类 hg-input 全局规则已接管 padding/font/border，这里只需补 width。文本居中让数字/百分比更紧凑 */
  width: 80px !important;
  max-width: 100% !important;
  box-sizing: border-box;
  text-align: center;
  font-weight: 700; /* 接管 inline Font-Bold="true"：让率/特价突出 */
}
/* hover/focus：边框转主蓝提示可编辑（常态已是白底蓝字，无需再反色） */
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover td input.hg-input-cx,
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager) td input.hg-input-cx:focus {
  background-color: #ffffff;
  border-color: var(--hg-primary);
  font-weight: 700;
}
/* 2026-08-31 促销时段双独立选择器（开始/结束各一个，告别 range 选两次） */
.hg-time-dual { display: inline-flex; align-items: center; gap: 4px; }
.hg-time-dual .hg-time-begin,
.hg-time-dual .hg-time-end {
  width: 110px; padding: 5px 10px; border: 1px solid var(--hg-border);
  border-radius: 6px; font-size: 14px; background: #fff; color: var(--hg-ink);
  text-align: center; cursor: pointer;
}
.hg-time-dual .hg-time-begin:hover,
.hg-time-dual .hg-time-end:hover { border-color: var(--hg-primary); }
.hg-time-dual .hg-time-sep { color: var(--hg-muted); font-size: 13px; padding: 0 2px; }
.hg-time-dual input.flatpickr-input[readonly] { background: #fff; }
/* 2026-08-31 复选框选中行（JS 加 class hg-selected-row，CSS 走类，不依赖 :has()）
   GridView SelectedRowStyle 是 inline background，用 background 简写 + !important 压住 */
#pgForm .hg-sales-grid tbody tr.hg-selected-row > td { background: #e6f2fa !important; color: var(--hg-primary) !important; }
#pgForm .hg-sales-grid tbody tr.hg-selected-row > td * { color: var(--hg-primary) !important; }
#pgForm .hg-sales-grid tbody tr.hg-selected-row > td input.hg-input-cx {
  /* 2026-09-02 用户反馈：选中行 input 背景从白改淡蓝，比 td #e6f2fa 深一档让框线可见 */
  background: #dcecf5 !important;
  color: var(--hg-primary) !important;
  -webkit-text-fill-color: var(--hg-primary) !important;
}
/* 2026-09-07 促销 Dlg 行内 折扣/盒主让利 锁定：用户反馈行内手动填了不生效，
   统一由上方「批量折扣/盒主让利/设置」按钮写库（UpdateItem 直写库+SetItems 刷新，
   而行内 TextBox 仅在点「确定」时由 SaveItems 读 — 容易漏点）。
   → 行内只读（ReadOnly 仍 PostBack 值，无副作用，SaveItems 读到原值再写一次无害）。 */
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager) td input.hg-input-cx[readonly] {
  background-color: #f5f5f5 !important;
  border-color: transparent !important;
  color: #6b6b6b !important;
  -webkit-text-fill-color: #6b6b6b !important;
  cursor: not-allowed !important;
  font-weight: 500 !important;
}
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover td input.hg-input-cx[readonly],
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager) td input.hg-input-cx[readonly]:focus {
  background-color: #f5f5f5 !important;
  border-color: transparent !important;
}
#pgForm .hg-sales-grid tbody tr.hg-selected-row > td input.hg-input-cx[readonly] {
  background-color: #ececec !important;
}

/* ============================================================
   在线销售收银台（wcSale，2026-08-31 双栏重构 · P1 视觉）
   参考新版 POS：左会员卡 / 右订单卡 · 卡片化商品行 · 通栏 CTA
   ============================================================ */

/* ---- 双栏栅格（桌面双栏，≤1100px 单栏堆叠） ---- */
.hg-pos-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; margin-top: 14px; }
@media (max-width: 1100px) { .hg-pos-layout { grid-template-columns: 1fr; } }
/* 2026-09-10 D5 横幅左栏置顶：仅占左栏宽，位于会员卡之上；无内容时隐藏 */
.hg-pos-banner-wrap { margin-bottom: 10px; }
.hg-pos-banner-wrap:empty { display: none; }
/* 左栏窄（340px）下横幅条目字号收紧、避免过宽换行 */
.hg-pos-banner-wrap .hg-pos-banner .hg-brow { font-size: 12px; line-height: 1.5; padding: 6px 10px; }
.hg-pos-banner-wrap .hg-pos-banner .hg-brow-txt { white-space: normal; }

/* ---- 单据信息条（顶栏，合并原 4 行筛选区） ---- */
/* 2026-09-10 B-顶栏换行收紧：横向间距 22→14，控件宽 170→140（销售单号/时间 170→150），
   让 销售单号/开单时间/店铺/收银员/导购员 5 组在标准 1680 视口能排在同一行；
   「销售类型」单独占第二行（.hg-filter-group--wrap-row flex-basis:100%） */
.hg-pos-topbar {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  padding: 6px 0; margin-top: 12px;
}
.hg-pos-topbar .hg-filter-group { display: flex; align-items: center; gap: 6px; }
.hg-pos-topbar .hg-filter-group--wrap-row { flex-basis: 100%; max-width: 100%; justify-content: flex-start; gap: 18px; }  /* 2026-09-10 全部左对齐（原 space-between 把「销售」推到最右，用户要求改回靠左） */
/* 2026-09-10 顶栏右侧上单统计（数量/金额/找零）：结账后即时显示，空单 :empty 隐藏 */
/* 2026-09-10 上单统计改红字（收银员醒目） */
.hg-pos-prevstat { display: inline-flex; align-items: center; gap: 18px; font-size: 14px; color: var(--hg-danger); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hg-pos-prevstat:empty { display: none; }
.hg-pos-prevstat .v { color: var(--hg-danger); font-weight: 700; }
.hg-pos-prevstat .sep { color: var(--hg-danger); opacity: .45; margin: 0 2px; }
/* 2026-08-31 顶栏信息完整显示：标签 14px；输入框加宽不截断（单号/时间/下拉全信息） */
.hg-pos-topbar .hg-filter-label { font-size: 14px; color: var(--hg-muted); margin: 0; white-space: nowrap; }
.hg-pos-topbar .hg-input { width: 150px; padding: 5px 8px; }
.hg-pos-topbar .hg-cselect,
.hg-pos-topbar .hg-cselect-trigger { width: 140px; padding: 5px 8px; }   /* 2026-09-01 与 .hg-pos-validdate 对齐：店铺/营业员改为只读 trigger 后保持同等宽度；2026-09-10 由 170 调为 140 配合 5 组同行 */
/* 2026-09-10 收银员触发器单独收窄（增强器已把 select 的 hg-pos-* 类同步到 trigger；login 名较短不截断） */
.hg-pos-topbar .hg-cselect-trigger.hg-pos-cashier { width: 100px; }
.hg-pos-topbar .hg-pos-billno { width: 185px; font-weight: 800; color: var(--hg-primary); font-variant-numeric: tabular-nums; letter-spacing: .3px; }  /* 2026-09-10 150→185 让 18 位销售单号完整显示 */
.hg-pos-topbar .hg-pos-validdate { width: 185px; font-variant-numeric: tabular-nums; }  /* 2026-09-10 150→185 让 19 位时间完整显示 */

/* ---- 左栏：会员卡 ---- */
.hg-pos-member { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.hg-pos-msearch { display: flex; gap: 6px; }
.hg-pos-msearch .hg-input { flex: 1; }
/* 2026-09-03 导购员行：独立输入框退役（万能扫码框员工码 7 位自动识别），仅只读展示；
   空态占位走 :empty（.cs 清空 Text="" 即回占位），锁定后 .cs 写姓名即深色高亮 */
.hg-pos-shyline { align-items: center; }
.hg-pos-shyline .hg-pos-shyval,
.hg-pos-topbar .hg-pos-shyval {
  display: inline-block; min-height: 42px; padding: 11px 14px;
  width: 170px;
  background: var(--hg-gray);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  font-family: var(--hg-font); font-size: 14px; color: var(--hg-ink);
  line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
/* 2026-09-10 顶栏导购员收窄 170→110（姓名 2-4 字足够显示），空态占位同步缩短；会员卡区（若有）不受影响 */
.hg-pos-topbar .hg-pos-shyval { width: 110px; padding: 11px 10px; }
.hg-pos-shyline .hg-pos-shyval:empty::before,
.hg-pos-topbar .hg-pos-shyval:empty::before {
  content: "未指定（扫员工码自动识别）";
  color: var(--hg-faint); font-weight: 400;
}
.hg-pos-topbar .hg-pos-shyval:empty::before {
  content: "未指定/扫码";
  font-size: 12px;
}
.hg-pos-member-card {
  background: #fff; border: 1px solid var(--hg-border-light); border-radius: 16px;
  padding: 16px; box-shadow: 0 1px 3px rgba(17,24,39,.05);
}
.hg-pos-mhead { display: flex; align-items: center; gap: 12px; }
.hg-pos-mhead .hg-avatar { width: 52px; height: 52px; border-radius: 50%; font-size: 22px; }
.hg-pos-mname { font-size: 18px; font-weight: 800; color: var(--hg-ink); line-height: 1.2; }
.hg-pos-mbadge {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 3px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.hg-pos-mphone { font-size: 13px; color: var(--hg-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.hg-pos-mmeta { display: flex; gap: 6px; margin-top: 2px; }
.hg-pos-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.hg-pos-kpi > div { background: var(--hg-bg); border-radius: 10px; padding: 8px 10px; }
.hg-pos-kpi b { display: block; font-size: 17px; font-weight: 800; color: var(--hg-ink); font-variant-numeric: tabular-nums; }
.hg-pos-kpi span { font-size: 12px; color: var(--hg-muted); }

/* 2026-09-07 「清除会员」+「优惠券」并排到生日下方一行：
   左侧 outline 按钮（蓝边白底），右侧优惠券 chip（蓝底浅蓝边）占满剩余宽度 */
.hg-pos-actions-row {
  display: flex; align-items: stretch; gap: 8px; margin-top: 12px;
}
.hg-pos-actions-row .hg-filter-btn { flex: none; align-self: center; }
.hg-pos-actions-row .hg-pos-coupon { flex: 1; min-width: 0; margin-top: 0; }
.hg-pos-coupon {
  display: flex; justify-content: space-between; align-items: center; margin-top: 12px;
  background: var(--hg-primary-soft); border-radius: 10px; padding: 9px 12px;
  font-size: 13px; color: var(--hg-primary); font-weight: 600;
}
.hg-pos-coupon b, .hg-pos-coupon .hg-pos-coupon-link { font-variant-numeric: tabular-nums; }
/* 2026-09-03 电子券入口改 LinkButton（整条不再整块可点，仅右侧链接可点） */
.hg-pos-coupon .hg-pos-coupon-link {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--hg-primary); font-weight: 700; text-decoration: none;
  cursor: pointer; line-height: 1.45; padding: 1px 0 1px 10px;
}
.hg-pos-coupon .hg-pos-coupon-link:hover { color: var(--hg-primary-deep); }
.hg-pos-coupon .hg-pos-coupon-link:hover i { transform: translateX(2px); }
.hg-pos-coupon .hg-pos-coupon-link i { font-style: normal; font-size: 15px; line-height: 1; transition: transform .15s var(--hg-ease-standard); }

/* ---- 2026-09-03 POS 电子券核销 UI（选券/已选/退货还券/券弹窗） ---- */
.hg-pos-coupon-sel {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
  background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; padding: 7px 10px;
  font-size: 13px; color: #065f46; line-height: 1.45;
}
.hg-pos-coupon-sel .lbl { flex: none; color: #047857; font-weight: 700; }
.hg-pos-coupon-sel .val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.hg-pos-coupon-sel a.rm {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #d1fae5; color: #047857; font-size: 14px; font-weight: 700;
  text-decoration: none; cursor: pointer; line-height: 1;
}
.hg-pos-coupon-sel a.rm:hover { background: #fecaca; color: #b91c1c; }

/* 退货原单行（退货模式显示，输原单号 → 校验还券） */
.hg-pos-refund {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: #fff5f5; border: 1px solid #fecaca; border-radius: 14px; padding: 10px 12px;
  line-height: 1.45;
}
.hg-pos-refund .hg-filter-label { flex: none; font-weight: 600; color: var(--hg-danger); }
.hg-pos-refund .hg-input { flex: 1; min-width: 170px; }
/* 2026-09-11 原单号行挪入顶栏销售类型行后（仅退货模式 Visible）：紧凑内联变体 */
.hg-pos-refund--inline { padding: 3px 10px; border-radius: 10px; }
.hg-pos-refund--inline .hg-input { flex: 0 1 230px; width: 210px; min-width: 170px; }
.hg-pos-refund--inline .hg-pos-refcheck { flex: 1 1 auto; flex-basis: auto; min-width: 120px; }
.hg-pos-refcheck { flex: 0 0 100%; font-size: 12px; color: #047857; line-height: 1.45; word-break: break-all; }

/* 券弹窗（挂 .hg-modal-panel 下，仅收窄宽度；壳复用 .hg-disc-hd/.hg-disc-custom） */
/* 2026-09-11 四边留白：此前只有宽度无 padding，标题「电子券」贴顶、券条目贴左右、底部「关闭」
   贴底，与取单弹窗（.hg-take-panel padding:20px）风格不一致。补 padding 20px + border-box；
   宽度同步 560→600px 以保持内容区仍为 560px（纯加留白，内容布局零回归）。 */
.hg-vou-panel { width: min(600px, calc(100vw - 32px)); padding: 20px; box-sizing: border-box; }
.hg-vou-list { max-height: 52vh; overflow-y: auto; padding: 4px 0; display: flex; flex-direction: column; gap: 8px; }
.hg-vou-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--hg-border-light); border-radius: 12px; padding: 10px 12px;
  background: #fff; line-height: 1.45;
}
.hg-vou-item:hover { border-color: var(--hg-primary); box-shadow: var(--hg-shadow-sm); }
.hg-vou-info { flex: 1; min-width: 0; }
.hg-vou-info .nm {
  font-size: 14px; font-weight: 700; color: var(--hg-ink);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.hg-vou-info .nm i.tag {
  font-style: normal; font-size: 11px; font-weight: 600;
  color: var(--hg-primary); background: var(--hg-primary-soft);
  padding: 1px 8px; border-radius: 999px; flex: none;
}
.hg-vou-info .sub { margin-top: 4px; font-size: 12px; color: var(--hg-muted); font-variant-numeric: tabular-nums; }
/* 2026-09-14 券弹窗「本单可用 / 暂不可用」两态：可用行给出立减额（绿），不可用行整体灰化 + 写明原因（琥珀） */
.hg-vou-item .hg-vou-save { margin-top: 4px; font-size: 12px; font-weight: 600; color: #0f6e56; font-variant-numeric: tabular-nums; }
.hg-vou-item.hg-vou-off { background: #fafafa; border-color: #e9eaec; }
.hg-vou-item.hg-vou-off:hover { border-color: #e9eaec; box-shadow: none; }
.hg-vou-item.hg-vou-off .nm { color: #9ca3af; }
.hg-vou-item.hg-vou-off .nm i.tag { color: #9ca3af; background: #f0f0f0; }
.hg-vou-item.hg-vou-off .sub { color: #b3b6bb; }
.hg-vou-item .hg-vou-why { margin-top: 4px; font-size: 12px; color: #b45309; }
#pgForm a.hg-filter-btn.hg-vou-disabled {
  background: #f3f4f6 !important; color: #9ca3af !important;
  border-color: #e5e7eb !important; cursor: not-allowed; box-shadow: none;
}
/* 选用按钮紧凑化：#pgForm a.hg-filter-btn 的 8px/18px/14px 压过 .hg-btn-sm，需同级提权 */
#pgForm a.hg-filter-btn.hg-btn-sm { padding: 5px 14px; font-size: 13px; border-radius: var(--hg-radius); }
.hg-pos-vou-picked {
  background: #f3f4f6 !important; color: #9ca3af !important;
  border-color: #e5e7eb !important; cursor: not-allowed; box-shadow: none;
}
.hg-pos-vou-picked:hover { background: #f3f4f6 !important; color: #9ca3af !important; }
.hg-pos-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hg-pos-tags .hg-tag-chip { margin: 0; }

/* 2026-09-07 会员标签行：左侧 chip 区 + 右侧「更多标签 ›」按钮 */
.hg-pos-tags-row {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.hg-pos-tags-row .hg-pos-tags { flex: 1; min-width: 0; margin-top: 0; }
.hg-pos-tags-more {
  flex: none; font-size: 12px; line-height: 1.6; color: var(--hg-primary);
  background: transparent; padding: 2px 6px; border-radius: 8px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.hg-pos-tags-more:hover { background: var(--hg-primary-soft); color: var(--hg-primary-deep); }
/* 折叠 chip（隐藏标签总数，提示点更多看完整） */
.hg-tag-chip.hg-tag-more {
  background: var(--hg-bg); color: var(--hg-muted); border-color: var(--hg-border);
  cursor: pointer; font-weight: 700;
}
.hg-tag-chip.hg-tag-more:hover { background: var(--hg-primary-soft); color: var(--hg-primary); }
.hg-pos-topbuy {
  background: #fff; border: 1px solid var(--hg-border-light); border-radius: 16px; padding: 12px 14px;
}
.hg-pos-topbuy-hd { font-size: 13px; font-weight: 800; color: var(--hg-ink); display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hg-pos-topbuy-hd i { font-style: normal; font-size: 11px; color: var(--hg-muted); font-weight: 400; }
.hg-pos-topbuy ul { list-style: none; margin: 0; padding: 0; }
.hg-pos-topbuy li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--hg-divider); font-size: 13px; }
.hg-pos-topbuy li:last-child { border-bottom: none; }
.hg-pos-topbuy .rank { width: 20px; height: 20px; border-radius: 5px; background: var(--hg-bg); color: var(--hg-muted); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.hg-pos-topbuy li:nth-child(-n+3) .rank { background: #fef3c7; color: #b45309; }
.hg-pos-topbuy .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--hg-ink); }
.hg-pos-topbuy .cnt { color: var(--hg-muted); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }

/* ---- 右栏：订单卡 ---- */
.hg-pos-order { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
/* 2026-09-10 扫码行去卡片内边距：输入框与下方网格/提示行贴左对齐 */
.hg-pos-scan {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: transparent; border: none; border-radius: 0; padding: 0;
}
.hg-pos-scan .hg-input { flex: 1; min-width: 180px; height: 42px; font-size: 15px; }
.hg-pos-scan .hg-filter-btn { height: 42px; padding: 0 20px; font-size: 14px; }
.hg-pos-scan .hg-sale-chk { font-size: 13px; }
.hg-pos-scan .hg-sale-chk input { width: 16px; height: 16px; }
/* 2026-09-12 原 .hg-pos-promo*（底部「促销活动」折叠条）整段删除 —— 该栏已从 wcSale.ascx 移除。
   注意：该折叠条曾是 #pgForm{line-height:0} 行盒坍塌的四类兜底面板之一，删除后剩余三类
   （.hg-modal-panel / .hg-dlg-panel / .hg-tender-giftcard）仍各自保留 line-height:1.5，不受影响。 */

/* ---- 2026-09-11 POS 标题行：标题左 + 店铺活动入口右（点击弹右侧活动抽屉） ---- */
.hg-pos-titlebar { display: flex; align-items: flex-end; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.hg-pos-titlebar .hg-page-title { margin: 0; }
.hg-pos-titlebar .hg-pos-drawer-entry { margin: 0 0 6px; }

/* ---- 2026-09-04 C-促销事前预告：POS 右侧活动抽屉（本店活动 + 满减凑单） ---- */
.hg-pos-drawer-entry { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.hg-pos-drawer-entry .hg-filter-btn { flex: 0 0 auto; }
.hg-pos-drawer-entry .hg-filter-btn b { font-weight: 800; color: #0066CC; }
.hg-pos-drawer-tip { font-size: 12px; color: #EF4444; font-weight: 600; }

.hg-pos-drawer { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1200; display: none; }
.hg-pos-drawer.open { display: block; }
.hg-pos-drawer-mask { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(15,23,42,.38); }
.hg-pos-drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: 360px; max-width: 88vw;
  background: #fff; box-shadow: -8px 0 28px rgba(15,23,42,.18);
  display: flex; flex-direction: column; animation: hgDrawerIn .22s var(--hg-ease);
}
@keyframes hgDrawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.hg-pos-drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--hg-border);
  font-weight: 700; color: var(--hg-ink);
}
.hg-pos-drawer-hd .x { font-size: 22px; line-height: 1; color: var(--hg-muted); text-decoration: none; padding: 0 4px; }
.hg-pos-drawer-hd .x:hover { color: var(--hg-ink); }
.hg-pos-drawer-body { flex: 1 1 auto; overflow: auto; padding: 12px 16px 20px; }

.hg-pd-gap { background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.hg-pd-gap.ok { background: #ECFDF5; border-color: #A7F3D0; }
.hg-pd-gap b { font-size: 15px; color: #EF4444; font-weight: 800; line-height: 1.4; }
.hg-pd-gap.ok b { color: #059669; }
.hg-pd-gap span { font-size: 12px; color: var(--hg-muted); line-height: 1.5; word-break: break-all; }

.hg-pd-item {
  border: 1px solid var(--hg-border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff;
  /*2026-09-07 兜底：#pgForm{line-height:0} 会让抽屉活动条目子元素继承坍塌、文字被压扁挤一行重叠 */
  line-height: 1.45;
}
.hg-pd-t { display: flex; align-items: center; gap: 8px; line-height: 1.45; }
.hg-pd-t b { font-size: 13px; color: var(--hg-ink); word-break: break-all; line-height: 1.45; }
.hg-pd-badge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #EEF2FF; color: #4338CA; white-space: nowrap; flex: 0 0 auto; line-height: 1.45; }
.hg-pd-badge.t1 { background: #FFF1F2; color: #BE123C; }
.hg-pd-badge.t2 { background: #FEF3C7; color: #B45309; }
.hg-pd-badge.t3 { background: #ECFDF5; color: #047857; }
.hg-pd-badge.t4 { background: #F5F3FF; color: #6D28D9; }
.hg-pd-badge.t5 { background: #EFF6FF; color: #1D4ED8; }
.hg-pd-d { font-size: 12px; color: var(--hg-muted); margin-top: 4px; line-height: 1.45; }
/* 2026-09-09 活动抽屉「本单命中」徽标（行级类品/特价/满额命中，让利额由 RenderPosPromo 汇总） */
.hg-pd-item.hit { background: #F0FDF4; border-color: #86EFAC; }
.hg-pd-hit { display: inline-block; margin-left: 2px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: #BBF7D0; color: #166534; white-space: nowrap; flex: 0 0 auto; }
.hg-pd-empty { text-align: center; color: var(--hg-muted); font-size: 13px; padding: 24px 0; }
/* 2026-09-09 活动抽屉条目可点击展开（仅 data-expand=1 才有 cursor+onclick；其它条目保持纯展示） */
.hg-pd-item[data-expand="1"] { cursor: pointer; transition: background .12s, border-color .12s; }
.hg-pd-item[data-expand="1"]:hover { background: #F8FAFC; border-color: #CBD5E1; }
.hg-pd-item.open { background: #F1F5F9; border-color: #94A3B8; }
.hg-pd-arrow { margin-left: auto; font-style: normal; color: var(--hg-muted); font-size: 13px; flex: 0 0 auto; transition: transform .15s; }
.hg-pd-item.open .hg-pd-arrow { color: var(--hg-primary); }
/* 2026-09-09 活动商品图网格（默认折叠；展开时淡入） */
/* 2026-09-10 抽屉商品展开重做：分主池/赠池两段，主池默认折叠摘要、赠池绿底全展示 */
.pd-products { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .25s ease, opacity .2s ease; }
.hg-pd-item.open .pd-products { max-height: 1400px; opacity: 1; padding-top: 10px; border-top: 1px dashed #E2E8F0; }
.pd-prod { display: inline-flex; flex-direction: column; align-items: center; width: 72px; gap: 4px; }
.pd-prod img { width: 60px; height: 60px; border-radius: 6px; object-fit: cover; border: 1px solid var(--hg-border-light); background: var(--hg-gray); }
.pd-prod em { font-style: normal; font-size: 11px; color: var(--hg-ink); line-height: 1.3; text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 主池摘要条目 + 文字表格 */
.hg-pd-pool { margin-top: 8px; }
.hg-pd-pool-hd { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--hg-muted); margin-bottom: 6px; cursor: pointer; user-select: none; }
.hg-pd-pool-hd b { color: var(--hg-ink); font-weight: 700; }
.hg-pd-pool-hd em { font-style: normal; color: var(--hg-primary, #1a66cc); margin-left: auto; font-size: 11px; }
/* 文字表格：编码 + 名称 + 价格 三栏 */
.hg-pd-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--hg-border-light, #E5E7EB); border-radius: 8px; background: #fff; }
.hg-pd-list-item { display: grid; grid-template-columns: 78px 1fr 78px; gap: 8px; align-items: center; padding: 7px 10px; font-size: 12px; line-height: 1.4; border-bottom: 1px solid #F1F5F9; }
.hg-pd-list-item:last-child { border-bottom: none; }
.hg-pd-list-item .code { color: var(--hg-primary, #1a66cc); font-weight: 600; font-variant-numeric: tabular-nums; }
.hg-pd-list-item .name { color: var(--hg-ink, #222); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-pd-list-item .price { color: #EF4444; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
/* 赠池：绿底高亮 + 文字表格 */
.hg-pd-gifts { background: #ECFDF5; border: 1px solid #BBF7D0; border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.hg-pd-gifts-hd { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #047857; font-weight: 700; margin-bottom: 6px; }
.hg-pd-gifts-hd i { font-style: normal; background: #BBF7D0; padding: 1px 7px; border-radius: 999px; font-size: 11px; color: #064E3B; }
.hg-pd-gift-row { display: grid; grid-template-columns: 78px 1fr 78px; gap: 8px; align-items: center; padding: 5px 0; font-size: 12px; line-height: 1.4; border-bottom: 1px dashed #BBF7D0; }
.hg-pd-gift-row:last-child { border-bottom: none; }
.hg-pd-gift-row .code { color: #047857; font-weight: 700; font-variant-numeric: tabular-nums; }
.hg-pd-gift-row .name { color: #064E3B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-pd-gift-row .price { color: #047857; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.hg-pd-empty2 { font-size: 12px; color: var(--hg-muted); padding: 8px 0; }
.hg-pd-pool-hd[aria-expanded="false"] + .hg-pd-list { display: none; }
@media (max-width: 640px) {
  .hg-pos-drawer-panel { width: 100%; max-width: 100%; }
  .hg-pos-drawer-entry .hg-filter-btn { flex: 1 1 auto; justify-content: center; }
}

/* ---- 2026-09-09 D-促销收银员提醒横幅（购物车常驻：促单橙 .up / 防漏绿 .dn） ---- */
/* 2026-09-10 D2：横幅常驻 hover tooltip（赠池礼品），故取消 overflow:auto 截断；max-height 适当上调 */
.hg-pos-banner { display: flex; flex-direction: column; gap: 6px; margin: 0 0 8px; overflow: visible; text-align: left; }
.hg-brow { display: block; border-radius: 10px; padding: 8px 10px; font-size: 13px; line-height: 1.55; }
.hg-brow .hg-brow-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; line-height: 1.45; white-space: nowrap; margin-bottom: 4px; }
.hg-brow .hg-brow-txt { display: block; width: 100%; word-break: break-all; }
.hg-brow .hg-brow-txt b { font-weight: 800; font-variant-numeric: tabular-nums; }
.hg-brow.up { background: #FFF7ED; border: 1px solid #FED7AA; color: #7C2D12; }
.hg-brow.up .hg-brow-tag { background: #FFEDD5; color: #C2410C; }
.hg-brow.up b { color: #EA580C; }
.hg-brow.dn { background: #ECFDF5; border: 1px solid #A7F3D0; color: #064E3B; }
.hg-brow.dn .hg-brow-tag { background: #D1FAE5; color: #047857; }
.hg-brow.dn b { color: #059669; }

/* 2026-09-10 D3：横幅「(赠池X款候选)」点击弹窗 —— 弹出赠池礼品编码+名称（原 hover tooltip 改弹窗） */
.hg-brow-hint { display: inline-block; cursor: pointer; color: inherit; }
.hg-brow-hint > u { text-decoration: underline dotted; text-underline-offset: 2px; }
.hg-brow-hint:hover > u { text-decoration: underline solid; }

/* 赠池礼品弹窗（挂 .hg-modal 壳下） */
.hg-giftpanel { width: min(420px, 92vw); }
.hg-giftpanel-hd {
  padding: 16px 20px 12px; font-size: 15px; font-weight: 700; color: var(--hg-ink, #1F2937);
  border-bottom: 1px solid var(--hg-border-light, #F3F4F6);
}
.hg-giftpanel-hd em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--hg-text-mute, #6B7280); margin-left: 8px; }
.hg-giftpanel-body { padding: 10px 20px 4px; overflow-y: auto; max-height: 52vh; }
.hg-gift-list { display: block; }
.hg-giftrow {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--hg-border-light, #F3F4F6);
  font-size: 13px; color: var(--hg-ink, #1F2937); line-height: 1.5;
}
.hg-giftrow:last-child { border-bottom: 0; }
.hg-giftrow .hg-bhcode {
  flex: 0 0 auto; font-style: normal; font-variant-numeric: tabular-nums;
  background: #F3F4F6; color: var(--hg-text-mute, #6B7280);
  border-radius: 4px; padding: 1px 6px; font-size: 12px;
}
.hg-giftrow em { font-style: normal; font-weight: 600; }
.hg-giftpanel-foot {
  padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px;
  border-top: 1px solid var(--hg-border-light, #F3F4F6);
}

@media (max-width: 640px) {
  .hg-pos-banner { overflow: visible; }
  .hg-brow { font-size: 12px; padding: 7px 9px; }
  .hg-brow-hint { cursor: pointer; }
  .hg-giftpanel-body { max-height: 60vh; }
  .hg-giftpanel-foot .hg-filter-btn { flex: 1; }
}

/* ---- 商品明细卡（表格容器化） ---- */
.hg-pos-items {
  background: #fff; border: 1px solid var(--hg-border-light); border-radius: 16px;
  padding: 6px 8px; overflow: hidden;
}
.hg-pos-items .hg-table-scroll { margin: 0; }
.hg-pos-items .hg-sales-grid.hg-sale-grid th { background: var(--hg-bg); color: var(--hg-muted); font-size: 12px; font-weight: 600; padding: 9px 6px; }
.hg-pos-items .hg-sales-grid.hg-sale-grid td { padding: 10px 6px; font-size: 14px; }
.hg-pos-items .hg-sales-grid.hg-sale-grid .hg-col-name { font-weight: 600; color: var(--hg-ink); }
.hg-pos-items .hg-sales-grid.hg-sale-grid .hg-col-amt,
.hg-pos-items .hg-sales-grid.hg-sale-grid .hg-col-num { font-variant-numeric: tabular-nums; }
.hg-pos-items .hg-sales-grid.hg-sale-grid tr.hg-grid-footer td { font-weight: 800; background: var(--hg-bg); font-variant-numeric: tabular-nums; }
.hg-pos-items .hg-link-action { color: var(--hg-danger); font-weight: 600; }

/* 2026-08-31 P3 步进器：POS 在线销售「− 数量 ＋」（数量列 52→96 容纳三元素） */
.hg-pos-items .hg-sales-grid.hg-sale-grid th.hg-col-num,
.hg-pos-items .hg-sales-grid.hg-sale-grid td.hg-col-num { width: 96px !important; min-width: 88px; }
.hg-qty-stepper { display: inline-flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
.hg-qty-stepper .hg-step-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--hg-border);
  background: var(--hg-gray); color: var(--hg-primary); font-size: 14px; font-weight: 700; line-height: 1;
  text-decoration: none; cursor: pointer; user-select: none; box-sizing: border-box;
}
.hg-qty-stepper .hg-step-btn:hover { background: var(--hg-primary); color: var(--hg-surface); border-color: var(--hg-primary); }
.hg-qty-stepper .hg-step-btn:active { transform: scale(.94); }
.hg-qty-stepper .hg-qty-val { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 768px) {
  .hg-pos-items .hg-sales-grid.hg-sale-grid th.hg-col-num,
  .hg-pos-items .hg-sales-grid.hg-sale-grid td.hg-col-num { width: 88px !important; min-width: 82px; }
  .hg-qty-stepper .hg-step-btn { width: 22px; height: 22px; }
  .hg-qty-stepper .hg-qty-val { min-width: 26px; }
}

/* 2026-08-31 P3 取单弹窗：挂起未结算单列表 —— 2026-09-10 D6 按行卡弹窗壳规范重构（窄幅居中、padding+max-height+overflow+border-radius） */
.hg-take-panel { width: 400px; max-width: calc(100vw - 40px); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 16px; padding: 20px; box-sizing: border-box; }
.hg-take-panel > .hg-disc-hd { padding-right: 24px; }
.hg-take-list { max-height: calc(100vh - 220px); overflow-y: auto; padding: 4px 0; margin: 0 -4px; }
.hg-take-empty { padding: 28px 12px; text-align: center; color: var(--hg-muted); font-size: 13px; }
.hg-take-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--hg-border-light); }
.hg-take-row:last-child { border-bottom: 0; }
.hg-take-row .hg-take-open { grid-column: 1; grid-row: 1 / span 2; }
/* 2026-09-10 D6 注意：#pgForm{line-height:0} 会继承下来把 span 文字压成 0 高 → 必须显式 line-height */
.hg-take-bill { grid-column: 2; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--hg-mono, Menlo, Consolas, monospace); font-size: 13px; line-height: 1.5; color: var(--hg-ink); font-weight: 700; }
.hg-take-amt { grid-column: 3; grid-row: 1; font-size: 14px; line-height: 1.5; font-weight: 800; color: #E53935; font-variant-numeric: tabular-nums; text-align: right; }
.hg-take-meta { grid-column: 2 / span 2; grid-row: 2; font-size: 12px; line-height: 1.5; color: var(--hg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-take-open {
  flex: none; border: 1px solid var(--hg-primary); background: var(--hg-primary);
  color: var(--hg-surface); border-radius: 6px; padding: 5px 14px; font-size: 13px;
  cursor: pointer; font-weight: 600;
}
.hg-take-open:hover { background: var(--hg-primary-deep); border-color: var(--hg-primary-deep); }

/* ---- 2026-09-10 查找商品弹窗（Ctrl+F）：编号/助记码/条码查本店在售商品，点「加入」加一行 ---- */
.hg-find-panel { width: 440px; max-width: calc(100vw - 40px); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 16px; padding: 20px; box-sizing: border-box; }
.hg-find-panel > .hg-disc-hd { padding-right: 24px; }
.hg-find-bar { display: flex; gap: 8px; margin: 12px 0 4px; }
.hg-find-bar .hg-input { flex: 1; min-width: 0; }
.hg-find-list { max-height: calc(100vh - 300px); min-height: 120px; overflow-y: auto; padding: 4px 0; margin: 0 -4px; }
.hg-find-empty { padding: 28px 12px; text-align: center; color: var(--hg-muted); font-size: 13px; }
.hg-find-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--hg-border-light); }
.hg-find-row:last-child { border-bottom: 0; }
.hg-find-row .hg-find-add { grid-column: 1; grid-row: 1 / span 2; }
.hg-find-name { grid-column: 2; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.5; color: var(--hg-ink); font-weight: 700; }
.hg-find-amt { grid-column: 3; grid-row: 1; font-size: 14px; line-height: 1.5; font-weight: 800; color: var(--hg-primary); font-variant-numeric: tabular-nums; text-align: right; }
.hg-find-meta { grid-column: 2 / span 2; grid-row: 2; font-size: 12px; line-height: 1.5; color: var(--hg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-find-add {
  padding: 6px 12px; border: 1px solid var(--hg-primary); border-radius: 8px;
  background: var(--hg-primary); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: all .15s var(--hg-ease);
}
.hg-find-add:hover { background: var(--hg-primary-deep); border-color: var(--hg-primary-deep); }

/* ---- 收款区 ---- */
.hg-pos-tender {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
  background: #fff; border: 1px solid var(--hg-border-light); border-radius: 14px; padding: 12px 14px;
}
.hg-pos-tender .hg-tender-cell { display: flex; flex-direction: column; gap: 4px; }
.hg-pos-tender .hg-tender-cell > span { font-size: 12px; color: var(--hg-muted); }
.hg-pos-tender .hg-tender-cell .hg-input { width: 100%; }

/* ---- 操作按钮区（6 按钮水平 grid：查找商品/挂单/取单/整单折扣/整单删除/退货，图标上文字下） ---- */
.hg-pos-actions { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.hg-pos-action {
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 6px; border-radius: 12px; border: 1px solid var(--hg-border-light);
  background: #fff; color: var(--hg-ink); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .15s var(--hg-ease);
}
/* 2026-09-10 六按钮统一：左白 icon + 右两行（上中文 .t / 下快捷键 .k） */
.hg-pos-action .tx { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.hg-pos-action .tx .t { font-size: 12px; }
.hg-pos-action .tx .k { font-size: 10px; font-weight: 600; opacity: .75; }
.hg-pos-action .ic { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; line-height: 1; }
.hg-pos-action .ic svg { width: 100%; height: 100%; display: block; }
.hg-pos-action:hover { border-color: var(--hg-primary); color: var(--hg-primary); background: var(--hg-primary-soft); }
/* 2026-09-10 蓝底白 icon 变体：用于挂单/取单/整单折扣 三类日常操作 */
.hg-pos-action--primary { color: #fff; background: var(--hg-primary); border-color: var(--hg-primary); font-weight: 700; }
.hg-pos-action--primary:hover { background: #0052a3; border-color: #0052a3; color: #fff; }
.hg-pos-action--danger { color: var(--hg-danger); border-color: #fecaca; }
.hg-pos-action--danger .ic { color: var(--hg-danger); }
.hg-pos-action--danger:hover { background: #fef2f2; border-color: var(--hg-danger); color: var(--hg-danger); }
.hg-pos-action--disabled { opacity: .45; cursor: not-allowed; }
.hg-pos-action--disabled:hover { border-color: var(--hg-border-light); color: var(--hg-ink); background: #fff; }

/* ---- 通栏 CTA ---- */
.hg-pos-cta {
  display: flex; align-items: center; gap: 12px; margin-top: 4px;
  background: linear-gradient(135deg, #0066CC, #1d4ed8); border-radius: 16px;
  padding: 14px 18px; box-shadow: 0 6px 18px rgba(0,102,204,.25);
}
.hg-pos-cta .hg-pos-cta-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hg-pos-cta .hg-pos-cta-main .sum { font-size: 26px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .3px; line-height: 1.1; }
.hg-pos-cta .hg-pos-cta-main .sub { font-size: 12px; color: rgba(255,255,255,.85); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 2026-09-08：保留「Ctrl+回车」kdb 内联样式（搬进按钮） */
.hg-pos-cta .hg-pos-cta-main .sub i {
  font-style: normal; border: 1px solid rgba(255,255,255,.55); border-bottom-width: 2px;
  border-radius: 4px; padding: 0 5px; margin: 0 2px; font-weight: 600; color: #fff;
}
.hg-pos-cta .hg-pos-cta-side { display: flex; align-items: center; gap: 10px; }
.hg-pos-cta .hg-check { color: rgba(255,255,255,.9); font-size: 13px; }
.hg-pos-cta .hg-check input { width: 16px; height: 16px; }
.hg-pos-cta .hg-filter-btn-primary { background: #fff !important; color: #0066CC !important; border: none !important; height: 46px; padding: 0 30px; font-size: 16px; font-weight: 800; border-radius: 12px; }
/* 2026-09-08：确认收款按钮内两行 —— 上行「确认收款」+ 下行快捷键「Ctrl+↩」 */
.hg-pos-cta .hg-filter-btn-primary.hg-pos-btn-tender {
  flex-direction: column; height: 54px; padding: 4px 26px; line-height: 1.2; gap: 1px;
}
.hg-pos-cta .hg-filter-btn-primary.hg-pos-btn-tender::after {
  content: "Ctrl+\21A9\FE0E"; font-size: 10.5px; font-weight: 600; letter-spacing: .4px;
  opacity: .72; line-height: 1.15; white-space: nowrap;
}
/* 2026-09-11 「取消」按钮移除：cta 内已无 outline 按钮，原 .hg-pos-cta .hg-filter-btn-outline
   两条规则（透明底白边）随之删除，避免死规则堆积。若日后 cta 内再加描边按钮，从 git 历史取回即可。 */

/* ---- 移动端（≤768px）：单栏堆叠 + 紧凑 ---- */
@media (max-width: 768px) {
  .hg-pos-layout { grid-template-columns: 1fr; margin-top: 10px; }
  .hg-pos-topbar { gap: 8px 14px; padding: 8px 10px; }
  .hg-pos-cta { flex-wrap: wrap; padding: 12px 14px; }
  /* 2026-09-11 cta-side 仅剩「确认收款」：原 space-between 会把单按钮推向左，改为撑满整行（触摸屏更易点） */
  .hg-pos-cta .hg-pos-cta-side { width: 100%; }
  .hg-pos-cta .hg-pos-cta-side .hg-pos-btn-tender { flex: 1; }
  .hg-pos-actions { grid-template-columns: repeat(6, 1fr); gap: 5px; }
  .hg-pos-action { padding: 10px 2px; font-size: 11px; }
  .hg-pos-scan .hg-input { min-width: 120px; height: 38px; }
  .hg-pos-kpi { grid-template-columns: 1fr 1fr; }
}

/* 2026-08-31 视觉提示：只读控件灰色（店铺/营业员默认不可改） */
.hg-pos-ro { color: var(--hg-muted) !important; background: var(--hg-bg) !important; opacity: .85; cursor: not-allowed; pointer-events: none; }
.hg-pos-ro option { color: var(--hg-ink); }
/* 2026-08-31 警示色：销售类型=退货时整行红粗 */
.hg-pos-danger { color: var(--hg-danger) !important; font-weight: 800 !important; }
/* 2026-09-09 全局自定义下拉（hg-cselect）trigger 危险态：data-hg-danger-val 与 sel.value 命中时由 default.aspx
   全局增强器自动加 .hg-cselect-trigger--danger，红底白字强警示——POS 销售类型=退货 等强警示场景。
   优先级：!important 覆盖 .hg-cselect-trigger / .hg-pos-ro 的默认灰字底色。 */
.hg-cselect-trigger.hg-cselect-trigger--danger {
  background: #E53935 !important; color: #fff !important; border-color: #C62828 !important;
  font-weight: 800; opacity: 1 !important;
}
.hg-cselect-trigger.hg-cselect-trigger--danger .hg-cselect-text { color: #fff !important; }
.hg-cselect-trigger.hg-cselect-trigger--danger .hg-cselect-arrow svg { stroke: #fff !important; }
/* 2026-08-31 退货按钮：未禁用时醒目（功能 P3 接） */
.hg-pos-action.hg-pos-action--danger:not(.hg-pos-action--disabled) {
  color: #fff; background: var(--hg-danger); border-color: var(--hg-danger); font-weight: 800;
}
.hg-pos-action.hg-pos-action--danger:not(.hg-pos-action--disabled) .ic { color: #fff; }
.hg-pos-action.hg-pos-action--danger:not(.hg-pos-action--disabled):hover {
  background: #b91c1c; border-color: #b91c1c; color: #fff;
}

/* ===== 2026-08-31 POS 商品行选中 + 折扣/优惠快速选择弹窗 ===== */
.hg-sales-grid tr.hg-selected-row,
.hg-sale-grid tr.hg-selected-row {
  background: #E8F2FF !important;
}
.hg-sales-grid tr.hg-selected-row > td,
.hg-sale-grid tr.hg-selected-row > td {
  color: var(--hg-primary-dark) !important;
  box-shadow: inset 3px 0 0 var(--hg-primary);
  font-weight: 600;
}
/* 2026-09-11 四边留白：此前只有宽度无 padding，内容（档位按钮/自定义行）贴到卡片边缘，
   与取单弹窗（.hg-take-panel padding:20px）风格不一致。补 padding 20px + border-box；
   宽度同步 380→420px 以保持内容区仍为 380px（纯加留白，内容布局零回归）。 */
.hg-disc-panel { width: 420px; max-width: 92vw; padding: 20px; box-sizing: border-box; }
/* 2026-09-10 补 line-height：#pgForm{line-height:0} 继承会把标题行压成 1px，文字穿出面板顶部被 overflow 裁掉（券弹窗实证） */
.hg-disc-hd { font-size: 15px; line-height: 1.4; font-weight: 700; color: var(--hg-ink); margin-bottom: 12px; }
.hg-disc-hd em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--hg-muted); margin-left: 8px; }
.hg-disc-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.hg-disc-btn {
  padding: 9px 0; border: 1px solid var(--hg-border); border-radius: 8px;
  background: var(--hg-bg); color: var(--hg-primary); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.hg-disc-btn:hover { background: var(--hg-primary); color: #fff; border-color: var(--hg-primary); }
.hg-disc-custom { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hg-border-light); }
.hg-disc-custom .hg-input { flex: 1; min-width: 0; }

/* ===== 2026-09-02 促销单已审批/已过期只读锁定（5 个 CX Dlg 服务端加 .hg-cx-locked 类） ===== */
/* 所有输入控件灰底不可改：disabled TextBox/select/textarea + 行内 hg-input-cx + 日期/时段 flatpickr 显示框
   颜色一律用字面值（不用 var()）：var(--hg-*) 在某些环境下（如 @import 外链字体阻塞）可能未解析，
   导致 var() 失效回 UA 默认色，整段锁定样式崩。字面值版本在所有环境一致生效。 */
#pgForm .hg-cx-locked input[type="text"],
#pgForm .hg-cx-locked input[type="number"],
#pgForm .hg-cx-locked select,
#pgForm .hg-cx-locked textarea {
  background: #F3F4F6 !important;
  color: #6B7280 !important;
}
/* 2026-09-02 修复：disabled input 在 WebKit/Blink 下默认把 placeholder 透明度压到 ~0.5，
   再叠加 muted 灰色后在浅灰底上几乎不可见（用户反馈「锁定的日期文字消失了」）。
   只用标准 ::placeholder（带 ::-webkit-input-placeholder 等私有伪元素会让整条规则被丢弃） */
#pgForm .hg-cx-locked input[type="text"]:disabled::placeholder,
#pgForm .hg-cx-locked input[type="number"]:disabled::placeholder {
  color: #111827 !important;
  opacity: 1 !important;
}
#pgForm .hg-cx-locked .hg-input-cx {
  background: #F3F4F6 !important;
  color: #6B7280 !important;
  /* 2026-09-02 补 -webkit-text-fill-color 双写：基类 hg-input-cx 已设 fill #0052A3（白底蓝字新方案），
     锁定规则原只写 color → Chromium 文字按 fill 渲染残留蓝色，锁定态看起来可编辑。
     与 L6164 日期框锁定双写保持一致（记忆铁律：disabled 双写 color+text-fill） */
  -webkit-text-fill-color: #6B7280 !important;
}
#pgForm .hg-cx-locked .hg-cselect-trigger,
#pgForm .hg-cx-locked .hg-cselect-trigger--disabled {
  background: #F3F4F6 !important;
  color: #6B7280 !important;
  cursor: not-allowed;
}
/* 2026-09-02 已审批/已过期单打开后实际日期数字"看不见"修复：
   锁定 input[type="text"] 上方规则把 color 套 #6B7280（中灰），在 #F3F4F6 灰底上对比度仅 1.2:1、
   远低于 AA 4.5:1，flatpickr 写入的"2026-08-03 至 2026-08-31"几乎隐形。
   日期/时段三个 flatpickr 显示框显式上深色 #111827（对比度 14:1）：
     color + -webkit-text-fill-color 双写确保即使用户代理 disabled text 抢占，
     在 Chromium / Safari 都能强制覆盖显示深色文字。 */
#pgForm .hg-cx-locked input.hg-date-range,
#pgForm .hg-cx-locked input.hg-time-begin,
#pgForm .hg-cx-locked input.hg-time-end {
  background: #F3F4F6 !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  cursor: not-allowed;
}
#pgForm .hg-cx-locked input[type="checkbox"],
#pgForm .hg-cx-locked input[type="radio"] { opacity: .45; }
#pgForm .hg-cx-locked label,
#pgForm .hg-cx-locked .hg-filter-label { color: var(--hg-muted); }


/* ===== 店铺目标模块（2026-09-04 wcShopGoalSet）===== */
#pgForm .hg-page-title-sub { font-size: 12px; font-weight: 400; color: #8A94A6; margin-left: 8px; }
#pgForm .hg-goal-kpi { margin: 14px 0 0 0; max-width: 780px; }
#pgForm .hg-goal-kpi .hg-kpi { padding: 10px 6px; }
#pgForm .hg-goal-kpi .hg-kpi-value { margin-top: 6px; }
#pgForm .hg-goal-input { width: 96px !important; text-align: center; font-weight: 700; font-size: 15px; padding: 4px 2px !important; }
#pgForm .hg-goal-reason { margin: 10px 2px 4px; background: #F7F9FB; border: 1px solid #E6E8EB; border-radius: 8px; padding: 10px 14px; }
#pgForm .hg-goal-reason-title { font-size: 12px; color: #8A94A6; margin-bottom: 6px; }
#pgForm .hg-goal-reason-pre { margin: 0; font-family: var(--hg-font); font-size: 12px; line-height: 1.7; color: #48505E; white-space: pre-wrap; overflow-wrap: anywhere; }
#pgForm .hg-goal-msg { margin-top: 8px; font-size: 13px; }
#pgForm .hg-goal-sub { font-size: 11px; color: #8A94A6; }

/* 店铺目标页顶部说明（v20260904b 自动生成/时点引导） */
#pgForm .hg-page-note { margin: 4px 2px 0; padding: 8px 12px; background: #EEF4FC; border-left: 3px solid #0066CC; border-radius: 4px; font-size: 12px; line-height: 1.6; color: #33475E; }

/* 节假日维护页（v20260905a）：类型列着色——节假日绿、调休补班橙（补班易被忽略，加粗提示） */
#pgForm .hg-hol-rest { color: var(--hg-primary-deep); }        /* 连休＝品牌蓝，与目标总览日历 rest 同系 */
#pgForm .hg-hol-work { color: var(--hg-accent-deep); font-weight: 600; }  /* 补班＝警示橙，与目标总览 work 同色 */


/* ==========================================================================
   首页「本月目标总览」图形卡片
   新增 2026-09-05 ｜ 配色对齐《HGBOX VI 设计手册》2026-09-05
   消费方：dlgforms/wcHomeGoalOverview.ascx（总部 PStyle=11 看全店 / 分店 PStyle=10 看本店）
   数据源：forms/hgHomeGoalOverview.aspx（GoalClass.OpenHomeOverview）

   【配色契约 — 一律取自 hgbox-theme.css 变量，禁止自造色号、禁止渐变】
     ★ 极简双色：整块只用「品牌蓝 + 报警红」两个彩，其余全部中性灰阶，
       与首页其它模块（经营看板 KPI、销售 grid）保持同一套观感。
     品牌蓝（正向 / 基准 / 进行中）
        … var(--hg-primary) #0066CC（深 #0052A3、最 #003D7A、浅 --hg-primary-light #4D8FE0、
          软底 --hg-primary-soft #EBF3FC、浅边 --hg-primary-pale #D6E7F9）
     报警红（仅「显著落后」这一个信号使用）
        … #DC2626（手册「失败红」，与首页 KPI 跌同色，软底 #FEF2F2、浅边 #FECACA）
     中性灰阶（承担其余 90% 的视觉）
        … --hg-ink #111827 / --hg-muted #6B7280 / --hg-faint #9CA3AF
           / --hg-gray #F3F4F6 / --hg-border #E5E7EB / --hg-divider #D1D5DB / --hg-surface #FFFFFF
     ○ 微量点缀（面积 ≤ 2px 细线或 1~3 个格子，不构成色块噪音）
        … 挑战档刻度、补班标记 --hg-accent-deep #D97706
   手册硬性两条：① 纯色实线，禁止 linear-gradient；② 靠底色深浅分层次，不靠杂色堆砌。
   语义分工：蓝＝品牌基准与达成，红＝落后，灰＝中性；达标不再单独给绿，避免与首页其它部分脱节。
   ========================================================================== */
.hg-goalov { margin-top: 16px; }
.hg-goalov-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hg-goalov-head .hg-goalov-title { font-size: 16px; font-weight: 700; color: var(--hg-ink); }
.hg-goalov-head .hg-goalov-ym { font-size: 12px; color: var(--hg-muted); }
.hg-goalov-head .hg-goalov-count { font-size: 12px; color: var(--hg-muted); margin-left: auto; }

/* 卡片网格：桌面自适应多列，窄屏单列 */
.hg-goalov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 14px; }

/* Tab 模式下一次只有一张卡：改为单列并限宽，否则右半边留白、卡片也太窄 */
.hg-goalov-grid.single { grid-template-columns: minmax(0, 1fr); max-width: 880px; }

/* 店铺 Tab 切换：多店时一次只渲染一张卡，避免 15 店平铺过长 */
.hg-goalov-tabs {
  display: flex; gap: 6px; margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--hg-border); overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.hg-goalov-tabs::-webkit-scrollbar { height: 4px; }
.hg-goalov-tabs::-webkit-scrollbar-thumb { background: var(--hg-divider); border-radius: 2px; }
.hg-goalov-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--hg-border); border-radius: var(--hg-radius-xs);
  background: var(--hg-surface); color: var(--hg-muted); font-size: 13px; line-height: 1.5;
  cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.hg-goalov-tab:hover { background: var(--hg-primary-soft); color: var(--hg-ink); border-color: var(--hg-primary-light); }
.hg-goalov-tab.on {
  background: var(--hg-primary); border-color: var(--hg-primary); color: #FFFFFF; font-weight: 600;
}
.hg-goalov-tab.on .hg-goalov-tab-rate { color: #FFFFFF; opacity: .92; }
.hg-goalov-tab.total { border-style: dashed; }
.hg-goalov-tab.total.on { border-style: solid; }
/* 状态点只在「显著落后」时出现：平时 Tab 条保持干净，靠达成率数字本身读数 */
.hg-goalov-tab-dot { display: none; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #DC2626; }
.hg-goalov-tab-dot.bad { display: inline-block; }
.hg-goalov-tab.on .hg-goalov-tab-dot { box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.hg-goalov-tab-name { flex: 0 0 auto; }
.hg-goalov-tab-rate {
  flex: 0 0 auto; font-size: 11px; color: var(--hg-muted);
  font-variant-numeric: tabular-nums; line-height: 1.5;
}
.hg-goalov-tab-rate.bad { color: #DC2626; }

/* 单店卡片 */
.hg-goalov-card {
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius-sm);
  background: var(--hg-surface);
  padding: 14px 16px 16px;
  min-width: 0;
}

/* 店名行 */
.hg-goalov-shop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hg-goalov-shop-name { font-size: 15px; font-weight: 700; color: var(--hg-ink); }
.hg-goalov-badge {
  font-size: 11px; font-weight: 600; line-height: 1.6;
  padding: 1px 8px; border-radius: var(--hg-radius-full); white-space: nowrap;
}
/* 常态（达成 / 推进中）不给彩底：浅灰底灰字，与首页 KPI 的中性读数一致 */
.hg-goalov-badge.good,
.hg-goalov-badge.normal { background: var(--hg-gray); color: var(--hg-muted); }
.hg-goalov-badge.bad    { background: #FEF2F2; color: #DC2626; }   /* 仅显著落后才上红 */
.hg-goalov-shop-rate { margin-left: auto; font-size: 12px; color: var(--hg-muted); white-space: nowrap; }

/* 三档 */
.hg-goalov-tiers { display: flex; gap: 8px; margin-bottom: 12px; }
.hg-goalov-tier {
  flex: 1 1 0; min-width: 0; text-align: center;
  padding: 7px 4px; border-radius: var(--hg-radius-xs);
  background: var(--hg-gray); border: 1px solid transparent;
}
.hg-goalov-tier.main { background: var(--hg-primary-soft); border-color: var(--hg-primary-pale); }
.hg-goalov-tier-label { font-size: 11px; color: var(--hg-muted); line-height: 1.4; }
.hg-goalov-tier-val { font-size: 15px; font-weight: 700; color: var(--hg-ink); line-height: 1.4; font-variant-numeric: tabular-nums; }
.hg-goalov-tier.main .hg-goalov-tier-val { color: var(--hg-primary); }
.hg-goalov-tier-sub { font-size: 11px; color: var(--hg-faint); line-height: 1.4; }

/* 进度条：实际 vs 三档刻度 + 时间进度标记（手册：纯色，禁止渐变） */
.hg-goalov-bar-wrap { margin-bottom: 12px; }
.hg-goalov-bar {
  position: relative; height: 22px; border-radius: var(--hg-radius-xs);
  background: var(--hg-gray); overflow: hidden;
}
.hg-goalov-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--hg-primary);
  border-radius: var(--hg-radius-xs) 0 0 var(--hg-radius-xs);
  min-width: 2px;
}
.hg-goalov-bar-fill.good { background: var(--hg-primary); }   /* 达成不额外加彩，同品牌蓝 */
.hg-goalov-bar-fill.bad  { background: #DC2626; }
.hg-goalov-bar-tick { position: absolute; top: 0; bottom: 0; width: 2px; }
.hg-goalov-bar-tick.safe { background: var(--hg-faint); }
.hg-goalov-bar-tick.goal { background: var(--hg-primary-dark); }
.hg-goalov-bar-tick.big  { background: var(--hg-accent-deep); }
.hg-goalov-bar-time { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed var(--hg-muted); }
.hg-goalov-bar-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; margin-bottom: 0; font-size: 11px; color: var(--hg-muted); line-height: 1.6; min-height: 22px; }
.hg-goalov-bar-legend > span { display: inline-flex; align-items: center; line-height: 1.6; }
.hg-goalov-bar-legend i { display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin-right: 4px; }
.hg-goalov-bar-legend .lg-safe { background: var(--hg-faint); }
.hg-goalov-bar-legend .lg-goal { background: var(--hg-primary-dark); }
.hg-goalov-bar-legend .lg-big  { background: var(--hg-accent-deep); }
.hg-goalov-bar-legend .lg-time { background: var(--hg-muted); }
/* 「按日系数分解 / 按月均摊」来源标识：右推，与图例同色但不抢眼 */
.hg-goalov-bar-legend-src { margin-left: auto; padding-left: 8px; border-left: 1px solid var(--hg-border); color: var(--hg-faint); }
.hg-goalov-bar-meta { margin-top: 14px; padding-bottom: 6px; font-size: 12px; color: var(--hg-muted); line-height: 1.7; min-height: 20px; }
.hg-goalov-bar-meta b { color: var(--hg-ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.hg-goalov-bar-meta .need { color: var(--hg-primary-deep); }   /* 剩余需日均：强调但不新开一个色 */

/* 历史对比：去年同期 / 上月 / 本月目标 */
.hg-goalov-hist { margin: 14px 0 12px; padding-top: 10px; border-top: 1px dashed var(--hg-border); }
.hg-goalov-hist-title { font-size: 11px; color: var(--hg-faint); margin-bottom: 6px; }
.hg-goalov-hist-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 12px; line-height: 1.5; min-height: 22px; }
.hg-goalov-hist-label { flex: 0 0 82px; color: var(--hg-muted); white-space: nowrap; }
.hg-goalov-hist-track { flex: 1 1 auto; height: 10px; background: var(--hg-gray); border-radius: var(--hg-radius-full); overflow: hidden; min-width: 30px; }
.hg-goalov-hist-fill { height: 100%; background: var(--hg-divider); border-radius: var(--hg-radius-full); }
.hg-goalov-hist-fill.goal { background: var(--hg-primary); }
.hg-goalov-hist-val { flex: 0 0 auto; min-width: 96px; text-align: right; color: var(--hg-ink); font-variant-numeric: tabular-nums; }
.hg-goalov-hist-yoy { flex: 0 0 auto; min-width: 40px; font-size: 11px; color: var(--hg-muted); text-align: right; }
/* 同比只表达走势、不表达好坏 → 统一中性灰，不用绿红（避免误读为 KPI 涨跌） */
.hg-goalov-hist-yoy.up   { color: var(--hg-muted); }
.hg-goalov-hist-yoy.down { color: var(--hg-muted); }
.hg-goalov-hist-yoy.flat { color: var(--hg-faint); }

/* 设计原因 */
.hg-goalov-reason { background: var(--hg-canvas); border: 1px solid var(--hg-border); border-radius: var(--hg-radius-xs); padding: 9px 12px; margin-bottom: 12px; }
.hg-goalov-reason-title { font-size: 11px; color: var(--hg-muted); margin-bottom: 5px; }
.hg-goalov-reason-pre {
  margin: 0; font-family: var(--hg-font); font-size: 12px; line-height: 1.7;
  color: var(--hg-secondary-light); white-space: pre-wrap; overflow-wrap: anywhere;
}

/* 当月日历节奏：7 列网格 */
.hg-goalov-cal-title { font-size: 12px; color: var(--hg-muted); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; line-height: 1.6; min-height: 20px; }
.hg-goalov-cal-title span { display: inline-flex; align-items: center; gap: 4px; line-height: 1.6; }
.hg-goalov-cal-title .lg-good { color: var(--hg-primary-deep); }
.hg-goalov-cal-title .lg-warn { color: var(--hg-muted); }
.hg-goalov-cal-title .lg-bad  { color: #DC2626; }
.hg-goalov-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hg-goalov-day {
  position: relative; min-width: 0; padding: 4px 2px 3px;
  border: 1px solid var(--hg-border-light); border-radius: var(--hg-radius-xs);
  background: var(--hg-gray); text-align: center; line-height: 1.25;
}
.hg-goalov-day-n { font-size: 11px; font-weight: 600; color: var(--hg-muted); font-variant-numeric: tabular-nums; }
.hg-goalov-day-v { font-size: 10px; color: var(--hg-faint); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 已过的天：只用「蓝（达标）/ 灰（略欠）/ 红（显著落后）」三档，去掉黄绿 */
.hg-goalov-day.good   { background: var(--hg-primary-soft); border-color: var(--hg-primary-pale); }
.hg-goalov-day.good   .hg-goalov-day-n { color: var(--hg-primary-deep); }
.hg-goalov-day.warn   { background: var(--hg-gray); border-color: var(--hg-border); }
.hg-goalov-day.warn   .hg-goalov-day-n { color: var(--hg-muted); }
.hg-goalov-day.bad    { background: #FEF2F2; border-color: #FECACA; }
.hg-goalov-day.bad    .hg-goalov-day-n { color: #DC2626; }
/* 未来：中性淡化 */
.hg-goalov-day.future { background: var(--hg-surface); border: 1px dashed var(--hg-border); }
.hg-goalov-day.future .hg-goalov-day-n { color: var(--hg-faint); }
/* 节假日叠加：连休改用品牌浅蓝（同色系不跳），补班保留橙（面积仅 1~3 格，属必要提醒） */
.hg-goalov-day.rest { box-shadow: inset 0 0 0 2px var(--hg-primary-light); }
.hg-goalov-day.work { box-shadow: inset 0 0 0 2px var(--hg-accent-deep); }
/* 今天：品牌蓝框 */
.hg-goalov-day.today { border: 2px solid var(--hg-primary); }
.hg-goalov-day.today .hg-goalov-day-n { color: var(--hg-primary); font-weight: 700; }
.hg-goalov-cal-note { margin-top: 6px; font-size: 11px; color: var(--hg-faint); }

/* 加载中 / 空态 / 错误 */
.hg-goalov-msg { font-size: 13px; color: var(--hg-muted); padding: 8px 2px; }
.hg-goalov-msg.err { color: #DC2626; }

/* 窄屏：单列，日历格子收紧 */
@media (max-width: 900px) {
  .hg-goalov-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hg-goalov-tiers { gap: 5px; }
  .hg-goalov-tier { padding: 6px 2px; }
  .hg-goalov-hist-label { flex: 0 0 68px; font-size: 11px; }
  .hg-goalov-hist-val { min-width: 80px; font-size: 11px; }
  .hg-goalov-cal { gap: 3px; }
  .hg-goalov-day { padding: 3px 1px 2px; }
  .hg-goalov-day-v { display: none; }
}
/* ===== 2026-09-08 两步式收款：结算面板 =====
   2026-09-08：原 .hg-pos-tenderbar 独立提示条删除，副文案已并入 .hg-pos-cta-main .sub，通栏一行展示。
   此处只留结算面板样式。 ===== */
/* ---- 结算面板 ---- */
.hg-tender-panel { width: min(760px, calc(100vw - 20px)); max-height: 92vh; padding: 18px 20px; }
.hg-tender-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 2px 44px 14px 4px; line-height: 1.45; }
.hg-tender-hd .t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hg-tender-hd .t span { font-size: 18px; font-weight: 800; color: var(--hg-ink); }
.hg-tender-hd .t em { font-style: normal; font-size: 12px; color: var(--hg-muted); }
.hg-tender-hd .due { text-align: left; padding-right: 6px; }
.hg-tender-hd .due b { font-size: 30px; font-weight: 800; color: var(--hg-primary); font-variant-numeric: tabular-nums; letter-spacing: .3px; line-height: 1.1; display: block; }
.hg-tender-hd .due span { font-size: 12px; color: var(--hg-muted); }

.hg-tender-ways { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 4px 0 14px; }
.hg-tender-ways .w {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 12px 4px; border-radius: 12px; border: 1px solid rgba(0,102,204,.30);
  background: #fff; color: var(--hg-primary); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s var(--hg-ease); line-height: 1.2;
}
/* 2026-09-12 支付方式改单色 SVG 图标：颜色跟随文字（currentColor）
   未选中 = 白底蓝字蓝图标；选中(.on) = 蓝底白字白图标 */
.hg-tender-ways .w .ic { display: block; line-height: 0; font-style: normal; }
.hg-tender-ways .w .ic svg { width: 22px; height: 22px; display: block; fill: currentColor; }
.hg-tender-ways .w:hover { border-color: var(--hg-primary); }
.hg-tender-ways .w.on {
  background: var(--hg-primary); border-color: var(--hg-primary); color: #fff;
  box-shadow: 0 4px 12px rgba(0,102,204,.22);
}

.hg-tender-rows { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 10px; min-height: 66px; }
.hg-tender-rows .row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--hg-gray); border: 1px solid var(--hg-border-light); border-radius: 12px; padding: 10px 12px;
  line-height: 1.45;
}
.hg-tender-rows .row .nm { flex: none; min-width: 74px; font-weight: 700; color: var(--hg-ink); font-size: 14px; }
.hg-tender-rows .row .amt.hg-input, .hg-tender-rows .row input.amt {
  width: 190px; height: 40px; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right;
  /* 2026-09-12 收款行输入框/按钮统一走全局圆角变量（此前为浏览器原生直角） */
  border-radius: var(--hg-radius);
}
.hg-tender-rows .row .exact {
  flex: none; border-radius: var(--hg-radius);
  padding: 9px 16px; border: 1px solid rgba(0,102,204,.35); background: #fff;
  color: var(--hg-primary); font-family: var(--hg-font); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s var(--hg-ease); line-height: 1.2;
}
.hg-tender-rows .row .exact:hover { border-color: var(--hg-primary); background: var(--hg-primary-soft, #EAF3FF); }
.hg-tender-rows .row .tip { flex: 1 1 auto; min-width: 0; font-style: normal; font-size: 12px; color: var(--hg-muted); padding-left: 2px; line-height: 1.4; }
.hg-tender-rows .row .tip-warn { color: var(--hg-danger); font-weight: 600; }
.hg-tender-rows .row-czk { flex-direction: column; align-items: stretch; gap: 8px; }
.hg-tender-rows .czk-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hg-tender-rows .czk-field label { flex: none; min-width: 74px; font-size: 12px; color: var(--hg-muted); }
.hg-tender-rows .czk-field input.amt.hg-input, .hg-tender-rows .czk-field input.amt { width: 190px; height: 36px; font-size: 15px; }
.hg-tender-rows .czk-field .czk-name { border: 0; background: transparent; color: var(--hg-muted); font-size: 13px; width: auto; flex: none; }
.hg-tender-rows .czk-bal { font-size: 12px; color: var(--hg-success, #188038); padding: 0 2px; }
.hg-tender-rows .czk-field .hg-btn-sm { height: 32px; padding: 0 12px; }

.hg-tender-sum {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border-top: 1px dashed var(--hg-border); padding: 12px 4px 4px;
  font-size: 13px; color: var(--hg-muted); line-height: 1.45;
}
.hg-tender-sum b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--hg-ink); margin-left: 4px; }
.hg-tender-sum .gap b { color: var(--hg-danger); }
.hg-tender-sum .chg { margin-left: auto; }
.hg-tender-sum .chg b { color: var(--hg-primary); font-size: 24px; }
.hg-tender-sum .chg b.over { color: var(--hg-danger); }

.hg-tender-ft { display: flex; align-items: center; gap: 10px; padding: 14px 0 2px; line-height: 1.45; }
.hg-tender-ft .flex1 { flex: 1; }
.hg-tender-ft .hg-tender-ok { min-width: 150px; height: 46px; font-size: 16px; font-weight: 800; border-radius: 12px; }

/* ===== 2026-09-09 顾客自选赠品：待选横幅 + 选赠卡（结算面板内） ===== */
.hg-tender-panel { position: relative; }
.hg-tender-giftbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 2px 0 12px; padding: 9px 12px; border-radius: 10px; line-height: 1.5;
  background: #fff7e8; border: 1px solid #ffd591; color: #874d00;
}
.hg-tender-giftbar .t { flex: 1 1 auto; font-size: 13px; min-width: 0; }
.hg-tender-giftbar .t b { color: #c4560a; font-size: 15px; }
.hg-tender-giftbar .pick {
  flex: none; height: 34px; padding: 0 16px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--hg-primary, #0066CC); color: #fff; font-weight: 700; font-size: 13px;
}
.hg-tender-giftbar .pick:hover { filter: brightness(1.06); }
.hg-tender-giftcard-wrap {
  position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .45); border-radius: inherit;
}
.hg-tender-giftcard {
  width: min(560px, calc(100% - 24px)); max-height: 80vh; overflow: hidden;
  background: #fff; border-radius: 14px; display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
  /* 2026-09-11 修复：本卡挂在 #pgForm(line-height:0) 下且自身未声明行高，内部 <span>/<b>
     行盒高度坍塌（实测 .act .ah .nm 高度=0px）→ .badge 背景只剩上下各 2px padding
     (4px 高)，文字溢出背景外，表现为「蓝色背景比字小、文字糊成一团」。
     兄弟块 .hd/.rows/.sum/.ft 均已各自声明 1.45，此处补 1.5 一并兜住 .hd/.scan/.acts/.ft。 */
  line-height: 1.5;
}
.hg-tender-giftcard .hd { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--hg-border-light, #eee); }
.hg-tender-giftcard .hd b { font-size: 16px; color: var(--hg-ink, #111); }
.hg-tender-giftcard .hd em { font-style: normal; flex: 1; font-size: 12px; color: var(--hg-muted, #888); }
.hg-tender-giftcard .hd .x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: #999; padding: 0 4px; }
.hg-tender-giftcard .scan { display: flex; align-items: center; gap: 8px; padding: 10px 16px 2px; flex-wrap: wrap; }
.hg-tender-giftcard .scan input {
  flex: 1 1 220px; height: 34px; border: 1px solid #ccc; border-radius: 8px; padding: 0 10px; font-size: 14px;
}
.hg-tender-giftcard .scan em { flex: 1 1 200px; font-style: normal; font-size: 12px; color: var(--hg-muted, #888); }
.hg-tender-giftcard .acts { overflow-y: auto; padding: 8px 16px 4px; }
.hg-tender-giftcard .act { margin-bottom: 12px; }
.hg-tender-giftcard .act .ah { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0 6px; }
/* 2026-09-11 活动类型标签（满额送/赠品促销）：显式 display+line-height，防继承链被改后再次坍塌 */
.hg-tender-giftcard .act .ah .badge { flex: none; display: inline-block; font-size: 12px; line-height: 1.5; padding: 2px 10px; border-radius: 999px; background: var(--hg-primary, #0066CC); color: #fff; font-weight: 600; white-space: nowrap; }
.hg-tender-giftcard .act .ah .nm { font-size: 14px; color: var(--hg-ink, #111); }
.hg-tender-giftcard .act .ah .rem { margin-left: auto; font-style: normal; font-size: 12px; color: var(--hg-muted, #888); }
.hg-tender-giftcard .act .ah .rem b { color: var(--hg-primary, #0066CC); font-size: 14px; }
.hg-tender-giftcard .rows { border: 1px solid var(--hg-border-light, #eee); border-radius: 10px; overflow: hidden; }
.hg-tender-giftcard .rows .row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid #f1f1f1; line-height: 1.4; }
.hg-tender-giftcard .rows .row:last-child { border-bottom: 0; }
.hg-tender-giftcard .rows .row.on { background: #f0f7ff; }
.hg-tender-giftcard .rows .row .nm { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--hg-ink, #111); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-tender-giftcard .rows .row .pr { flex: none; font-size: 12px; color: var(--hg-muted, #888); }
.hg-tender-giftcard .rows .row .qty { display: flex; align-items: center; gap: 6px; flex: none; }
.hg-tender-giftcard .rows .row .qty button {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid #ccc; background: #fff; cursor: pointer;
  font-size: 15px; line-height: 1; color: #333;
}
.hg-tender-giftcard .rows .row .qty button:hover { border-color: var(--hg-primary, #0066CC); color: var(--hg-primary, #0066CC); }
.hg-tender-giftcard .rows .row .qty b { min-width: 22px; text-align: center; font-size: 14px; color: var(--hg-ink, #111); font-variant-numeric: tabular-nums; }
.hg-tender-giftcard .ft { display: flex; align-items: center; gap: 10px; padding: 12px 16px 14px; border-top: 1px solid var(--hg-border-light, #eee); }
.hg-tender-giftcard .ft .flex1 { flex: 1; }
.hg-tender-giftcard .empty { padding: 26px 0; text-align: center; color: var(--hg-muted, #888); font-size: 13px; }
/* 2026-09-09 触发商品图（活动头部）：36×36 圆角缩略图；缺图回落灰底「?」占位 */
.hg-tender-giftcard .act .ah .trigger-pic { flex: none; width: 36px; height: 36px; border-radius: 6px; object-fit: cover; border: 1px solid var(--hg-border-light, #eee); background: var(--hg-gray, #f5f6f7); display: inline-block; }
.hg-tender-giftcard .act .ah .trigger-pic.no::after { content: "?"; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--hg-muted, #aaa); font-size: 18px; font-weight: 700; }
/* 2026-09-09 赠品候选图（每行左侧）：30×30 圆角缩略图；缺图回落灰底「?」占位 */
.hg-tender-giftcard .rows .row .gift-pic { flex: none; width: 30px; height: 30px; border-radius: 4px; object-fit: cover; border: 1px solid var(--hg-border-light, #eee); background: var(--hg-gray, #f5f6f7); display: inline-block; }
.hg-tender-giftcard .rows .row .gift-pic.no::after { content: "?"; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--hg-muted, #aaa); font-size: 14px; font-weight: 700; }
@media (max-width: 768px) {
  .hg-tender-giftcard-wrap { align-items: stretch; }
  .hg-tender-giftcard { width: 100%; max-height: 100%; border-radius: 0; height: 100%; }
  .hg-tender-giftbar .pick { padding: 0 12px; }
}

@media (max-width: 768px) {
  .hg-modal { padding: 0; }
  .hg-tender-panel { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; border: 0; }
  .hg-tender-hd .due b { font-size: 26px; }
  .hg-tender-ways { gap: 6px; }
  .hg-tender-ways .w { padding: 10px 2px; font-size: 12px; }
  .hg-tender-ways .w .ic svg { width: 19px; height: 19px; }
  .hg-tender-rows .row .amt.hg-input, .hg-tender-rows .row input.amt { flex: 1; min-width: 120px; width: auto; }
  .hg-tender-rows .czk-field input.amt.hg-input, .hg-tender-rows .czk-field input.amt { flex: 1; min-width: 130px; width: auto; }
  .hg-tender-sum b { font-size: 18px; }
  .hg-tender-ft { flex-wrap: wrap; }
  .hg-tender-ft .flex1 { display: none; }
  .hg-tender-ft .hg-tender-ok { flex: 1; min-width: 0; }
}

/* ===== 2026-09-08 满额促销动作 4 选 1（wcCXMEDlg） ===== */
.hg-inline-radios { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; line-height: 1.45; }
.hg-inline-radios label { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--hg-ink); cursor: pointer; }
.hg-inline-radios input[type=radio] { accent-color: var(--hg-primary); width: 15px; height: 15px; }
.hg-cx-subbg { background: var(--hg-gray, #f5f6f7); border: 1px solid var(--hg-border-light); border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.45; }
.hg-tip-inline { font-style: normal; font-size: 12px; color: var(--hg-muted); line-height: 1.45; }

/* ============================================================
   2026-09-10 商品行全功能卡（POS 触摸优化）：
   点购物车商品行 → 弹该行操作卡（数量/折扣/优惠/删除/自定义数字键盘）
   ============================================================ */
.hg-rowcard { width: 400px; max-width: calc(100vw - 40px); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 16px; box-sizing: border-box; margin: 0; padding: 20px; }
/* 2026-09-10 行卡弹窗：modal padding 20（外壳距视口）+ panel padding 20（内部内容距弹窗边框），合计上下各 40。
   桌面 panel 由内容自适应高度（不拉伸），超过 100vh-40 才出滚动条。 */
#posRowCardModal { padding: 20px; align-items: center; justify-content: center; }
#posRowCardPanel { align-self: auto; max-height: calc(100vh - 40px); }
/* 2026-09-10 panel 内部 padding:20 后 hd 不再补 padding-left：左距由 panel 接管，只留 4+34 给 X 按钮 */
.hg-rowcard-hd { padding: 4px 34px 0 0; }
@media (max-width: 768px) {
  #posRowCardModal { padding: 0; align-items: center; }
  #posRowCardPanel { align-self: auto; max-height: 100vh; }
  .hg-rowcard { max-width: 100vw; max-height: 100vh; border-radius: 0; padding: 16px; }
}
.hg-rowcard .hg-modal-close { top: 10px; right: 10px; }
.hg-rowcard-hd { display: flex; align-items: center; gap: 12px; padding: 4px 34px 0 0; }
.hg-rowcard-av { flex: none; width: 44px; height: 44px; border-radius: 10px; color: #fff; font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hg-rowcard-id { min-width: 0; line-height: 1.35; }
.hg-rowcard-id b { display: block; font-size: 16px; color: var(--hg-ink, #222); word-break: break-all; }
.hg-rowcard-id em { font-style: normal; font-size: 12px; color: var(--hg-muted, #888); }
.hg-rowcard-price { margin-top: 12px; padding: 10px 12px; background: var(--hg-gray, #f3f4f6);
  border-radius: 10px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; line-height: 1.4; }
.hg-rowcard-price .lab { font-size: 12px; color: var(--hg-muted, #888); }
.hg-rowcard-price .cur { font-size: 22px; font-weight: 800; color: #E53935; font-variant-numeric: tabular-nums; }
.hg-rowcard-price s { color: var(--hg-muted, #999); font-size: 12px; }
.hg-rowcard-autotip { display: none; margin-top: 6px; padding: 6px 10px; font-size: 12px; color: #8a5a00;
  background: #fff6df; border: 1px solid #ffe2a8; border-radius: 8px; line-height: 1.45; }
.hg-rowcard-sec { margin-top: 18px; }
.hg-rowcard-sec-t { display: block; font-size: 13px; color: var(--hg-ink, #222); margin-bottom: 10px; }
.hg-rowcard-sec-t em { font-style: normal; font-size: 11px; color: var(--hg-muted, #999); margin-left: 6px; }
/* 2026-09-11 行卡「数量手动输入」行：顾客一次买很多件（如 20 个）直接键入目标数量 */
.hg-rowcard-qtybar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.hg-rowcard-qtybar .lab { flex: none; font-size: 12px; color: var(--hg-muted, #888); }
.hg-rowcard-qtybar .hg-rc-qstep { flex: none; width: 44px; height: 44px; font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer;
  border: 1px solid var(--hg-border, #d8dade); background: #fff; color: var(--hg-primary, #0066CC); border-radius: 10px; }
.hg-rowcard-qtybar .hg-rc-qstep:active { background: var(--hg-gray, #f3f4f6); }
.hg-rowcard-qtybar .hg-rc-qin { flex: 1 1 auto; min-width: 64px; height: 44px; box-sizing: border-box; padding: 0 6px;
  text-align: center; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--hg-ink, #222);
  border: 1px solid var(--hg-border, #d8dade); border-radius: 10px; background: #fff; }
.hg-rowcard-qtybar .hg-rc-qin:focus { border-color: var(--hg-primary, #0066CC); outline: none; box-shadow: 0 0 0 2px rgba(0, 102, 204, .15); }

/* 2026-09-11 数量数字键盘（可伸缩）：开关按钮 + 展开面板（触摸屏免物理键盘直接输大数量） */
.hg-rowcard-qtybar .hg-rc-qpadbtn { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; border: 1px solid var(--hg-border, #d8dade); background: #fff;
  color: var(--hg-primary, #0066CC); border-radius: 10px; }
.hg-rowcard-qtybar .hg-rc-qpadbtn svg { width: 22px; height: 22px; }
.hg-rowcard-qtybar .hg-rc-qpadbtn:active { background: var(--hg-gray, #f3f4f6); }
.hg-rowcard-qtybar .hg-rc-qpadbtn.on { background: var(--hg-primary, #0066CC); border-color: var(--hg-primary, #0066CC); color: #fff; }
.hg-rc-qin.pad-on { border-color: var(--hg-primary, #0066CC) !important; box-shadow: 0 0 0 2px rgba(0, 102, 204, .15); }
.hg-rc-qpad { margin-top: 10px; }
.hg-rc-qmsg { margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--hg-primary, #0066CC); }


.hg-rowcard-qty { display: flex; align-items: center; gap: 14px; }
.hg-rowcard-qty button { width: 56px; height: 56px; font-size: 26px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--hg-border, #d8dade); background: #fff; color: var(--hg-primary, #1a66cc);
  border-radius: 12px; line-height: 1; }
.hg-rowcard-qty button:active { background: var(--hg-gray, #f3f4f6); }
.hg-rowcard-qty b { min-width: 56px; text-align: center; font-size: 28px; font-weight: 800;
  font-variant-numeric: tabular-nums; color: var(--hg-ink, #222); }
.hg-rowcard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hg-rc-lv { min-height: 52px; font-size: 17px; font-weight: 700; cursor: pointer; color: var(--hg-ink, #222);
  background: #fff; border: 1px solid var(--hg-border, #d8dade); border-radius: 10px; line-height: 1.2; }
.hg-rc-lv:active { background: var(--hg-gray, #f3f4f6); }
.hg-rc-lv.on { background: var(--hg-primary, #1a66cc); border-color: var(--hg-primary, #1a66cc); color: #fff; }
.hg-rc-lv.custom { grid-column: span 3; background: var(--hg-gray, #f3f4f6); border-style: dashed; color: var(--hg-primary, #1a66cc); font-weight: 600; }
.hg-rowcard-gift { margin-top: 12px; padding: 8px 10px; font-size: 12px; color: #0b6b3a;
  background: #e7f6ec; border: 1px solid #bfe5cd; border-radius: 8px; line-height: 1.45; }
.hg-rowcard-numpad { margin-top: 12px; border-top: 1px dashed var(--hg-border-light, #e5e7eb); padding-top: 10px; }
.hg-rowcard-numpad-t { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.hg-rowcard-numpad-t em { flex: 1; font-style: normal; font-size: 13px; color: var(--hg-primary, #1a66cc); font-weight: 600; }
.hg-rowcard-numpad-t input { width: 120px; text-align: right; font-size: 20px; font-weight: 800;
  color: var(--hg-ink, #222); padding: 6px 8px; border: 1px solid var(--hg-border, #d8dade);
  border-radius: 8px; background: var(--hg-gray, #f3f4f6); font-variant-numeric: tabular-nums; }
.hg-rowcard-numpad-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hg-rowcard-numpad-keys button { min-height: 46px; font-size: 19px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--hg-border, #d8dade); background: #fff; color: var(--hg-ink, #222); border-radius: 8px; }
.hg-rowcard-numpad-keys button:active { background: var(--hg-gray, #f3f4f6); }
.hg-rowcard-numpad-keys button.ok { background: var(--hg-primary, #1a66cc); border-color: var(--hg-primary, #1a66cc); color: #fff; font-weight: 800; }
.hg-rowcard-numpad-keys button.cancel { background: var(--hg-gray, #f3f4f6); color: var(--hg-muted, #888); }
.hg-rowcard-numpad-keys button.op { color: var(--hg-danger, #E53935); }
.hg-rowcard-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--hg-border-light, #e5e7eb); }
.hg-rowcard-del { min-height: 44px; padding: 0 18px; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--hg-danger, #E53935); background: #fff; border: 1px solid #f3c0c0; border-radius: 10px; margin-right: auto; }
.hg-rowcard-del:active { background: #fdeeee; }
.hg-rowcard-done { min-height: 44px; font-size: 15px; font-weight: 700; }

/* ===================== 表单底部/工具按钮行（通用，2026-09-13） =====================
   wcGongGaoDlg 页内联的是带 padding-left:92px（对齐 label）的版本；这里是通用无缩进版，
   用于电子券定义等「按钮行左对齐聚拢」的表单页（全选/全消/删除选中、确定/取消）。 */
.hg-form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }

/* ===================== 电子券定义（wcEVoucherProdDfDlg）排版 2026-09-13 =====================
   背景：该页是拆壳产物（span.hg-form-field），输入框未给固定宽度 →
   hgInitInputClear 把「可编辑」input 包进 .hg-input-wrap（inline-block）后，
   `.hg-form-field > .hg-input{width:100%}` 的直接子选择器失配，宽度回退到 input 默认
   size（实测约 193px）；而「disabled」的 input 仍被 `.hg-form-row .hg-form-field{flex:1 1 auto}`
   撑满整行（实测 1030px）→ 同一页出现两套输入框宽度，右侧按钮/提示错位。
   现按「下货查询 / 新增公告」的字段行规范收敛：label 定宽右对齐、控件定宽、
   field 不再吸收剩余空间，一行两组时自然靠左紧凑；输入框宽度由服务器控件 Width 给出
   （与 wcGongGaoDlg 一致，不受 JS 包 wrap 影响）。 */
.hg-evpd .hg-form-row { margin-bottom: 10px; gap: 12px; flex-wrap: wrap; }
.hg-evpd .hg-form-label { min-width: 84px; }
.hg-evpd .hg-form-field { flex: 0 0 auto; min-width: 0; gap: 8px; }
/* 同页多个下拉（类型/状态/商品大类/小类/设计师/页记录数）统一宽度，避免长短不齐；
   trigger 撑满由全局 `.hg-form-field > .hg-cselect-wrap .hg-cselect-trigger{width:100%}` 负责 */
.hg-evpd .hg-form-field > .hg-cselect-wrap { width: 180px !important; max-width: 100%; }
/* 输入框统一 250px —— 必须写成**不带 `>` 的后代选择器**：
   全局 L3118 `.hg-form-field > .hg-input{width:250px!important}` 是「直接子 + !important」，
   其 !important 会压过服务器控件内联 Width（!important 作者规则 > 内联普通声明），于是
   disabled 的 input 恒为 250px；而可编辑的 input 被 hgInitInputClear 包进 .hg-input-wrap
   后脱离直接子匹配、保留内联值 → 同页出现 250/420/200/110 多套宽度。
   这里一次性覆盖两种结构：直接子（disabled）与 wrap 内（可编辑）；wrap 本身 width:auto，
   收缩到内部 input 宽度。窄字段（有效天数/折扣/满减/拟消费数量）加 .hg-input--sm = 110px。 */
.hg-evpd .hg-form-field input.hg-input { width: 250px !important; max-width: 100%; }
.hg-evpd .hg-form-field > .hg-input-wrap { flex: 0 0 auto; width: auto; }
.hg-evpd .hg-form-field input.hg-input.hg-input--sm { width: 110px !important; }
/* 行内小提示（(系统自动生成) / (或名称/助记符) / 或输入名称/Email）在 flex 行内垂直居中 */
.hg-evpd .hg-form-field > .hg-hint { margin-left: 0; line-height: 1.4; }
/* 分组小标题：请选择目标商品 / 请选择拟消费商品 */
.hg-evpd .hg-form-row.hg-evpd-sub { margin: 18px 0 8px; }
.hg-evpd .hg-evpd-sub .hg-form-field { font-size: 14px; font-weight: 700; color: var(--hg-ink); line-height: 1.5; }
.hg-evpd .hg-table-scroll { margin-bottom: 12px; }
.hg-evpd .hg-evpd-footer { margin-top: 20px; }
/* 表格列宽（2026-09-13）：本页只有 6 列，`.hg-sales-grid` 是 table-layout:auto，
   全局各列 width 只是「建议值」，剩余空间会被所有列均分 → 选择/序号这种窄列被撑到 130px+、
   价格列 269px。这里把除「商品名称」外的列钉死，「商品名称」width:auto 独占吸收剩余空间。 */
.hg-evpd .hg-sales-grid th.hg-col-check, .hg-evpd .hg-sales-grid td.hg-col-check { width: 64px !important; min-width: 64px !important; }
.hg-evpd .hg-sales-grid th.hg-col-idx,   .hg-evpd .hg-sales-grid td.hg-col-idx   { width: 64px !important; min-width: 64px !important; }
.hg-evpd .hg-sales-grid th.hg-col-code,  .hg-evpd .hg-sales-grid td.hg-col-code  { width: 120px !important; min-width: 110px !important; }
.hg-evpd .hg-sales-grid th.hg-col-name,  .hg-evpd .hg-sales-grid td.hg-col-name  { width: auto !important; min-width: 180px !important; text-align: left !important; }
.hg-evpd .hg-sales-grid th.hg-col-amt,   .hg-evpd .hg-sales-grid td.hg-col-amt   { width: 120px !important; min-width: 110px !important; }
.hg-evpd .hg-sales-grid th.hg-op-col,    .hg-evpd .hg-sales-grid td.hg-op-col    { width: 80px !important; min-width: 72px !important; }
/* 行高兜底：#pgForm 的 line-height:0 会一路继承，让 .hg-form-row 内行内提示文字行盒塌陷
   （技能 hgbox-css-lh0-collapse）。用 :where() 保持零特异性，不反压 .hg-form-label 的 24px
   等子元素自有声明；只作用于表单行，不动表格。 */
:where(.hg-evpd .hg-form-row) { line-height: 1.6; }

/* ===================== 弹窗选品器（wcEVoucherProdDfDlg 的「选择商品」）2026-09-14 =====================
   背景：原「导入商品」= 按条件 LIKE 模糊匹配后把结果**整批塞进商品池**，条件稍宽一次进十几二十条，
   只能事后逐条删。现改成底部弹窗：弹窗内筛选（大类/小类/设计师/关键词）+ 分页 + 逐条勾选，
   只把勾中的加入池。赠送池(Style=0) 与 拟消费池(Style=1) 共用本弹窗（标题后缀区分）。

   结构：.hg-modal > .hg-modal-panel.hg-evpick > -hd / -filter / -bar / -body / -pager / -foot

   🔑 ① .hg-modal-panel 全局带 max-height:90vh + overflow:hidden → 本面板必须自己用 flex 列布局，
        并把中间列表区 -body 设 flex:1 + overflow:auto 扛滚动，否则列表被裁掉、看不到分页与底部按钮。
      ② 弹窗内下拉 .hg-cselect 的增强层 z-index 9999 且 menu 挂 document.body → 在弹窗之上正常展开。
      ③ 列类 hg-evpick-c-* 只是**本页私有**命名；JS hgStandardizeColumns() 仍会按表头文字再补一份
        hg-col-*（选择→center / 图片→img / 编码→code / 名称→name / 价格→amt / 设计师→boxer / 状态→tag）。
        因此下面的列宽规则一律带 #pgForm 前缀提高特异性（(1,2,1) > (0,2,1)），确保压过全局契约。
      ④ 移动端（≤768px）全局会隐藏 hg-col-img / hg-col-idx —— 图片列随之隐藏，符合选品场景；
        本页再额外隐藏「设计师」列给名称腾空间。 */
#pgForm .hg-modal-panel.hg-evpick {
    width: min(1080px, 96vw);
    height: min(86vh, 820px);
    max-height: 90vh;
}

/* ---- 标题栏 ---- */
.hg-evpick-hd {
    flex: 0 0 auto;
    padding: 14px 52px 12px 20px;
    font-size: 16px; font-weight: 700; line-height: 1.5;
    color: var(--hg-ink);
    border-bottom: 1px solid var(--hg-border-light);
}
.hg-evpick-hd > span { font-size: 13px; font-weight: 500; color: var(--hg-muted); }

/* ---- 筛选区：每项 = 「提示文字 + 控件」上下两行 ---- */
.hg-evpick-filter {
    flex: 0 0 auto;
    display: flex; flex-wrap: wrap; align-items: flex-end;
    gap: 10px 14px;
    padding: 12px 20px;
    background: var(--hg-gray);
    border-bottom: 1px solid var(--hg-border-light);
}
.hg-evpick-fi { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; min-width: 0; }
.hg-evpick-fi > span { font-size: 12px; line-height: 1.4; color: var(--hg-muted); }
/* 下拉：.hg-cselect-wrap 是 JS 生成的 span（select 的兄弟节点），撑满 label 宽度 */
.hg-evpick-fi .hg-cselect-wrap { display: block; width: 168px; max-width: 100%; }
.hg-evpick-fi .hg-cselect-wrap .hg-cselect-trigger { width: 100% !important; }
/* 关键词：占剩余宽度；.hg-input-wrap 同为 JS 生成的 span */
.hg-evpick-fi--kw { flex: 1 1 220px; }
.hg-evpick-fi--kw .hg-input-wrap { display: block; width: 100%; }
.hg-evpick-fi--kw input.hg-input { width: 100% !important; max-width: 100%; }
.hg-evpick-fbtn { display: flex; align-items: center; gap: 8px; }

/* ---- 统计条（匹配 N 条 · 已勾选 N 项 / 全选本页 · 清空选择）---- */
.hg-evpick-bar {
    flex: 0 0 auto;
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 6px 14px;
    padding: 8px 20px;
    font-size: 13px; line-height: 1.5; color: var(--hg-muted);
    border-bottom: 1px solid var(--hg-border-light);
}
.hg-evpick-bar .hg-evpick-cnt b { color: var(--hg-ink); font-weight: 700; }
.hg-evpick-bar .hg-evpick-sel { color: var(--hg-primary); }
.hg-evpick-bar .hg-evpick-sel b { color: var(--hg-primary); font-weight: 700; }
.hg-evpick-bar-btn { margin-left: auto; display: flex; gap: 8px; }

/* ---- 列表区：唯一滚动容器 ---- */
.hg-evpick-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 12px; background: #fff; }
.hg-evpick-body .hg-table-scroll { overflow-x: auto; }
.hg-evpick-empty { padding: 44px 16px; text-align: center; font-size: 14px; line-height: 1.6; color: var(--hg-muted); }

/* ---- 结果表格：7 列列宽钉死，「商品名称」width:auto 独占吸收剩余空间 ---- */
.hg-evpick-grid { margin: 0; }
#pgForm .hg-evpick-grid th.hg-evpick-c-pick, #pgForm .hg-evpick-grid td.hg-evpick-c-pick { width: 52px !important;  min-width: 46px !important;  text-align: center !important; }
#pgForm .hg-evpick-grid th.hg-evpick-c-img,  #pgForm .hg-evpick-grid td.hg-evpick-c-img  { width: 64px !important;  min-width: 58px !important;  text-align: center !important; }
#pgForm .hg-evpick-grid th.hg-evpick-c-code, #pgForm .hg-evpick-grid td.hg-evpick-c-code { width: 110px !important; min-width: 92px !important;  text-align: center !important; }
#pgForm .hg-evpick-grid th.hg-evpick-c-name, #pgForm .hg-evpick-grid td.hg-evpick-c-name { width: auto !important;  min-width: 180px !important; text-align: left !important; }
#pgForm .hg-evpick-grid th.hg-evpick-c-amt,  #pgForm .hg-evpick-grid td.hg-evpick-c-amt  { width: 100px !important; min-width: 88px !important;  text-align: right !important; }
#pgForm .hg-evpick-grid th.hg-evpick-c-boxer,#pgForm .hg-evpick-grid td.hg-evpick-c-boxer{ width: 110px !important; min-width: 88px !important;  text-align: center !important; }
#pgForm .hg-evpick-grid th.hg-evpick-c-st,   #pgForm .hg-evpick-grid td.hg-evpick-c-st   { width: 72px !important;  min-width: 60px !important;  text-align: center !important; }
.hg-evpick-grid td { vertical-align: middle !important; }
/* 「已在池中 / 已停用」行：整行灰化 + 勾选框禁用，避免重复配置与配错 */
.hg-evpick-row--off > td { color: var(--hg-muted) !important; background: #FAFAFB; }
.hg-evpick-row--off .hg-evpick-thumb { opacity: .5; }
.hg-evpick-grid td.hg-evpick-c-pick input[type="checkbox"] { width: 17px; height: 17px; cursor: pointer; margin: 0; vertical-align: middle; }
.hg-evpick-grid td.hg-evpick-c-pick input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .45; }
/* 缩略图：44 方形，留白避免长宽比拉伸（库里 87% 商品是占位图，PickImg() 已直接返回空串不渲染） */
.hg-evpick-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px;
    border: 1px solid var(--hg-border); background: var(--hg-gray); display: block; margin: 0 auto; }

/* ---- 页码条 ---- */
.hg-evpick-pager { flex: 0 0 auto; padding: 8px 20px; border-top: 1px solid var(--hg-border-light); }
.hg-evpick-pgwrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.hg-evpick-pg { display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid var(--hg-border); border-radius: 8px;
    background: #fff; color: var(--hg-ink); font-size: 13px; line-height: 1; text-decoration: none; }
a.hg-evpick-pg:hover { border-color: var(--hg-primary); color: var(--hg-primary); background: #EBF3FC; }
.hg-evpick-pg--on { background: var(--hg-primary); border-color: var(--hg-primary); color: #fff; font-weight: 700; }
.hg-evpick-pg--dis { color: #C4C8CE; background: var(--hg-gray); cursor: not-allowed; }
.hg-evpick-pgdots { padding: 0 2px; color: var(--hg-muted); font-size: 13px; }

/* ---- 底栏：每页条数（左）+ 加入/取消（右）---- */
.hg-evpick-foot {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
    gap: 8px 14px;
    padding: 12px 20px;
    border-top: 1px solid var(--hg-border-light);
    background: var(--hg-gray);
}
.hg-evpick-ps { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--hg-muted); }
.hg-evpick-ps .hg-cselect-wrap { display: inline-block; width: 96px; }
.hg-evpick-ps .hg-cselect-wrap .hg-cselect-trigger { width: 100% !important; }
.hg-evpick-foot-btn { display: flex; align-items: center; gap: 10px; }

/* 移动端：面板近乎全屏；筛选项两列排布；隐藏「设计师」列给商品名称腾空间 */
@media (max-width: 768px) {
    #pgForm .hg-modal { padding: 10px; }
    #pgForm .hg-modal-panel.hg-evpick { width: 96vw; height: 92vh; max-height: 94vh; }
    .hg-evpick-hd { padding: 12px 46px 10px 14px; font-size: 15px; }
    .hg-evpick-filter { padding: 10px 14px; gap: 8px 10px; }
    .hg-evpick-fi { flex: 1 1 calc(50% - 5px); }
    .hg-evpick-fi .hg-cselect-wrap { width: 100%; }
    .hg-evpick-fi--kw { flex: 1 1 100%; }
    .hg-evpick-fbtn { flex: 1 1 100%; justify-content: flex-end; }
    .hg-evpick-bar { padding: 8px 14px; }
    .hg-evpick-bar-btn { margin-left: 0; flex: 1 1 100%; justify-content: flex-end; }
    .hg-evpick-body { padding: 0 6px; }
    #pgForm .hg-evpick-grid th.hg-evpick-c-boxer,
    #pgForm .hg-evpick-grid td.hg-evpick-c-boxer { display: none !important; }
    #pgForm .hg-evpick-grid th.hg-evpick-c-name,
    #pgForm .hg-evpick-grid td.hg-evpick-c-name { min-width: 130px !important; }
    .hg-evpick-pager { padding: 8px 10px; }
    .hg-evpick-foot { padding: 10px 14px; }
    .hg-evpick-ps { flex: 1 1 100%; }
    .hg-evpick-foot-btn { flex: 1 1 100%; }
    .hg-evpick-foot-btn .hg-filter-btn { flex: 1 1 auto; }
}

@media (max-width: 768px) {
  .hg-evpd .hg-form-row { flex-direction: column; align-items: stretch; gap: 6px; }
  /* text-align:left 必须显式写：全局 L826 的移动端左对齐被后续 L2675 桌面段
     `.hg-form-row .hg-form-label{text-align:right}`（同特异性、源序更后）覆盖，
     导致窄屏 label 仍右对齐（公告页等同样受影响）。 */
  .hg-evpd .hg-form-label { min-width: 0; text-align: left; }
  .hg-evpd .hg-form-field { flex: 1 1 auto; width: 100%; }
  .hg-evpd .hg-form-field input.hg-input,
  .hg-evpd .hg-form-field input.hg-input.hg-input--sm,
  .hg-evpd .hg-form-field > .hg-input-wrap,
  .hg-evpd .hg-form-field > .hg-cselect-wrap { width: 100% !important; max-width: 100% !important; }
  .hg-evpd .hg-form-row.hg-evpd-sub { margin: 14px 0 6px; }
  /* 窄屏隐藏「序号」列（信息价值低）。注意不能改用 min-width 撑开表格：
     全局 L2175 `#pgForm .hg-table-scroll .hg-sales-grid{min-width:0}` 是 ID 选择器，
     会压过任何类选择器形式的 min-width，把表格保持在「压缩不自适应·不横向滚动」模式。
     序号列内容最少，会被压成 0 宽显示为一条空白，不如直接隐藏，让其余 5 列正好铺满。 */
  .hg-evpd .hg-sales-grid th.hg-col-idx,
  .hg-evpd .hg-sales-grid td.hg-col-idx { display: none !important; }
}

/* ============ 会员详情头部 KV 网格（wcXcxVip，2026-09-15） ============ */
.hg-vip-title { font-size:14px; font-weight:700; color:#111827; line-height:1.4; }
.hg-vip-title .hg-vip-id { color:#6B7280; font-weight:400; font-size:12px; margin-left:4px; }
.hg-vip-sub { color:#374151; font-size:12px; margin-top:3px; line-height:1.5; }
.hg-vip-sub .hg-vip-sublabel { color:#6B7280; margin-right:2px; }
/* 2026-09-15 两列语义固定：左列 6 格（手机号/性别/生日/余额/累计消费/注册日）+ 右列 6 格（累计积分/剩余积分/连续签到/累计签到/成长值/邀请码）→ 列优先填充 */
.hg-vip-kv { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(6,auto); grid-auto-flow:column; gap:6px 16px; margin-top:10px; }
.hg-vip-kv .hg-kv-cell { display:flex; justify-content:space-between; align-items:baseline; gap:8px; min-width:0; border-bottom:1px dashed #E5E7EB; padding-bottom:3px; }
.hg-vip-kv .hg-kv-label { color:#6B7280; font-size:12px; flex:none; }
.hg-vip-kv .hg-kv-value { color:#111827; font-size:13px; font-weight:600; text-align:right; min-width:0; overflow-wrap:anywhere; }
.hg-vip-kv .hg-kv-value .hg-kv-note { color:#6B7280; font-weight:400; font-size:11px; }
/* 窄屏回落单列（先左列后右列，顺序不变） */
@media (max-width: 640px) {
  .hg-vip-kv { grid-template-columns:minmax(0,1fr); grid-template-rows:none; grid-auto-flow:row; gap:5px 0; }
}

/* ===== 2026-09-15 网站相关文件页（wcSiteFiles）：页脚设置（版权 / 备案号） =====
   三个输入框 + 保存/恢复默认按钮复用全局 .hg-filter-bar，此处只补预览条样式。
   注意：#pgForm 有 line-height:0，预览区必须显式给 line-height，否则文字行盒塌成一团。 */
.hg-sitefooter-block { margin: 0 0 4px; }
.hg-sitefooter-block .hg-filter-bar { row-gap: 10px; }
.hg-sitefooter-preview {
  margin-top: 10px; padding: 12px 16px;
  background: var(--hg-bg, #F8FAFC);
  border: 1px dashed var(--hg-border);
  border-radius: var(--hg-radius);
  font-size: 12px; color: var(--hg-faint);
  line-height: 1.9; text-align: center;
  word-break: break-word;
}
.hg-sitefooter-preview-tag {
  display: inline-block; vertical-align: middle;
  margin-right: 10px; padding: 1px 8px;
  font-size: 11px; line-height: 1.5; color: var(--hg-muted);
  background: #FFFFFF; border: 1px solid var(--hg-border); border-radius: 999px;
}
/* 预览条里的备案号与线上页脚同色（随版权行统一 --hg-faint，见 .hg-footer-bottom 注释）。
   注意：本页在 #pgForm 里，普通 a 规则会被更高特异性压住，这里必须保持 .hg-sitefooter-preview a
   （(0,2,1)）——实测过被 #pgForm .hg-sales-grid td a!important 之类的规则影响不到本区域，
   但若未来在预览里加 class 需重新验色（脚本 ai/t_footcolor.js）。 */
.hg-sitefooter-preview a { color: var(--hg-faint); }
.hg-sitefooter-preview a:hover { color: var(--hg-primary); text-decoration: underline; }

/* 公安网备图标（备案号前，官方样式要求；2026-09-15）
   原图 36×40 → 按 13×15 展示；页脚与后台预览共用本类。
   🔴 三条硬要求（用户 2026-09-15）：
   ① 不能换行 → 必须显式 display:inline-block。全局重置（本文件 120 行）
      `img{max-width:100%;height:auto;display:block}` 会把图标打成块级：图标独占一行、
      左对齐贴容器左边，备案号文字被挤到下一行居中（实测页脚撑成 61px 三行、
      图标与文字错位 18px）。类选择器特异性高于 img，本行可稳定覆盖该重置。
   ② 与右侧备案号之间留一个空格 → margin-right: 0.25em（12px 字时 = 3px，等于一个空格宽；
      用 em 让字号变了间距跟着变）。2026-09-15 先按要求做成 margin:0 紧贴，随后用户看到
      图标贴字太挤，改回留一个空格。不要写成 HTML 里的空格字符：那会多出一个换行点，
      窄屏下图标可能被留在上一行行尾、备案号掉到下一行。
   ③ 垂直居中 → vertical-align 用实测值，不能用 middle：middle 是把图标中点对齐
      「基线 + 半个 x-height」（12px 字 ≈ 基线上方 3px），而中文字面视觉中心在基线上方
      约 4.3px，直接用 middle 图标会明显偏下。
   -3px 的来路：理论算得 -3.18px（字面中心 0.36em − 图标半高 7.5px）；再用 3×/6× 截图量
   「图标墨迹中心 vs 同行文字墨迹中心」校准（脚本 ai/t_icon_px.js）——桌面 -2.5px、
   手机 -3.5px（两端换行不同，CJK 回退字体墨迹取整差 ~1px），取中值 -3px，两端偏差 ≤0.5px。
   改字号或改图标显示尺寸后需重新校准。 */
.hg-beian-icon {
  display: inline-block;
  width: 13px; height: 15px;
  vertical-align: -3px;
  margin: 0 0.25em 0 0;
  border: 0;
}

/* 2026-09-15 页面说明文字（挂在卡片标题下方的一段灰色提示）。
   🔴 必须显式给 line-height：#pgForm{line-height:0} 会继承下来，裸 <p> 的多行说明
   会被压成一行互相重叠（2026-09-15 在 wcSiteFiles 页脚设置区实测踩到）。 */
.hg-page-tip {
  font-size: 13px; line-height: 1.7; color: var(--hg-muted);
  margin: 0 0 16px;
}
.hg-page-tip--tight { font-size: 12px; margin: 6px 0 10px; }
.hg-page-tip code { font-family: Consolas, monospace; font-size: 12px; color: var(--hg-ink); }

/* 2026-09-18 电子券定义弹窗（wcEVoucherProdDfDlg）：「适用范围」添加式选择（交互对齐满额定销）。
   大类/小类/盒主 下拉 + 添加/清空 + 已选清单表格；清单与上方选择器留间距即可。 */
.hg-evscope-bar { margin-bottom: 8px; flex-wrap: wrap; }
.hg-evscope-bar .hg-cselect { min-width: 130px; }

/* 2026-09-18 「适用范围」三元组表（GrdEvScope）列宽契约：列窄会把「大类/全部小类」等
   挤成竖排 → 按内容给定 min-width（th/td 成对 + !important）。
   🔴 排在文件末尾（所有 @media 之后），避免移动端媒体查询里的 !important 反压桌面规则。 */
#pgForm .hg-evscope-grid th:nth-child(1), #pgForm .hg-evscope-grid td:nth-child(1) { width: 56px; min-width: 56px !important; }
#pgForm .hg-evscope-grid th:nth-child(2), #pgForm .hg-evscope-grid td:nth-child(2) { min-width: 110px !important; }
#pgForm .hg-evscope-grid th:nth-child(3), #pgForm .hg-evscope-grid td:nth-child(3) { min-width: 110px !important; }
#pgForm .hg-evscope-grid th:nth-child(4), #pgForm .hg-evscope-grid td:nth-child(4) { min-width: 110px !important; }
#pgForm .hg-evscope-grid th:nth-child(5), #pgForm .hg-evscope-grid td:nth-child(5) { width: 64px; min-width: 64px !important; }

/* 2026-09-18 晚 免费券「买X送Y可叠加」开关：拟消费数量输入框旁的行内复选框 */
.hg-evstack-chk { margin: 0 0 0 10px; vertical-align: middle; }
.hg-evstack-chk input { vertical-align: middle; margin: 0 4px 0 0; }



