﻿/* ============================================================
   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;
}
.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; }
.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 > * { flex: 1; }
.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); }

/* ===================== 分隔线 ===================== */
.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); }
.hg-footer-bottom a { color: var(--hg-muted); }
.hg-footer-bottom a:hover { color: var(--hg-primary); text-decoration: underline; }
.hg-footer-bottom span { color: var(--hg-divider); margin: 0 4px; }

/* ===================== 页面容器 ===================== */
.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;
}
.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;
}
#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; 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; }
.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; }
.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;
}
/* 分页行（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-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; }
.hg-detail-v.amount .hg-num-frac { color: #6b7280; }
@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; }
.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;
}
/* 金额/价格列：65px/min65px（2026-08-27 用户全局指定，原 70/65），右对齐（对齐组见 L2124） */
.hg-sales-grid th.hg-col-amt, .hg-sales-grid td.hg-col-amt { width: 65px !important; min-width: 65px; }
/* 勾选列（价牌打印"打印"等 CheckBox 列，2026-08-21 用户全局指定 80/60；区别于 hg-op-col 链接操作列 30px） */
.hg-sales-grid th.hg-col-check, .hg-sales-grid td.hg-col-check { width: 80px !important; min-width: 60px; 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; }
/* 结算方式：独立类（区别于状态 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; }
/* 百分比列（完成%/折扣%/收益率）：95/75 居中（2026-08-25 用户全局 auto/90→95/75 + 内容居中；覆盖 L2104 右对齐组） */
.hg-sales-grid th.hg-col-pct, .hg-sales-grid td.hg-col-pct { width: 95px !important; min-width: 75px; 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; }
/* 橙色小节标题（表格区块标题，如收入/支出明细标题）：收敛跨页 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;
}

/* =========================================================================
   后台管理页 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-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 用户确认收紧卡片内筛选栏间距 */
/* 卡片内 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; }
/* 自定义下拉菜单 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);
  background: var(--hg-primary-soft);
  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);
}

/* ===================== 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);
}
@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; color: var(--hg-muted); }
.hg-stock-asset-value { font-size: 20px; font-weight: 700; color: var(--hg-primary); font-variant-numeric: tabular-nums; }
.hg-stock-asset-note { font-size: 12px; color: var(--hg-muted); }
@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); }
.hg-viptag-hd { padding: 18px 20px 14px; border-bottom: 1px solid var(--hg-border); }
.hg-viptag-name { font-size: 17px; font-weight: 600; color: var(--hg-ink); }
.hg-viptag-sub { margin-top: 4px; font-size: 13px; color: var(--hg-muted); }
.hg-viptag-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.hg-viptag-kpi > div {
  padding: 10px 12px; box-sizing: border-box;
  background: var(--hg-canvas); border: 1px solid var(--hg-border); border-radius: var(--hg-radius);
}
.hg-viptag-kpi b {
  display: block; font-size: 16px; font-weight: 700;
  color: var(--hg-primary); font-variant-numeric: tabular-nums;
}
.hg-viptag-kpi span { display: block; margin-top: 2px; font-size: 12px; color: var(--hg-muted); }
.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-08-30 · wcXcxVip） =====================
   抽屉里原有区块都是内联样式，新增的「会员标签」区统一走这几类，便于后续收敛。 */
.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: 12px 16px; }
.hg-sy-shop-title { font-size: 14px; font-weight: 500; color: var(--hg-ink); margin-bottom: 8px; }
.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; }
.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-sec { margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--hg-ink); border-top: 0.5px solid var(--hg-border); padding-top: 8px; }
.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-08-31 促销页区块标题：蓝色加粗加大 */
.hg-sec-title { color: var(--hg-primary); font-weight: 600; font-size: 16px; margin: 14px 0 10px; }

/* 2026-08-31 限时折扣明细表「特价」「让利后收益率」输入框：默认浅蓝灰字，hover 反色行变白底蓝字 */
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager) td input.hg-input-cx {
  background-color: #e6f2fa;
  color: #6c757d;
}
#pgForm .hg-sales-grid tbody tr:not(.hg-grid-footer):not(.hg-grid-pager):hover td input.hg-input-cx {
  background-color: #ffffff;
  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 { background: #ffffff !important; color: var(--hg-primary) !important; font-weight: 700 !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; } }

/* ---- 单据信息条（顶栏，合并原 4 行筛选区） ---- */
.hg-pos-topbar {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  background: #fff; border: 1px solid var(--hg-border-light); border-radius: 14px;
  padding: 10px 14px; margin-top: 12px;
}
.hg-pos-topbar .hg-filter-group { display: flex; align-items: center; gap: 6px; }
/* 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: 170px; padding: 5px 8px; }   /* 2026-09-01 与 .hg-pos-validdate 对齐：店铺/营业员改为只读 trigger 后保持同等宽度 */
.hg-pos-topbar .hg-pos-billno { width: 170px; font-weight: 800; color: var(--hg-primary); font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.hg-pos-topbar .hg-pos-validdate { width: 170px; font-variant-numeric: tabular-nums; }

/* ---- 左栏：会员卡 ---- */
.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; }
.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: 15px; font-weight: 800; color: var(--hg-ink); font-variant-numeric: tabular-nums; }
.hg-pos-kpi span { font-size: 11px; color: var(--hg-muted); }
.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; cursor: pointer;
  font-size: 13px; color: var(--hg-primary); font-weight: 600;
}
.hg-pos-coupon b { font-variant-numeric: tabular-nums; }
.hg-pos-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hg-pos-tags .hg-tag-chip { margin: 0; }
.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: 18px; height: 18px; border-radius: 5px; background: var(--hg-bg); color: var(--hg-muted); font-size: 11px; 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; }
.hg-pos-scan {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--hg-border-light); border-radius: 14px; padding: 12px 14px;
}
.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; }
.hg-pos-promo {
  background: #fff; border: 1px solid var(--hg-border-light); border-radius: 14px; padding: 0 14px;
}
.hg-pos-promo-hd {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 0; cursor: pointer; font-size: 13px;
}
.hg-pos-promo-hd .t { color: var(--hg-ink); font-weight: 600; }
.hg-pos-promo-hd .t em { font-style: normal; color: var(--hg-muted); font-weight: 400; }
.hg-pos-promo-hd .amt { color: var(--hg-danger); font-weight: 800; font-variant-numeric: tabular-nums; }
.hg-pos-promo-hd .caret { color: var(--hg-muted); font-size: 11px; transition: transform .2s var(--hg-ease); }
.hg-pos-promo.open .hg-pos-promo-hd .caret { transform: rotate(180deg); }
.hg-pos-promo-body { display: none; padding: 2px 0 12px; }
.hg-pos-promo.open .hg-pos-promo-body { display: block; }
.hg-pos-promo-body li { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: var(--hg-ink); }
.hg-pos-promo-body li .d { color: var(--hg-danger); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- 商品明细卡（表格容器化） ---- */
.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 取单弹窗：挂起未结算单列表 */
.hg-take-panel { width: min(560px, calc(100vw - 32px)); }
.hg-take-list { max-height: 46vh; overflow-y: auto; padding: 4px 0; }
.hg-take-empty { padding: 28px 12px; text-align: center; color: var(--hg-muted); font-size: 13px; }
.hg-take-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--hg-border-light); }
.hg-take-row:last-child { border-bottom: 0; }
.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); }
.hg-take-bill { font-weight: 700; color: var(--hg-ink); font-variant-numeric: tabular-nums; }
.hg-take-meta { color: var(--hg-muted); font-size: 12px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-take-amt { color: var(--hg-danger); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---- 收款区 ---- */
.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%; }

/* ---- 操作按钮区（5 按钮水平 grid，图标上文字下） ---- */
.hg-pos-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.hg-pos-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  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);
}
.hg-pos-action .ic { font-size: 18px; line-height: 1; }
.hg-pos-action:hover { border-color: var(--hg-primary); color: var(--hg-primary); background: var(--hg-primary-soft); }
.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,.8); }
.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; }
.hg-pos-cta .hg-filter-btn-outline { background: transparent !important; color: #fff !important; border: 1px solid rgba(255,255,255,.55) !important; height: 46px; padding: 0 20px; border-radius: 12px; }
.hg-pos-cta .hg-filter-btn-outline:hover { background: rgba(255,255,255,.15) !important; }

/* ---- 移动端（≤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; }
  .hg-pos-cta .hg-pos-cta-side { width: 100%; justify-content: space-between; }
  .hg-pos-actions { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .hg-pos-action { padding: 10px 4px; 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-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;
}
.hg-disc-panel { width: 380px; max-width: 92vw; }
.hg-disc-hd { font-size: 15px; 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; }
.hg-disc-custom .hg-input { flex: 1; min-width: 0; }
