/*
  ho2- 共享外壳样式 —— 深色顶栏 + 左侧导航 + 移动端应用栏/更多抽屉。

  这是从「交接本」(handover.css) 里抽出来的通用部分，供交接本之后新增的
  ho2- 风格页面共用，避免每个页面各自复制一份同样的顶栏/侧边栏/设置弹窗代码。
  颜色变量、字体、间距都跟交接本保持完全一致，两边看起来是同一个系统。

  注意：交接本自己（handover.html/css/js）暂时保持原样、不接入这份共享文件 ——
  它已经上线在跑，属于"先有的实现"，不属于本次重构范围，避免引入不必要的风险。
  这份共享外壳只用于交接本之后新建的页面。

  为避免跟全站共用的 style.css 里的裸 h1/.card/.field/input 等规则打架，这里
  所有类名继续沿用 ho2- 前缀约定（参见交接本 CODEX_HANDOFF.md 里的说明）。
*/

/* 修复一个从「交接本」原始实现继承下来、这份共享文件抽出来时也没改掉的老问题：
   浏览器原生的 [hidden] 属性默认是 display:none，但这是"用户代理样式表"里的
   规则，优先级天然低于任何普通的作者样式——只要页面自己的 CSS 给某个元素设了
   display（比如下面 .ho2-side-link/.ho2-menu-item 都是 display:flex），这条
   author 规则就会无条件覆盖掉 [hidden] 的默认隐藏效果，导致该元素即使被 JS
   设置了 hidden=true 也照样显示。最直接的表现：非管理员账号也会在侧边栏/移动端
   "更多"抽屉里看到"用户账号管理"这个本该只对管理员显示的入口（`.js-admin-link`，
   由 ho2-shell.js 的 loadAccount() 通过 el.hidden 控制）。这里用一条全局规则
   兜底修复，比逐个给每个可能用到 hidden 属性的类名叠特异度更不容易漏改；
   `handover.css` 里那份历史更早、没有接入这份共享文件的实现也有同样的问题，
   需要单独加同样的规则（已经加了，见 handover.css 顶部）。 */
[hidden] { display: none !important; }

:root {
  --ho2-bg: #e1f1fc;
  --ho2-topbar: #1f2733;
  --ho2-topbar-ink: #dfe4ec;
  --ho2-sidebar: #ffffff;
  --ho2-surface: #ffffff;
  --ho2-surface-alt: #edf7fd;
  --ho2-ink: #202632;
  --ho2-muted: #7c8797;
  --ho2-line: #e3e7ee;
  --ho2-accent: #0284c7;
  --ho2-accent-ink: #ffffff;
  --ho2-accent-soft: #e6f4fc;
  --ho2-danger: #e6483c;
  --ho2-danger-soft: #fdeceb;
  --ho2-amber: #c9821a;
  --ho2-amber-soft: #fdf1de;
  --ho2-green: #23935f;
  --ho2-green-soft: #e4f7ee;
  --ho2-blue: #2a72d4;
  --ho2-blue-soft: #e9f1fd;
  /* 20260903 新增：交接本那次"优先级色阶"改版里，把"已逾期"状态从沿用
     --ho2-accent（品牌蓝，容易跟其它蓝色系混淆）改成了这条专门的深玫红
     警示色，这里同步给全站共用的会员状态指示灯（.status-dot.overdue，
     试用已用完/会员已过期时会用到），保持"已逾期/已过期"这类警示状态
     在全站是同一种颜色语言。 */
  --ho2-overdue: #9a1b3a;
  --ho2-overdue-soft: #fbe7ec;
  --ho2-shadow: rgba(31, 39, 51, .08);
  /* 20260927 新增「页面打开过渡动画」用到的缓动函数，跟全站公开页
     （style.css 的 --motion-spring/--motion-bounce）用的是同一条曲线，
     视觉上是同一套动效语言；颜色不分深浅色主题，只在这一份基础 :root
     里定义一次就够。 */
  --ho2-motion-spring: cubic-bezier(.2, .82, .22, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ho2-bg: #0f1821;
    --ho2-topbar: #0c0f14;
    --ho2-topbar-ink: #c6ccd6;
    --ho2-sidebar: #171c25;
    --ho2-surface: #171c25;
    --ho2-surface-alt: #1d2330;
    --ho2-ink: #e6e9ef;
    --ho2-muted: #8b93a3;
    --ho2-line: #2a303d;
    --ho2-accent: #38bdf8;
    --ho2-accent-ink: #04263a;
    --ho2-accent-soft: #12293b;
    --ho2-danger: #ef6156;
    --ho2-danger-soft: #33201d;
    --ho2-amber: #e0a748;
    --ho2-amber-soft: #332a15;
    --ho2-green: #4dbf8a;
    --ho2-green-soft: #123326;
    --ho2-blue: #5b93e0;
    --ho2-blue-soft: #16273f;
    --ho2-overdue: #fb7185;
    --ho2-overdue-soft: #3a1620;
    --ho2-shadow: rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --ho2-bg: #0f1821;
  --ho2-topbar: #0c0f14;
  --ho2-topbar-ink: #c6ccd6;
  --ho2-sidebar: #171c25;
  --ho2-surface: #171c25;
  --ho2-surface-alt: #1d2330;
  --ho2-ink: #e6e9ef;
  --ho2-muted: #8b93a3;
  --ho2-line: #2a303d;
  --ho2-accent: #38bdf8;
  --ho2-accent-ink: #04263a;
  --ho2-accent-soft: #12293b;
  --ho2-danger: #ef6156;
  --ho2-danger-soft: #33201d;
  --ho2-amber: #e0a748;
  --ho2-amber-soft: #332a15;
  --ho2-green: #4dbf8a;
  --ho2-green-soft: #123326;
  --ho2-blue: #5b93e0;
  --ho2-blue-soft: #16273f;
  --ho2-overdue: #fb7185;
  --ho2-overdue-soft: #3a1620;
  --ho2-shadow: rgba(0, 0, 0, .45);
}

/* 覆盖 style.css 里针对裸标签的全局规则（h1 用衬线字体、input/textarea/select
   的默认边框和内边距等），避免在 ho2- 页面里露出来。 */
html,
body {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body.ho2-body {
  background: var(--ho2-bg);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14.5px;
  color: var(--ho2-ink);
  touch-action: manipulation;
}
.ho2-app, .ho2-app * { box-sizing: border-box; }
.ho2-dialog, .ho2-dialog * { box-sizing: border-box; }
.ho2-app h1, .ho2-app h2, .ho2-app h3 { margin: 0; text-wrap: balance; font-family: inherit; }
.ho2-app button, .ho2-app input, .ho2-app select, .ho2-app textarea { font-family: inherit; }
.ho2-app { min-height: 100vh; }

/* 20260927 「整站页面打开/离开过渡动画」试了几轮（渐变/位移/模糊，配合
   motion.js 的 .motion-enabled/.is-ready/.page-leaving），最后反馈是不
   合适——已撤掉。只保留一个更克制、只用在"登录页 → 主页"这一次跳转上的
   放大进入效果，见下面 [data-enter="zoom"] 规则；不再有整站通用的页面
   过渡动画，页面之间点击跳转恢复成普通的硬切。 */

/* 登录成功跳主页的"放大进入"：login.js 登录/注册/开通成功后会在
   sessionStorage 里种一个一次性标记，主页（目前是 dashboard.html）
   头部的内联脚本读到标记后，会在 <html> 上直接同步打上
   data-enter="zoom"（在 .ho2-app 出现之前就已经打好，不依赖任何
   稍后才加载完的脚本），配合下面这条纯 CSS animation 自己播完，
   不会有"先正常显示、脚本才加载完才追加隐藏"这种时序问题，
   也就不会再出现之前那种卡顿时页面空白的情况。直接从地址栏/
   收藏夹/刷新进入主页时没有这个标记，跟平时一样是硬切，不受影响。 */
@keyframes ho2-zoom-enter {
  from { opacity: 0; transform: scale(.88); }
  to { opacity: 1; transform: scale(1); }
}
/* 20261001 修复“登录后工作台顶部一大块空白、顶栏和侧栏被整体顶下去”：
   原来这里用 fill-mode: both，动画播完后 transform: scale(1) 一直留在 .ho2-app 上，
   而带 transform 的元素会成为 position:fixed 后代（顶栏、侧栏）的定位基准，
   于是它们不再贴着浏览器窗口，而是贴着 .ho2-app；再加上 .ho2-body-row 的
   margin-top 会穿透 .ho2-app 折叠，.ho2-app 整体被挤下去 56px，就成了那块空白。
   现在：① 只用 backwards（播完不留任何样式）；② .ho2-app 用 flow-root 挡住外边距折叠，
   动画播放期间顶栏也不会错位。 */
.ho2-app { display: flow-root; }
html[data-enter="zoom"] .ho2-app { animation: ho2-zoom-enter .45s var(--ho2-motion-spring) backwards; }

/* ---------------- 顶部条（桌面端） ----------------
   20260930 顶栏也改成真正固定：原因跟侧边栏那次一样——html,body 的
   overflow-x:hidden 让 body 被动获得 overflow-y:auto，sticky 的定位基准
   变成了这个"看似能滚、实际不滚"的 body，顶栏的 sticky 其实也没真正生效，
   滚动主内容区时顶栏会跟着一起滚走。改成 position:fixed 直接锚定视口，
   不再依赖任何中间滚动容器。顶栏脱离文档流后，下面 .ho2-body-row 用
   margin-top:56px（顶栏高度）让出这块空间，视觉效果不变。 */
.ho2-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 56px; display: flex; align-items: center;
  gap: 18px; padding: 0 18px; background: var(--ho2-topbar); color: var(--ho2-topbar-ink);
  box-shadow: 0 2px 10px var(--ho2-shadow);
}
.ho2-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ho2-brand-logo {
  height: 40px; width: 40px; border-radius: 9px; background: #f8f7f2; overflow: hidden; flex: 0 0 auto;
  display: inline-grid; place-items: center;
}
.ho2-brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ho2-crumb { color: rgba(255,255,255,.42); font-size: 13px; margin: 0 2px; }
.ho2-crumb-current { color: var(--ho2-topbar-ink); font-size: 16px; font-weight: 700; }
.ho2-spacer { flex: 1; }
.ho2-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.6); white-space: nowrap; }
.ho2-store-name { font-size: 13.5px; font-weight: 700; color: var(--ho2-topbar-ink); }
.ho2-store-name.is-unset { font-weight: 600; color: rgba(255,255,255,.45); }
.ho2-meta-divider { color: rgba(255,255,255,.28); }
.ho2-member-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  background: rgba(255,255,255,.09); color: var(--ho2-topbar-ink); font-size: 12.5px; font-weight: 700;
}
.ho2-member-badge .status-dot { width: 6px; height: 6px; }
.ho2-icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,.08); color: var(--ho2-topbar-ink); border: none; cursor: pointer; font-size: 13px;
}
.ho2-icon-btn:hover { background: rgba(255,255,255,.16); }
/* 退出登录：刻意不用 --ho2-danger（那是留给真正不可逆的破坏性操作的），
   但也不能沿用图标按钮默认的半透明灰底——之前就是这个灰底导致"退出登录看起来
   像没做样式"的问题。这里用强调色打底，跟"退出登录不是危险操作"的既定约定
   保持一致，同时让它在顶栏里足够醒目、一眼能找到。 */
.ho2-icon-btn.js-logout-btn { background: var(--ho2-accent); color: var(--ho2-accent-ink); }
.ho2-icon-btn.js-logout-btn:hover { background: var(--ho2-accent); filter: brightness(1.08); }

/* 通知未读数角标：桌面顶栏 + 移动应用栏图标按钮共用，见下面 .ho2-m-icon-btn。
   故意用强调色（天蓝）而不是危险色（红），这个项目里红色专门留给真正的删除类
   操作（见 2.12 节强调色改版说明），未读提醒不是"危险"，不需要抢红色的语义。 */
.ho2-notify-badge {
  position: absolute; top: -3px; right: -3px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--ho2-accent); color: var(--ho2-accent-ink); font-size: 10px; font-weight: 800;
  display: inline-grid; place-items: center; line-height: 1; pointer-events: none; box-shadow: 0 0 0 2px var(--ho2-topbar);
}
.ho2-notify-badge[hidden] { display: none; }

/* 状态指示点/文字：会员徽章（试用中/已过期/已生效）与业务状态通用的三色语义 */
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.status-dot.pending { background: var(--ho2-blue); }
.status-dot.overdue { background: var(--ho2-overdue); }
.status-dot.done { background: var(--ho2-green); }
.status-text.pending { color: var(--ho2-blue); }
.status-text.overdue { color: var(--ho2-overdue); }
.status-text.done { color: var(--ho2-green); }
.status-dot-row { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }

/* ---------------- 外层布局 ---------------- */
/* 20260930 改回"真正固定"：上面 20260929 那次把 sticky 配 min-height，
   目的是让侧边栏跟主内容区共用同一条页面滚动条，副作用是页面整体比一屏
   长的时候（多数功能页都比一屏长）侧边栏会跟着一起往上滚走，用户反馈
   "左边的导航要固定死，不要跟着右边内容上下滑动"。
   先试了 position: sticky + 高度锁定 calc(100vh - 56px)，本地测试发现
   完全不生效——根因是上面 html,body 那条全局规则设了 overflow-x: hidden，
   按 CSS 规范，一个轴显式设成非 visible、另一个轴没设时，另一个轴会被
   计算成 auto，这样 body 也被动获得了 overflow-y: auto，变成了一个"自己
   也是滚动容器"的元素——但 body 高度本来就是跟着内容撑起来的，它自身并
   不会真的产生内部滚动（真正滚动的是 html/viewport），于是 .ho2-sidebar
   的 sticky 定位基准就变成了这个"看起来能滚、实际不滚"的 body，而不是
   真正在滚动的视口，导致 sticky 完全失效、侧边栏跟着主内容区 1:1 往上滚，
   跟改之前没有区别。
   改成 position: fixed，直接锚定视口本身（top:56 贴在顶栏下方、left:0、
   bottom:0），不依赖任何中间滚动容器，不会再被这条全局 overflow 规则
   影响。固定定位会让侧边栏脱离 .ho2-body-row 的 flex 布局，改用
   margin-left: 224px（等于侧边栏宽度）把 .ho2-body-row 整体让出等宽的
   左侧空间，视觉效果和以前侧边栏在文档流里占位时完全一样；这条 margin
   只在桌面端生效，下面 900px 媒体查询里侧边栏隐藏时一并清零，避免移动端
   主内容区平白多出一块空白。
   侧边栏自己的滚动条继续保持"始终可见的细滚动条"（下面 ::-webkit-scrollbar
   系列 + Firefox 的 scrollbar-width/scrollbar-color）：导航项多的账号
  （比如账户分组比普通用户多"管理台""添加到主屏幕"两项的管理员账号）在
   矮一点的浏览器窗口里，侧边栏自身高度不够时能一眼看到"这里还能往下
   滚"，不会重蹈 20260929 之前那次"用默认几乎看不见的系统滚动条"的覆辙。 */
.ho2-body-row { display: flex; min-height: calc(100vh - 56px); margin-left: 224px; margin-top: 56px; }
.ho2-sidebar {
  width: 224px; background: var(--ho2-sidebar); border-right: 1px solid var(--ho2-line);
  padding: 16px 10px 24px; position: fixed; top: 56px; left: 0; bottom: 0; z-index: 20;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--ho2-line) transparent;
}
.ho2-sidebar::-webkit-scrollbar { width: 6px; }
.ho2-sidebar::-webkit-scrollbar-track { background: transparent; }
.ho2-sidebar::-webkit-scrollbar-thumb { background: var(--ho2-line); border-radius: 999px; }
.ho2-sidebar::-webkit-scrollbar-thumb:hover { background: var(--ho2-muted); }
.ho2-side-group { margin-bottom: 6px; }
.ho2-side-group-label {
  padding: 10px 10px 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ho2-muted);
}
.ho2-side-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; margin-bottom: 2px;
  color: var(--ho2-ink); text-decoration: none; font-size: 13px; font-weight: 600; cursor: pointer; border: none;
  background: transparent; width: 100%; text-align: left;
}
.ho2-side-link:hover { background: var(--ho2-surface-alt); }
.ho2-side-link.is-active { background: var(--ho2-accent-soft); color: var(--ho2-accent); }
.ho2-side-link-danger { color: var(--ho2-muted); }
.ho2-side-link-danger:hover { background: var(--ho2-accent-soft); color: var(--ho2-accent); }
.ho2-side-badge {
  margin-left: auto; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--ho2-danger);
  color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center;
}

/* 20260929 宽屏（如超宽显示器）下交接本/发票台账这类表格页内容不设上限会
   一路拉到跟侧边栏一样宽，表格/卡片被撑得很松散，页面视觉重心也跟着往上
   飘（下面全是空白）。这里给内容区加个合理的最大宽度，配合 flex 的 auto
   margin 在侧边栏右侧的剩余空间里居中；宽度不到上限时（多数笔记本屏、
   平板、手机）行为完全不变，只有超宽屏才会生效，不影响现有布局。 */
.ho2-main { flex: 1; min-width: 0; max-width: 1400px; margin: 0 auto; padding: 22px 26px 60px; }
.ho2-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.ho2-page-head h1 { font-size: 20px; font-weight: 800; }
.ho2-page-head p { margin: 5px 0 0; color: var(--ho2-muted); font-size: 13.5px; }

/* ---------------- 通用按钮 / 卡片 ---------------- */
.ho2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; cursor: pointer;
  border-radius: 8px; padding: 9px 15px; font: 700 13.5px inherit; transition: filter .12s ease, transform .1s ease;
  white-space: nowrap;
}
.ho2-btn:active { transform: translateY(1px); }
.ho2-btn-accent { background: var(--ho2-accent); color: var(--ho2-accent-ink); }
.ho2-btn-accent:hover { filter: brightness(1.05); }
.ho2-btn-ghost { background: var(--ho2-surface-alt); color: var(--ho2-ink); border: 1px solid var(--ho2-line); }
.ho2-btn-ghost:hover { border-color: var(--ho2-accent); color: var(--ho2-accent); }
/* 真正会删除数据的危险操作按钮：跟其它按钮的天蓝色强调色区分开，固定用红色，
   不随全站强调色改版变化（站长要求"危险操作保留红色"）。 */
.ho2-btn-ghost.is-danger:hover { border-color: var(--ho2-danger); color: var(--ho2-danger); }
.ho2-btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.ho2-btn:disabled { opacity: .5; cursor: not-allowed; }
.ho2-card { background: var(--ho2-surface); border: 1px solid var(--ho2-line); border-radius: 12px; box-shadow: 0 6px 20px var(--ho2-shadow); }

/* ---------------- 表单控件（统一高度，弹窗和页面内表单通用） ---------------- */
.ho2-field-grid { display: grid; gap: 14px; }
.ho2-field { display: grid; gap: 6px; }
.ho2-field label { font-size: 12.5px; font-weight: 800; color: var(--ho2-muted); letter-spacing: .01em; }
.ho2-field-input, .ho2-field-select, .ho2-field-textarea, .ho2-field-date {
  height: 38px; padding: 0 12px; border: 1px solid var(--ho2-line); border-radius: 8px; background: var(--ho2-surface-alt);
  color: var(--ho2-ink); font: 600 13px inherit; width: 100%;
}
.ho2-field-textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; font-weight: 500; line-height: 1.6; }
.ho2-field-input:focus, .ho2-field-select:focus, .ho2-field-textarea:focus, .ho2-field-date:focus {
  outline: none; border-color: var(--ho2-accent); box-shadow: 0 0 0 3px var(--ho2-accent-soft);
}
.ho2-field-date { font-variant-numeric: tabular-nums; color-scheme: light; cursor: pointer; }
:root:not([data-theme="light"]) .ho2-field-date { color-scheme: dark; }
.ho2-field-date::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
.ho2-field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------------- 弹窗（设置、更多菜单等共用弹窗外壳） ---------------- */
dialog.ho2-dialog { padding: 0; border: 0; border-radius: 16px; box-shadow: 0 30px 80px rgba(15, 20, 30, .35); width: min(460px, calc(100vw - 40px)); overflow-x: hidden; background: var(--ho2-surface); color: var(--ho2-ink); }
dialog.ho2-dialog::backdrop { background: rgba(15, 20, 30, .45); backdrop-filter: blur(2px); }
.ho2-dialog-inner { padding: 22px 24px 24px; }
.ho2-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ho2-dialog-head h3 { font-size: 16px; }
.ho2-dialog-close { border: none; background: var(--ho2-surface-alt); width: 26px; height: 26px; border-radius: 7px; color: var(--ho2-muted); cursor: pointer; font-size: 14px; }
.ho2-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ho2-dialog-error { min-height: 16px; margin-top: 8px; color: var(--ho2-danger); font-size: 13px; font-weight: 700; }
.ho2-dialog-hint { margin: 0 0 16px; color: var(--ho2-muted); font-size: 12.5px; line-height: 1.6; }

/* 「添加到主屏幕」引导弹窗：iOS / 微信内置浏览器点击按钮后显示的图文步骤。
   iOS 这份用的是实机截图（真机操作 + 红色标注），保证跟用户手机上看到的
   系统菜单长得一模一样，不是随便画的示意图；弹窗内容可能比较高（4 张图
   一次性铺开），下面单独给这个弹窗的 .ho2-dialog-inner 加了滚动。 */
#ho2-add-home-dialog .ho2-dialog-inner { max-height: min(680px, calc(100dvh - 40px)); overflow-y: auto; overscroll-behavior: contain; }
.ho2-add-home-steps { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.ho2-add-home-steps li { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.6; color: var(--ho2-ink); }
.ho2-add-home-steps li p { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
/* 纯文字版（没有配图的微信引导）：数字圆点跟文字放一行，不用换成上下堆叠 */
.ho2-add-home-steps-text li { flex-direction: row; align-items: flex-start; gap: 8px; }
.ho2-add-home-step-no {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px;
  border-radius: 999px; background: var(--ho2-accent); color: var(--ho2-accent-ink); font-size: 11.5px; font-weight: 800;
}
/* 之前这里文字是散落在 flex 容器里的裸文本节点 + <strong>，每一段都会被当成
   独立的 flex item，导致换行时东一块西一块很难读；现在统一包进这一个 span
   里，让它作为唯一的文字 flex item，标点和加粗片段就能按正常段落规则换行。 */
.ho2-add-home-step-text { flex: 1 1 auto; min-width: 0; }
.ho2-add-home-shot { border-radius: 12px; overflow: hidden; border: 1px solid var(--ho2-line); background: var(--ho2-surface-alt); }
.ho2-add-home-shot img { display: block; width: 100%; height: auto; }

/* 门店与人员设置：工作人员名单的标签行 */
.ho2-roster-row { display: flex; gap: 8px; align-items: center; }
.ho2-field-input.has-pending-warning {
  border-color: var(--ho2-danger);
  box-shadow: 0 0 0 3px var(--ho2-danger-soft);
  animation: ho2-roster-shake 300ms ease-in-out;
}
.ho2-roster-pending-warning {
  margin: 7px 0 0; color: var(--ho2-danger); font-size: 13px; font-weight: 700; line-height: 1.4;
}
@keyframes ho2-roster-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
.ho2-roster-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ho2-roster-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px 6px 12px; border-radius: 999px;
  background: var(--ho2-surface-alt); border: 1px solid var(--ho2-line); font-size: 13px; font-weight: 700;
}
.ho2-roster-chip button {
  border: none; background: none; color: var(--ho2-muted); cursor: pointer; width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px;
}
.ho2-roster-chip button:hover { background: var(--ho2-accent-soft); color: var(--ho2-accent); }
.ho2-roster-empty { color: var(--ho2-muted); font-size: 13px; margin-bottom: 14px; }
dialog.ho2-pending-name-dialog {
  position: fixed; z-index: 1000; width: min(420px, calc(100vw - 40px));
}
.ho2-pending-name-copy { margin: 0; color: var(--ho2-muted); font-size: 14px; line-height: 1.7; }
.ho2-pending-name-copy strong { color: var(--ho2-ink); word-break: break-all; }
.ho2-pending-name-actions { display: flex; flex-direction: column; align-items: stretch; gap: 9px; margin-top: 20px; }
.ho2-pending-name-actions .ho2-btn { width: 100%; min-height: 44px; white-space: normal; }
.ho2-btn-text { background: transparent; color: var(--ho2-muted); }
.ho2-btn-text:hover { color: var(--ho2-ink); background: var(--ho2-surface-alt); }

@media (prefers-reduced-motion: reduce) {
  .ho2-field-input.has-pending-warning { animation: none; }
  html[data-enter="zoom"] .ho2-app { animation: none; }
}

/* 通知中心：管理员推送通知列表（点顶栏🔔图标打开，也会在有新通知时自动弹出） */
.ho2-notify-list-head { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.ho2-notify-list { display: flex; flex-direction: column; gap: 8px; max-height: min(60vh, 420px); overflow-y: auto; }
.ho2-notify-item {
  border: 1px solid var(--ho2-line); border-radius: 10px; padding: 11px 13px; background: var(--ho2-surface-alt);
}
.ho2-notify-item.is-unread { border-color: var(--ho2-accent); background: var(--ho2-accent-soft); }
.ho2-notify-item-body { font-size: 13.5px; line-height: 1.6; color: var(--ho2-ink); white-space: pre-wrap; word-break: break-word; }
.ho2-notify-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.ho2-notify-item-time { font-size: 12px; color: var(--ho2-muted); }
.ho2-notify-item-read-btn {
  border: none; background: var(--ho2-accent); color: var(--ho2-accent-ink); font: 700 11.5px inherit;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.ho2-notify-item-read-btn:hover { filter: brightness(1.05); }
.ho2-notify-empty { color: var(--ho2-muted); font-size: 13px; text-align: center; padding: 24px 0; }

/* ---------------- 轻提示 ---------------- */
.ho2-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(12px); opacity: 0;
  background: var(--ho2-ink); color: var(--ho2-bg); padding: 10px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,.25); transition: opacity .2s ease, transform .2s ease; pointer-events: none; z-index: 80;
  max-width: min(420px, calc(100% - 40px)); text-align: center;
}
.ho2-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.ho2-toast.is-error { background: var(--ho2-danger); color: #fff; }

/* 全站同类新增操作统一使用这一 FAB 规格；当前交接本率先接入。 */
.ho2-fab {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ho2-accent);
  color: var(--ho2-accent-ink);
  box-shadow: 0 6px 16px rgba(59, 130, 246, .35);
  cursor: pointer;
  z-index: 40;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.ho2-fab svg { width: 40%; height: 40%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.ho2-fab:hover { filter: brightness(1.06); box-shadow: 0 8px 20px rgba(59, 130, 246, .42); }
.ho2-fab:focus-visible { outline: 3px solid rgba(59, 130, 246, .32); outline-offset: 4px; }
.ho2-fab:active { transform: scale(.94); }

@media (max-width: 900px) {
  .ho2-fab {
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    width: 64px;
    height: 64px;
  }
}

/* ============================================================
   移动端（<900px）：应用栏 + "更多"抽屉
   跟桌面端共用同一份账号/门店/会员状态，共用元素用 js-* 类名标记，
   由 ho2-shell.js 统一更新。
   ============================================================ */
.ho2-m-shell { display: none; }

@media (max-width: 900px) {
  .ho2-desktop-shell { display: none; }
  .ho2-m-shell { display: flex; flex-direction: column; min-height: 100vh; position: relative; background: var(--ho2-bg); }
  .ho2-field-row-2 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   移动端切换（单主内容版）：适用于"外壳（顶栏/侧边栏 vs 应用栏/更多抽屉）
   做真正的双态切换，但页面主内容本身只有一份、靠 CSS 自适应排布"的页面
   （比如点评分计算、点评文案）——这类页面的主内容里往往有脚本按唯一 id
   （而不是 js-* 共用 class）直接操作 DOM，不能像交接本那样把主内容整个复制
   一份给移动端，否则同一个 id 出现两次，脚本只会绑定到第一份。
   交接本本身主内容也做了完整的双态（表格 vs 卡片列表），走的是它自己
   handover.css 里 .ho2-desktop-shell / .ho2-m-shell 那一套，不用这里。
   ------------------------------------------------------------ */
.ho2-m-appbar, .ho2-m-storebar { display: none; }
@media (max-width: 900px) {
  .ho2-topbar, .ho2-sidebar { display: none; }
  .ho2-m-appbar, .ho2-m-storebar { display: flex; }
  /* 侧边栏在这个断点直接隐藏，上面桌面端专用的 margin-left:224px（给固定
     定位的侧边栏让位置）要一并清零，不然主内容区会莫名其妙左边多一块
     224px 的空白。 */
  /* 20260930 移动端应用栏/门店条也改成真正固定，原因跟桌面顶栏一样（见上面
     .ho2-topbar 的注释）：sticky 在这个站点的 overflow-x:hidden 全局规则下
     不会真正生效。两者都用 var(--ho2-topbar) 同一个纯色背景，固定高度上
     一两像素的误差肉眼分不出来，body-row 的 margin-top 直接按两者高度之和
     留white，不需要像素级精确对齐。 */
  .ho2-body-row { display: block; margin-left: 0; margin-top: 106px; }
  .ho2-main { padding: 16px 14px 50px; }
}

.ho2-m-appbar {
  flex: 0 0 auto; align-items: center; gap: 10px; padding: 14px 14px 10px;
  background: var(--ho2-topbar); color: var(--ho2-topbar-ink); position: fixed; top: 0; left: 0; right: 0; z-index: 30;
}
.ho2-m-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: #f8f7f2; flex: 0 0 auto; }
.ho2-m-title { font-size: 17px; font-weight: 800; color: #fff; }
.ho2-m-appbar-spacer { flex: 1; }
.ho2-m-icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255,255,255,.09); color: var(--ho2-topbar-ink); border: none; cursor: pointer; font-size: 15px;
}
/* 同上：移动端应用栏的退出登录图标，强调色打底而不是危险色/默认灰底。 */
.ho2-m-icon-btn.js-logout-btn { background: var(--ho2-accent); color: var(--ho2-accent-ink); }
.ho2-m-storebar {
  flex: 0 0 auto; align-items: center; gap: 8px; padding: 9px 14px; flex-wrap: wrap;
  background: var(--ho2-topbar); color: rgba(255,255,255,.6); font-size: 12.5px; font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.08); position: fixed; top: 54px; left: 0; right: 0; z-index: 29;
}
.ho2-m-store-name { color: var(--ho2-topbar-ink); font-weight: 700; }
.ho2-m-store-name.is-unset { color: rgba(255,255,255,.45); font-weight: 600; }
.ho2-m-member-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 3px 4px;
  color: var(--ho2-topbar-ink); font-size: 12.5px; font-weight: 700;
}

/* "更多"抽屉：桌面保持紧凑的右下浮层，手机端切成通栏底部抽屉。 */
dialog.ho2-sheet {
  position: fixed; margin: 0; inset: auto 20px 20px auto;
  width: min(420px, calc(100vw - 40px)); max-width: 420px; max-height: min(760px, calc(100dvh - 40px));
  border-radius: 18px;
}
dialog.ho2-sheet .ho2-dialog-inner {
  display: flex; flex-direction: column; max-height: inherit; padding: 20px 22px 22px;
}
dialog.ho2-sheet .ho2-dialog-head { flex: 0 0 auto; margin-bottom: 12px; }
dialog.ho2-sheet .ho2-dialog-close {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  font-family: inherit; font-size: 20px; line-height: 1;
}
.ho2-menu-list {
  display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 4px;
  overflow-y: auto; overscroll-behavior: contain;
}
.ho2-menu-item {
  box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px;
  padding: 11px 12px; border: none; border-radius: 10px; background: transparent; color: var(--ho2-ink);
  text-align: left; text-decoration: none; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.35;
  letter-spacing: normal; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.ho2-menu-item:active, .ho2-menu-item:hover { background: var(--ho2-surface-alt); }
.ho2-menu-item.is-active { background: var(--ho2-accent-soft); color: var(--ho2-accent); }
.ho2-menu-item-danger { color: var(--ho2-muted); }
.ho2-menu-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ho2-accent);
  color: #fff; font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center;
}
.ho2-menu-group-label {
  margin-top: 20px; padding: 0 8px 4px; color: var(--ho2-muted);
  font-size: 13px; font-weight: 800; line-height: 1.3; letter-spacing: .07em; text-transform: uppercase;
}
.ho2-menu-group-label:first-child { margin-top: 0; }

@media (max-width: 900px) {
  dialog.ho2-sheet {
    inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 88dvh;
    border-radius: 22px 22px 0 0;
  }
  dialog.ho2-sheet .ho2-dialog-inner {
    padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  }
  dialog.ho2-sheet .ho2-dialog-head { margin-bottom: 10px; }
  dialog.ho2-sheet .ho2-dialog-close { width: 38px; height: 38px; font-size: 22px; }
  .ho2-menu-item { min-height: 48px; padding: 14px 12px; font-size: 16px; line-height: 20px; }
  .ho2-pending-name-actions .ho2-btn { min-height: 48px; }
}

/* iOS Safari 会在聚焦小于 16px 的表单控件时自动放大页面。 */
@media (max-width: 900px) {
  body.ho2-body input,
  body.ho2-body select,
  body.ho2-body textarea { font-size: 16px; }
}

/* 全站共享的圆角线性 SVG 图标。图形由 ui-icons.js 统一输出，颜色继承所在组件。 */
.ui-icon-svg {
  display: block; width: 1em; height: 1em; flex: 0 0 auto;
  overflow: visible; pointer-events: none;
}
.ho2-icon-btn > .ui-icon-svg { width: 17px; height: 17px; }
.ho2-m-icon-btn > .ui-icon-svg { width: 16px; height: 16px; }
.ho2-dialog-close > .ui-icon-svg,
.modal-close > .ui-icon-svg { width: 15px; height: 15px; margin: auto; }
.ui-nav-icon {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px;
  border-radius: 8px; background: var(--ho2-blue-soft); color: var(--ho2-blue);
  transition: transform .18s ease, background-color .18s ease;
}
.ui-nav-icon .ui-icon-svg { width: 15px; height: 15px; }
.ho2-side-link { gap: 9px; }
.ho2-side-link:hover .ui-nav-icon,
.ho2-side-link.is-active .ui-nav-icon,
.ho2-menu-item:hover .ui-nav-icon,
.ho2-menu-item.is-active .ui-nav-icon { transform: translateY(-1px); background: var(--ho2-accent-soft); color: var(--ho2-accent); }
.ui-feature-dashboard { background: #e5f4ff; color: #168ed1; }
.ui-feature-review_copy { background: #e8f3ff; color: #3978c6; }
.ui-feature-social_copy { background: #f0ecff; color: #7863c6; }
.ui-feature-ctrip_score { background: #e8f8f5; color: #258b7f; }
.ui-feature-hot_events { background: #fff1e8; color: #d7773b; }
.ui-feature-handover { background: #eaf2ff; color: #4c78b8; }
.ui-feature-scheduling { background: #e6f1fb; color: #2f78b4; }
.ui-feature-minor_registration { background: #e8f7f4; color: #268f83; }
.ui-feature-feedback { background: #f2edff; color: #775fbd; }
.ui-feature-settings,.ui-feature-account { background: #eef1f6; color: #65758a; }
.ui-feature-payment { background: #fff2df; color: #bd7b22; }
.ui-feature-admin { background: #e9efff; color: #506fc4; }

/* 20260930 H5 门店条：店名较长换行时，会员状态也靠左，不再单独挂在右下角。
   两个元素用 space-between：同一行放得下就"店名靠左、会员靠右"；放不下换行后
   各占一行都从左边开始。 */
@media (max-width: 900px) {
  .ho2-m-storebar { justify-content: space-between; text-align: left; }
  .ho2-m-store-name { max-width: 100%; text-align: left; overflow-wrap: anywhere; }
  .ho2-m-member-badge { margin-left: 0; text-align: left; }
}


/* 20261001 页面切换不再整页闪一下：
   点左侧功能后，顶栏和侧栏保持原位不动，只有中间内容淡入淡出。
   用的是浏览器的「跨页面视图过渡」（Chrome / Edge 126+、Safari 18.2+）；不支持的浏览器会忽略这几条，
   仍然是普通跳转，功能不受影响。顶栏、侧栏、手机端顶部条和底部标签栏各自单独成层，切页时不参与整页淡入淡出。 */
@media (min-width: 901px) { @view-transition { navigation: auto; } }
/* 20261002 手机端（≤900px）整页切换不再做"淡入淡出"过渡：iOS 上这个过渡会让顶部状态栏一带出现一段模糊渐变，
   切页也不自然。手机端改成直接切换（配合各页先用缓存数据秒出内容、后台静默刷新）。
   上面把 @view-transition 限定在电脑端；下面这条是兜底——万一浏览器仍然在手机端触发了过渡，也让它瞬间完成、不播任何动画。 */
@media (max-width: 900px) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
.ho2-topbar { view-transition-name: ho2-topbar; }
.ho2-sidebar { view-transition-name: ho2-sidebar; }
.ho2-m-appbar { view-transition-name: ho2-m-appbar; }
.ho2-m-storebar { view-transition-name: ho2-m-storebar; }
.ho2-tabbar { view-transition-name: ho2-tabbar; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .14s; animation-timing-function: ease-out; }
::view-transition-old(ho2-topbar), ::view-transition-new(ho2-topbar),
::view-transition-old(ho2-sidebar), ::view-transition-new(ho2-sidebar),
::view-transition-old(ho2-m-appbar), ::view-transition-new(ho2-m-appbar),
::view-transition-old(ho2-m-storebar), ::view-transition-new(ho2-m-storebar),
::view-transition-old(ho2-tabbar), ::view-transition-new(ho2-tabbar) { animation-duration: .001s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
