h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ==========================================================================
   PIGEONERP BS 版样式
   设计取向：内部企业系统，信息密度优先，视觉克制。
   浅色主题，与旧 WinForms 的灰底风格保持亲近感，降低员工迁移成本。
   ========================================================================== */

:root {
    --bg: #F5F6F8;
    --surface: #FFFFFF;
    --border: #E3E5E9;
    --border-strong: #CDD1D8;
    --text: #1F2328;
    --text-2: #5B616E;
    --text-3: #8B9098;
    --brand: #1B5E8C;
    --brand-dark: #164D73;
    --brand-light: #E8F1F8;
    --danger: #C0392B;
    --danger-bg: #FDECEA;
    --radius: 8px;
    --radius-lg: 12px;

    /* 【等宽字体栈：为什么这么长】
       各引擎/系统的等宽字体可用性差别很大，写短了就会「各家显示不一样」：
         · ui-monospace —— 只有 Safari 认（Chrome/Firefox 会跳过）
         · SF Mono      —— macOS 自带，但要求装过 Xcode 命令行工具
         · Menlo        —— macOS 老牌等宽，几乎都有
         · Consolas     —— Windows 标配（Vista 以后），缺了会落到 Courier New
         · Roboto Mono / DejaVu Sans Mono —— Android / Linux 常见
         · monospace    —— 最终兜底（各系统映射不同，中文环境常落到宋体，
                          这就是表格里数字粗细/宽度不一致的根源）
       前四个覆盖了 Mac + Windows 主流情况，最后两个补移动端与 Linux。 */
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
                 "Roboto Mono", "DejaVu Sans Mono", monospace;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    /* 字体栈顺序按「各平台最舒服的中文渲染」排：
       -apple-system/BlinkMacSystemFont → Mac/iOS 用系统字体（苹方），最贴合原生观感
       PingFang SC → 旧版 macOS 兼底
       Microsoft YaHei → Windows 中文字体（缺了会落到 SimSun 宋体，界面会显旧）
       Segoe UI → Windows 西文
       Noto Sans CJK SC / Source Han Sans → Linux 常见
       Helvetica Neue / Arial → 西文最终兜底
       最后 sans-serif 交给系统。 */
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
                 "Segoe UI", "Noto Sans CJK SC", "Source Han Sans SC",
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ───────────── 应用外壳 ───────────── */
/* 【100vh 在移动端浏览器上不是「可见高度」】
   iOS Safari / Android Chrome 的视口高度会把地址栏、工具栏算进去：
   100vh = 「地址栏隐藏时」的高度。地址栏显示时，底部一截就被顶到屏幕外，
   而本布局是 height:100vh + overflow:hidden（外层锁死、内部滚动），
   于是页面底部的内容（分页条、表格最后一行）会被挡住且滚不到。
   dvh（dynamic viewport height）随地址栏显隐实时变化，是正确解法。
   保留 100vh 作为不支持 dvh 的老浏览器兜底，支持则被下面这段覆盖。 */
.app-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
@supports (height: 100dvh) {
    .app-shell { height: 100dvh; }
}

.app-header {
    display: flex; align-items: center; gap: 20px;
    height: 52px; padding: 0 16px;
    background: var(--brand); color: #fff; flex-shrink: 0;
}

.app-brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

.app-logo {
    display: grid; place-items: center;
    width: 28px; height: 28px;
    background: rgba(255,255,255,.2); border-radius: 7px;
    font-weight: 600; font-size: 15px;
}

.app-name { font-size: 15px; font-weight: 600; letter-spacing: .02em; }

/* 多标签工作区 —— 替代旧系统 MDI 多窗口 */
.app-tabs {
    display: flex; align-items: center; gap: 3px;
    flex: 1; overflow-x: auto; scrollbar-width: none;
}
.app-tabs::-webkit-scrollbar { display: none; }

.app-tab {
    display: inline-flex; align-items: center; gap: 7px;
    height: 30px; padding: 0 10px; border-radius: 6px;
    color: rgba(255,255,255,.82); font-size: 13px;
    white-space: nowrap; transition: background .12s;
}
.app-tab:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.app-tab.active { background: rgba(255,255,255,.22); color: #fff; font-weight: 500; }

.tab-close {
    display: grid; place-items: center;
    width: 16px; height: 16px; border-radius: 4px;
    font-size: 15px; line-height: 1; opacity: .6; cursor: pointer;
}
.tab-close:hover { background: rgba(255,255,255,.25); opacity: 1; }

.app-user { display: flex; align-items: center; gap: 11px; flex-shrink: 0; font-size: 13px; }
.user-name { font-weight: 500; }
.user-badge { padding: 2px 8px; background: rgba(255,255,255,.18); border-radius: 10px; font-size: 11.5px; }
.logout-link { color: rgba(255,255,255,.82); }
.logout-link:hover { color: #fff; }

/* ══════════════════════════════════════════════════════════════
   【为什么 .app-body 从 overflow:hidden 改成 visible】
   飞出菜单是 position:absolute，要越过侧栏右缘显示在主内容区上。
   祖先链上任何一级 overflow 非 visible 都会把它裁掉：
     .app-shell（overflow:hidden，锁整页滚动）
     .app-body （原 overflow:hidden）
     .app-sidebar（原 overflow-y:auto）
   实测被裁时 elementFromPoint 在 x=219 落回 .app-main、
   飞出层只显示 9px 就被切掉，现象是"菜单闪一下消失"。

   改法的安全性：
     · 纵向滚动本来就不靠 .app-body —— .app-main 已是 overflow-y:auto，
       自己滚自己的；侧栏一级菜单 10 项一屏放得下，不需要滚。
     · 横向溢出：内容区宽度由 flex 约束（.app-main flex:1），
       不会因为这里放开就超出视口。
   .app-shell 的 overflow:hidden 保留不动 —— 它锁住整页滚动，
   而飞出层向上不会超出 .app-body 的顶边（只在侧栏范围内），
   实测不受它裁剪。
   ══════════════════════════════════════════════════════════════ */
.app-body { display: flex; flex: 1; overflow: visible; min-height: 0; }

.app-sidebar {
    width: 218px; flex-shrink: 0;
    padding: 10px 0 24px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    /* 【必须去掉 overflow-y:auto】飞出菜单是 position:absolute，
       超出侧栏右边界。父级一旦有 overflow 非 visible，飞出部分会被裁掉。
       内容超出时改由 .menu-scroll 内部滚动（见下）。 */
    overflow: visible;

    /* ══════════════════════════════════════════════════════════════
       【必须有 position + z-index，否则飞出菜单被主内容区盖住、点不动】
       现象：飞出层的文字看得见，但点不下去 —— elementFromPoint 命中的是
       工作台页面的 .module-card，不是链接本身。

       原因：.app-sidebar 与 .app-main 都是**无定位**的普通块，
       层叠顺序纯按 DOM 顺序决定 —— .app-main 在后面，它的内容就画在上面。
       飞出层的 z-index:60 只在**它自己的层叠上下文**里有效，
       而外层没有建立上下文时，它跟 .app-main 的卡片同属根上下文，
       比较的是两者各自的 z-index（卡片没设 = auto），
       但 .app-main 因 DOM 顺序在后而胜出。

       修法：给侧栏 position:relative + z-index 建立层叠上下文，
       让整棵侧栏（含飞出层）**整体**压在内容区之上。
       z-index 取 30：高于 app-main（auto/0），
       低于后续可能出现的浮层（模态框等通常 1000+）。 */
    position: relative;
    z-index: 30;
}

.app-main { flex: 1; padding: 20px 24px 40px; overflow-y: auto; }

/* ════════════════════════════════════════════════════════════════
   侧栏菜单 · 飞出式（flyout）
   ════════════════════════════════════════════════════════════════
   2026-11-25 由"全展开+缩进"改为"只显示一级 + 悬停飞出"。

   【为什么全用 CSS 不用 JS/BLaZor 事件】
   本布局是静态 SSR，C# 事件不会触发（详见 MenuNode.razor 顶部注释）。

   【为什么不用 display:none/block 切换】
   ① 无法做过渡动画（display 不参与 transition），
      出现时会"啪"地弹出，视觉上像故障；
   ② display:none 的元素**不接收鼠标事件**，不好做命中控制。
   所以显隐用 opacity + visibility。

   【显隐时序：出现淡入 0.1s，消失瞬时】
   曾经给消失加过 400ms 延时（让鼠标有机会从父项滑进飞出层）。
   但实测表明**父项与飞出层之间本来就没有空隙**（逐像素扫描
   37 个点全程连续），延时纯属多余，代价却是：
   鼠标沿侧栏往下扫时，上一个面板还挂着 0.4 秒、下一个已打开，
   两个面板叠在页面上，很难看。
   现在：出现极短淡入，消失零延时零过渡。
   ════════════════════════════════════════════════════════════════ */

/* 侧栏内的可滚动容器。
   ══════════════════════════════════════════════════════════════
   【致命陷阱：overflow-x:hidden 会把飞出菜单裁成一条】
   第一版这里写了 overflow-x: hidden（想避免横向滚动条），
   结果飞出层超出侧栏的部分被整个裁掉 ——
   实测 elementFromPoint 在 x=219 就落回 .app-main，
   而飞出层本应延伸到 x=400。表现为"菜单闪一下就没了"，
   且因为元素本身还在（visibility:visible），极难从现象联想到裁剪。

   结论：**飞出式菜单的祖先链上任何一级都不能有非 visible 的 overflow**，
   包括 overflow-x:hidden / overflow:auto 的任一轴。
   （同理 .app-sidebar 从原来的 overflow-y:auto 改成了 visible。）

   那内容太多滚不动怎么办？
   改由 .app-shell 与 .app-body 承担滚动 —— 见文件末尾的说明。
   实际上侧栏一级菜单只有 10 项，一屏放得下，不需要滚动。
   ══════════════════════════════════════════════════════════════ */
.menu-scroll {
    width: 100%;
    padding: 0 8px;

    /* 【必须 border-box】本项目没有全局 box-sizing reset，
       默认 content-box 下 width:100% + 左右各 8px 内边距 = 比侧栏宽 16px，
       实测一级项右缘落在 x=226，而侧栏边框在 219 —— 悬停底色会越过
       侧栏右缘 7px 压到内容区上，飞出层也因此整体偏右，
       想让它"压住侧栏一点"得往左挪 20 多 px，反而盖住菜单箭头。
       加 border-box 后内容宽 202，右缘 210，规规矩矩在边框内侧 8px。 */
    box-sizing: border-box;
}

/* ── 每个一级项（含飞行容器）── */
.menu-branch-flyout {
    position: relative;    /* 飞出层相对它定位 */
    margin-bottom: 1px;
}

/* ── 一行菜单的公共外观（分组标题与叶子链接共用）── */
.menu-leaf-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    cursor: default;
    /* 只对颜色和背景做过渡，不做位移 —— 位移在快速划过时会"抖" */
    transition: background-color .12s ease, color .12s ease;
}

a.menu-leaf-row { cursor: pointer; }

.menu-leaf-row:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

/* 分组激活（当前页在该分组内）：整行淡底 + 左侧竖条 */
.menu-branch-active > .menu-leaf-row {
    background: var(--brand-light);
    color: var(--brand-dark);
    font-weight: 600;
    box-shadow: inset 2px 0 0 var(--brand);
}

/* 当前页：反白 + 左侧竖条，比只换字色好找 */
.menu-link.active {
    background: var(--brand-light);
    color: var(--brand-dark);
    font-weight: 600;
    box-shadow: inset 2px 0 0 var(--brand);
}

/* 飞出提示箭头：CSS 边框画三角，不依赖字体图标
   （字体图标在 macOS / Windows 的字形可能有 1px 差异） */
.menu-caret {
    flex: 0 0 auto;
    width: 0; height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid var(--text-3);
    opacity: .55;
    transition: opacity .12s ease, transform .12s ease;
}

.menu-branch-flyout:hover > .menu-leaf-row > .menu-caret {
    opacity: 1;
    transform: translateX(1px);
}

/* ══════════════════════════════════════════════════════════════
   飞出层本体
   ══════════════════════════════════════════════════════════════ */

.menu-flyout {
    position: absolute;
    /* 与父项顶对齐。原来写 -6px 是为了补偿父项的 padding，
       但那会让飞出层的垂直范围比父项行高出 6px —— 鼠标从父项
       水平移出时纵向已经越过飞出层顶部，反而更难命中。
       改成 0：飞出层顶部与父项行顶部齐平，横向移动必然落在其高度内。 */
    top: 0;

    /* 左移 5px，让面板**压住侧栏右缘约 10px**，视觉上和侧栏连成一体。
       算术（默认侧栏 218px）：侧栏内容右缘 218、边框 219；
       .menu-scroll 内边距 8px → 一级项右缘 210。
       left:100% 时内壳左缘 = 210 + 4 = 214，浮在侧栏外 5px，看着是"飘着的"；
       left:calc(100% - 5px) 时内壳左缘 = 205 + 4 = 209，正压进侧栏 10px。
       一级项右内边距是 10px、箭头右缘在 200 —— 205 起的覆盖碰不到箭头，
       看上去就像面板从侧栏底下"长"出来。 */
    left: calc(100% - 5px);

    /* 【关键 · 措施③】间距用 padding 不用 margin。
       margin 是不可悬停的外部空隙，鼠标经过会断开 :hover；
       padding 是元素内部、照样能命中。
       面板改成重叠后**已经没有缝**了，这 4px 只留给补缝伪元素对齐用，
       不能再写 10px —— 否则内壳又被推回侧栏外面。 */
    padding-left: 4px;

    z-index: 60;

    opacity: 0;
    visibility: hidden;
    transform: translateX(-4px);

    /* ══════════════════════════════════════════════════════════════
       【消失：瞬时，零延时、零过渡】
       ══════════════════════════════════════════════════════════════
       这里原来是 `opacity .14s ease 400ms`（延迟 400ms 再淡出），
       目的是给鼠标留出从父项滑进飞出层的时间。但代价很实在：

       **鼠标沿侧栏往下扫时，上一个菜单的飞出层还挂着 0.4 秒，
       下一个已经打开 —— 两个飞出面板同时压在页面上，非常难受。**

       现在改成零延时。之所以还能保证"滑进去不断"，是因为
       鼠标移动路径上**本来就不存在空隙**（见下面 .menu-branch-flyout::after
       的补缝说明）—— 缝隙一旦补上，延时就不需要了。
       延时是在"有缝"前提下的补丁，缝补好了补丁就该撤。

       注意 transition:none 只作用于**消失**方向：
       CSS 过渡按"目标状态"所在规则取值，出现时目标状态是
       :hover 规则，用的是它自己定义的 transition（见下），
       所以淡入仍然柔和。
       ══════════════════════════════════════════════════════════════ */
    transition: none;
}

/* ══════════════════════════════════════════════════════════════
   补缝热区
   ══════════════════════════════════════════════════════════════
   【这里踩过一个把整个菜单点不动的坑，务必看完再改】

   第一版写的是 `inset: 0`（铺满整个飞出层），本意是让鼠标从任何
   角度进入都先命中飞出层。结果：**飞出层里所有链接都点不下去** ——
   elementFromPoint 在链接中心返回的一直是 DIV.menu-flyout。

   原因：这个 ::before 是 position:absolute 但**没有 z-index**，
   而 .menu-flyout-inner（承载链接的那层）也**没有定位**，
   于是伪元素在层叠上盖住了后面的普通流内容。
   文字看得见（伪元素是透明的），但点击事件全被它吃掉。

   正确做法：**伪元素只负责补"父项与飞出层之间那条缝"**，
   宽度 = padding-left（现在是 4px），高度才铺满。
   菜单内部区域一律留给 .menu-flyout-inner 的链接。

   同时给 inner 加 position:relative + z-index:1，
   双保险：即使将来有人把伪元素改大，链接仍在更上层。 */
.menu-flyout::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;               /* = .menu-flyout 的 padding-left，只补缝 */
    height: 100%;
    /* 完全透明但仍可命中鼠标 */
}

/* 飞出层的视觉外壳。
   position:relative + z-index:1 保证它在补缝伪元素之上 ——
   否则（无定位时）伪元素会盖住链接，导致「看得见、点不动」。 */
.menu-flyout-inner {
    position: relative;
    z-index: 1;

    min-width: 168px;
    max-width: 280px;
    padding: 5px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .10);
}

/* ── 触发：悬停 / 键盘聚焦时显示 ──
   同时挂 :focus-within，让键盘 Tab 也能打开（无障碍，也让某些
   触摸板/远程桌面环境下的焦点行为更可预期）。 */
.menu-branch-flyout:hover > .menu-flyout,
.menu-branch-flyout:focus-within > .menu-flyout {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);

    /* 出现：极短淡入（0.1s）。不设延时，一悬停立刻开始显。
       消失方向不受这里影响 —— 那是基础规则里的 transition:none。 */
    transition: opacity .1s ease, transform .1s ease;
}

/* 二级飞出层（相对二级分组定位）。
   top:-5px 抵消一级面板的 padding，让二级面板顶部和一级面板外框对齐。

   横向：二级同样要压住一级一点。这里覆盖成 -8px（一级是 -6px）——
   二级分组的右缘在一级面板的**内边距里面**（内壳 padding:5px + 1px 边框，
   即右缘离面板外框还有 6px），所以 8 - 4(padding-left) = 内壳比分组右缘
   再左 4px，合起来正好压进一级面板约 10px，和一级压侧栏的幅度一致。
   写 -6px 的话只压进 8px，两级看起来会不一样。 */
.menu-flyout .menu-flyout {
    top: -5px;
    left: calc(100% - 8px);
}

/* 飞出层内部的项：字号略小、内边距略紧，看起来是"下一级" */
.menu-flyout .menu-leaf-row {
    font-size: 13px;
    font-weight: 400;
    padding: 7px 9px;
    white-space: nowrap;      /* 飞出层不换行，宽度按内容自适应 */
}

.menu-flyout .menu-flyout .menu-leaf-row {
    font-size: 12.5px;
    padding: 6px 9px;
}

/* 飞出层内的分组标题：后面还有一个箭头，用稍深的字色区分 */
.menu-flyout .menu-leaf-row .menu-caret { opacity: .45; }

/* 页面尚未迁移的菜单项：保留在菜单里（老员工靠位置认路），
   但视觉降级并打标，点进去看到说明页而不是浏览器 404 白页。 */
.menu-link-pending { color: var(--text-3); }
.menu-link-pending:hover { color: var(--text-2); }
.menu-pending-tag {
    flex: 0 0 auto; font-size: 10px; line-height: 1; padding: 2.5px 5px;
    border-radius: 4px; color: var(--text-3);
    background: var(--bg); border: 1px solid var(--border);
    letter-spacing: .02em;
}

/* ══════════════════════════════════════════════════════════════
   触摸设备 / 无 hover 能力的设备
   ══════════════════════════════════════════════════════════════
   纯 :hover 在触摸屏上没有"悬停"概念，会出现"点一下没反应、
   点两下才跳"的问题（iOS Safari 首次点击元素只为触发 hover）。
   这类设备改为：**不再飞出，把子项平铺在下面**（回到全展开），
   保证一次点击就能进页面。

   判据用 @media (hover: none) —— 比 UA 嗅探可靠：
   Safari（macOS/iOS）、Chrome、Firefox、Edge 均自 Safari 9 /
   Chrome 41 / Firefox 64 起支持该媒体特性。

   注意这里是**改写**而非覆盖：同一批选择器在 (hover:none) 下
   被重定义为静态布局，避免"飞出层不可见却占位"的怪状态。 */
@media (hover: none) {
    .menu-flyout {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 0;
        transition: none;
    }

    .menu-flyout::before { display: none; }

    .menu-flyout-inner {
        border: none;
        box-shadow: none;
        background: transparent;
        padding: 0 0 0 14px;
        min-width: 0;
        max-width: none;
        border-left: 1px solid var(--border);
        margin-left: 10px;
    }

    .menu-caret { display: none; }
}

/* ───────────── 页面通用 ───────────── */
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0 0 4px; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.page-sub { margin: 0; color: var(--text-3); font-size: 13.5px; }

.denied-box {
    max-width: 420px; margin: 80px auto; padding: 28px 30px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-align: center;
}
.denied-box h2 { margin: 0 0 8px; font-size: 17px; }
.denied-box p { margin: 0 0 16px; color: var(--text-2); font-size: 13.5px; }

/* ───────────── 路由兜底页（未迁移 / 地址不存在）───────────── */
.fallback-wrap {
    display: flex; align-items: center; justify-content: center;
    min-height: 62vh; padding: 24px;
}
.fallback-card {
    width: 100%; max-width: 540px; padding: 34px 36px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-align: center;
}
.fallback-icon { font-size: 32px; line-height: 1; margin-bottom: 14px; }
.fallback-card h1 { margin: 0 0 10px; font-size: 19px; font-weight: 600; }
.fallback-lead { margin: 0 0 16px; color: var(--text-2); font-size: 14px; }
.fallback-lead b { color: var(--text); }
.fallback-note {
    padding: 12px 15px; margin-bottom: 20px; text-align: left;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-2);
    font-size: 13px; line-height: 1.7;
}
.fallback-actions { margin-bottom: 16px; }
.fallback-path { color: var(--text-3); font-size: 11.5px; }
.fallback-card code {
    font-family: var(--font-mono);
    font-size: .92em; padding: 1.5px 5px; border-radius: 4px;
    background: var(--bg); border: 1px solid var(--border);
}

.empty-notice {
    padding: 16px 18px; background: #FDF6E3;
    border: 1px solid #F0D89B; border-radius: var(--radius);
    color: #7A5A10; font-size: 13.5px; margin-bottom: 20px;
}

.module-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    gap: 12px; margin-bottom: 26px;
}

.module-card {
    padding: 15px 16px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    transition: border-color .12s, box-shadow .12s;
}
.module-card:hover { border-color: var(--border-strong); box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.module-title { font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.module-desc { font-size: 12.5px; color: var(--text-3); margin-bottom: 9px; }
.module-count { font-size: 12px; color: var(--brand); }
.module-pending { color: var(--text-3); }

.info-panel {
    padding: 16px 18px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg); max-width: 460px;
}
.info-title { font-size: 14px; font-weight: 600; margin-bottom: 11px; }
.info-list { display: grid; grid-template-columns: 92px 1fr; gap: 7px 14px; margin: 0; }
.info-list dt { color: var(--text-3); font-size: 13px; }
.info-list dd { margin: 0; font-size: 13px; }

/* ───────────── 登录页 ───────────── */
.empty-layout { min-height: 100vh; }

.login-wrap {
    display: grid; place-items: center; min-height: 100vh; padding: 24px;
    background: linear-gradient(160deg, #EDF1F5 0%, #F5F6F8 100%);
}

/* 同 .app-shell 的理由：避免地址栏显隐导致卡片上下跳 */
@supports (min-height: 100dvh) {
    .empty-layout { min-height: 100dvh; }
    .login-wrap { min-height: 100dvh; }
}

.login-card {
    width: 100%; max-width: 356px; padding: 34px 32px 26px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: 0 4px 24px rgba(20,40,60,.07);
}

.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }

.login-logo {
    display: grid; place-items: center;
    width: 44px; height: 44px;
    background: var(--brand); color: #fff;
    border-radius: 11px; font-size: 21px; font-weight: 600;
}

.login-title { font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.login-sub { font-size: 12.5px; color: var(--text-3); }

.field { margin-bottom: 15px; }
.field label { display: block; margin-bottom: 5px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.field input {
    width: 100%; height: 38px; padding: 0 11px;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    font: inherit; font-size: 14px; color: var(--text);
    background: var(--surface); transition: border-color .12s, box-shadow .12s;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,94,140,.11); }
.field input:disabled { background: var(--bg); color: var(--text-3); }

.login-error {
    padding: 9px 12px; margin-bottom: 14px;
    background: var(--danger-bg); border: 1px solid #F0B4AC;
    border-radius: var(--radius); color: var(--danger); font-size: 13px;
}

/* 设备待审批：不是「你错了」，只是还没批 —— 用中性色，避免员工以为账号被锁 */
.login-pending {
    padding: 9px 12px; margin-bottom: 14px; line-height: 1.55;
    background: var(--brand-light); border: 1px solid #C0DAEC;
    border-radius: var(--radius); color: var(--brand-dark); font-size: 13px;
}

.login-btn {
    width: 100%; height: 40px; border: 0; border-radius: var(--radius);
    background: var(--brand); color: #fff;
    font: inherit; font-size: 14.5px; font-weight: 500;
    letter-spacing: .06em; cursor: pointer; transition: background .12s;
}
.login-btn:hover:not(:disabled) { background: var(--brand-dark); }
.login-btn:disabled { opacity: .6; cursor: default; }

.login-loading {
    display: grid; place-items: center; gap: 13px;
    padding: 34px 0; color: var(--text-2); font-size: 13.5px;
}

.spinner {
    width: 26px; height: 26px;
    border: 2.5px solid var(--border-strong);
    border-top-color: var(--brand);
    border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-foot {
    margin-top: 20px; padding-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 11.5px; color: var(--text-3); text-align: center;
}

/* ───────────── 数据表格（后续模块共用） ───────────── */
.data-table {
    width: 100%; border-collapse: collapse; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; font-size: 13px;
}

/* 【Safari 不给 border-collapse 表格裁圆角】
   表格同时有 border-collapse: collapse + border-radius + overflow: hidden 时，
   Chrome / Firefox 会把表头背景色裁进圆角，Safari（WebKit）不裁 ——
   四角会露出直角，表头的 #F7F8FA 溢出到圆角外面。
   两端截图对比时这就是「细节差异」的来源之一。
   修法：单独给首尾单元格补圆角（比切 border-collapse: separate 副作用小，
   separate 会改变所有边框的绘制方式，表格线会变双线）。 */
.data-table thead tr:first-child th:first-child { border-top-left-radius: var(--radius); }
.data-table thead tr:first-child th:last-child  { border-top-right-radius: var(--radius); }
.data-table tbody tr:last-child td:first-child   { border-bottom-left-radius: var(--radius); }
.data-table tbody tr:last-child td:last-child    { border-bottom-right-radius: var(--radius); }
.data-table th {
    padding: 9px 12px; background: #F7F8FA;
    border-bottom: 1px solid var(--border);
    text-align: left; font-weight: 600; font-size: 12.5px;
    color: var(--text-2); white-space: nowrap;
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid #F0F1F4; color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #FAFBFC; }

#blazor-error-ui {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
    display: none; padding: 12px 18px;
    background: #FFE9E5; border-top: 1px solid #F0B4AC;
    color: #8B2318; font-size: 13.5px;
}
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

/* ==========================================================================
   业务页面通用组件（客户查询等）
   ========================================================================== */

/* ── 工具栏 ── */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-box { position: relative; flex: 1; min-width: 260px; max-width: 460px; }

.search-box input {
    width: 100%;
    height: 36px;
    padding: 0 32px 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font: inherit;
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface);
    transition: border-color .12s, box-shadow .12s;
}
.search-box input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(27,94,140,.11);
}
.search-clear {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; border: 0; border-radius: 50%;
    background: #DFE2E6; color: #5B616E;
    font-size: 15px; line-height: 1; cursor: pointer;
}
.search-clear:hover { background: #CDD1D8; }

.btn-primary {
    height: 36px; padding: 0 20px;
    border: 0; border-radius: var(--radius);
    background: var(--brand); color: #fff;
    font: inherit; font-size: 13.5px; font-weight: 500;
    letter-spacing: .04em; cursor: pointer;
    transition: background .12s;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-primary:disabled { opacity: .55; cursor: default; }

.btn-link {
    border: 0; background: transparent;
    color: var(--brand); font: inherit; font-size: 13px;
    cursor: pointer; padding: 0;
}
.btn-link:hover { text-decoration: underline; }

.page-size { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); }
.page-size select {
    height: 30px; padding: 0 6px;
    border: 1px solid var(--border-strong); border-radius: 6px;
    font: inherit; font-size: 13px; background: var(--surface); color: var(--text);
}

.scope-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 9px;
    background: #FDF4E3; color: #8A5A0C;
    border: 1px solid #F0C880;
    border-radius: 10px;
    font-size: 11.5px;
}

/* ── 表格增强 ── */
.table-wrap { overflow-x: auto; margin-bottom: 14px; }

.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { background: #EFF1F4; color: var(--text); }

.data-table td.name-cell { font-weight: 500; }
.data-table td.muted { color: var(--text-3); }
.data-table td.mono { font-family: var(--font-mono); font-size: 12.4px; }
.data-table td.mono-sm { font-family: var(--font-mono); font-size: 12.2px; color: var(--text-2); }

/* ── 分页 ── */
.pager {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    padding: 10px 2px;
}
.pager-info { font-size: 13px; color: var(--text-2); }
.pager-buttons { display: flex; gap: 5px; }
.pager-buttons button {
    height: 30px; padding: 0 11px;
    border: 1px solid var(--border-strong); border-radius: 6px;
    background: var(--surface); color: var(--text-2);
    font: inherit; font-size: 12.5px; cursor: pointer;
    transition: background .1s, border-color .1s;
}
.pager-buttons button:hover:not(:disabled) {
    background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark);
}
.pager-buttons button:disabled { opacity: .4; cursor: default; }

/* ── 状态提示 ── */
.loading-box, .empty-box, .error-box {
    display: flex; align-items: center; justify-content: center; gap: 11px;
    padding: 46px 20px; border-radius: var(--radius-lg);
    font-size: 13.5px;
}
.loading-box { color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.loading-box .spinner { width: 20px; height: 20px; border-width: 2px; }
.empty-box { color: var(--text-3); background: var(--surface); border: 1px dashed var(--border-strong); }
.error-box { color: var(--danger); background: var(--danger-bg); border: 1px solid #F0B4AC; }

/* ── 详情抽屉 ── */
.drawer-mask {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(20,30,40,.34);
    display: flex; justify-content: flex-end;
}
.drawer {
    width: min(440px, 92vw);
    height: 100%;
    /* 【必须 border-box】本项目没有全局 box-sizing reset（只在个别输入框上加了）。
       默认 content-box 下，height:100% 再加 padding 22+40 会让抽屉实际高
       视口 +62px —— 实测 760px 视口里抽屉高 822px，底部一截被切在屏幕外，
       得滚页面才能看到。改成 border-box 后高度正好等于视口，内部自己滚。 */
    box-sizing: border-box;
    background: var(--surface);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    padding: 22px 24px 40px;
    animation: slideIn .18s ease-out;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }

.drawer-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    padding-bottom: 15px; margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.drawer-title { font-size: 16px; font-weight: 600; line-height: 1.4; }
.drawer-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.drawer-close {
    flex-shrink: 0; width: 28px; height: 28px;
    border: 0; border-radius: 6px; background: var(--bg);
    color: var(--text-2); font-size: 19px; line-height: 1; cursor: pointer;
}
.drawer-close:hover { background: #E4E7EA; color: var(--text); }

.detail-list { display: grid; grid-template-columns: 82px 1fr; gap: 9px 14px; margin: 0; }
.detail-list dt { font-size: 12.5px; color: var(--text-3); }
.detail-list dd { margin: 0; font-size: 13.5px; word-break: break-word; }

/* ==========================================================================
   订单状态查询（/sales/order）
   ========================================================================== */

/* ── 顶部状态概览卡片：点击即筛选 ── */
.stat-strip { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

.stat-card {
    display: flex; flex-direction: column; gap: 2px;
    min-width: 104px; padding: 9px 15px;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    text-align: left; cursor: pointer; font: inherit;
    transition: border-color .12s, background .12s, box-shadow .12s;
}
.stat-card:hover:not(:disabled) { border-color: var(--border-strong); }
.stat-card.active {
    border-color: var(--brand); background: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(27,94,140,.08);
}
.stat-card:disabled { opacity: .6; cursor: default; }
.stat-card:first-child.active { background: var(--brand-light); }

.stat-label { font-size: 11.5px; color: var(--text-3); letter-spacing: .02em; }
.stat-value { font-size: 19px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

.tone-info { color: var(--brand); }
.tone-danger { color: var(--danger); }
.tone-ok { color: #1E7B4F; }
.tone-warn { color: #8A5A0C; }

/* ── 下拉与日期区间 ── */
/* 注意：.sel 的完整样式在文件靠后的「表单控件」段（.txt/.area/.sel 那一组），
   这里只留 disabled 状态。之前这里还重复定义了一遍 height:36px，
   与后面的 34px 冲突（后定义胜出），容易让人误以为高度是 36。 */
.sel:disabled { opacity: .6; cursor: default; }

.date-range { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.date-range input {
    height: 36px; padding: 0 8px;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--text);
    font: inherit; font-size: 13px;
}
.date-range input:focus, .sel:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,94,140,.11);
}

/* ── 状态徽标 ── */
.chip {
    display: inline-block; padding: 2px 9px;
    border-radius: 11px; border: 1px solid transparent;
    font-size: 12px; white-space: nowrap;
}
.chip-ok       { background: #E9F6EF; color: #1E7B4F; border-color: #B7E0C9; }
.chip-danger   { background: var(--danger-bg); color: var(--danger); border-color: #F0B4AC; }
.chip-progress { background: var(--brand-light); color: var(--brand-dark); border-color: #C0DAEC; }

/* ── 订单类型标签 ── */
.type-tag {
    display: inline-block; padding: 1px 6px; border-radius: 4px;
    font-size: 11.5px; background: #F1F2F4; color: var(--text-2);
}
.type-return   { background: #FDF2E4; color: #8A5A0C; }
.type-exchange { background: #EFEAF9; color: #6B4FA8; }

.item-hint { font-size: 11px; color: var(--text-3); margin-left: 5px; font-weight: 400; }

/* ── 表格：数字右对齐、退回单行高亮 ── */
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr.row-alert td { background: #FFFCF8; }
.data-table tbody tr.row-alert:hover td { background: #FDF6EE; }

/* ── 分页跳转 ── */
.pager-jump { display: flex; align-items: center; gap: 5px; margin-left: 8px; font-size: 12.5px; color: var(--text-2); }
.pager-jump input {
    width: 54px; height: 30px; padding: 0 6px; text-align: center;
    border: 1px solid var(--border-strong); border-radius: 6px;
    font: inherit; font-size: 12.5px; background: var(--surface); color: var(--text);
}
.pager-jump input::-webkit-outer-spin-button,
.pager-jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── 宽抽屉（订单详情内容多） ── */
.drawer-wide { width: min(720px, 96vw); }

/* ── 订单关键信息 ── */
.order-meta {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 22px; margin-bottom: 4px;
}
.order-meta > div {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding: 5px 0; border-bottom: 1px dashed #EDEFF2;
}
.order-meta span { font-size: 12.5px; color: var(--text-3); flex-shrink: 0; }
.order-meta b { font-size: 13px; font-weight: 500; text-align: right; word-break: break-all; }
.order-meta b.amount { font-variant-numeric: tabular-nums; font-weight: 600; }

.section-title {
    margin: 22px 0 10px; padding-left: 8px;
    border-left: 3px solid var(--brand);
    font-size: 13.5px; font-weight: 600; color: var(--text);
}

.notice-warn {
    padding: 9px 12px; margin-bottom: 12px;
    background: #FDF6E3; border: 1px solid #F0D89B; border-radius: var(--radius);
    color: #7A5A10; font-size: 13px;
}

.remark-box {
    padding: 10px 12px;
    background: #FAFBFC; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 13px; line-height: 1.65; color: var(--text-2);
    white-space: pre-wrap; word-break: break-word;
    max-height: 170px; overflow-y: auto;
}

/* ── 流程进度条 ── */
.flow { display: flex; margin: 6px 0 2px; }

.flow-step {
    flex: 1; position: relative;
    text-align: center; padding-top: 2px;
}

/* 节点之间的连接线：画在本节点圆点的左半边 */
.flow-step::before {
    content: ''; position: absolute;
    top: 14px; left: calc(-50% + 14px); right: calc(50% + 14px);
    height: 2px; background: var(--border);
}
.flow-step:first-child::before { display: none; }
.flow-step.done::before, .flow-step.current::before { background: #1E7B4F; }

.flow-dot {
    position: relative; z-index: 1;
    width: 26px; height: 26px; margin: 0 auto 7px;
    display: grid; place-items: center;
    border: 1px solid var(--border-strong); border-radius: 50%;
    background: #F5F6F8; color: var(--text-3);
    font-size: 11.5px; font-weight: 600;
}
.flow-step.done .flow-dot { background: #1E7B4F; border-color: #1E7B4F; color: #fff; }
.flow-step.current .flow-dot {
    background: var(--brand); border-color: var(--brand); color: #fff;
    box-shadow: 0 0 0 3px rgba(27,94,140,.16);
}
.flow-step.todo .flow-dot { background: var(--surface); }

.flow-name { font-size: 11.5px; line-height: 1.35; color: var(--text-3); padding: 0 1px; }
.flow-step.done .flow-name { color: var(--text-2); }
.flow-step.current .flow-name { color: var(--brand-dark); font-weight: 600; }

/* ── 明细小表 ── */
.mini-table { font-size: 12.5px; }
.mini-table th { padding: 7px 10px; }
.mini-table td { padding: 7px 10px; }
.mini-table tfoot td {
    background: #F7F8FA; border-top: 1px solid var(--border);
    border-bottom: none; padding: 8px 10px;
}

/* ── 流转时间线 ── */
.timeline { padding-left: 2px; }
.timeline-item { display: flex; gap: 11px; position: relative; padding-bottom: 15px; }
.timeline-item:last-child { padding-bottom: 2px; }

.timeline-item::before {
    content: ''; position: absolute;
    left: 4px; top: 15px; bottom: 0;
    width: 1px; background: var(--border);
}
.timeline-item:last-child::before { display: none; }

.timeline-dot {
    flex-shrink: 0; width: 9px; height: 9px; margin-top: 5px;
    border-radius: 50%; background: var(--border-strong);
}
.timeline-dot.ok { background: #1E7B4F; }

.timeline-body { flex: 1; min-width: 0; }
.timeline-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.timeline-head b { font-size: 13px; font-weight: 500; }
.timeline-time { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.timeline-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.timeline-remark { display: block; margin-top: 2px; color: var(--text-2); word-break: break-word; }

/* ==========================================================================
   订单审核（/sales/order/manager、/sales/order/finance、/sales/order/leader）

   三个环节现在是三个独立页面（此前是一个页面里的三个标签）。
   标签样式 .stage-tabs / .stage-tab 仍保留 —— 生产指令页 FacScProductionOrder
   还在用它做步骤切换，不是死代码，故不删除。
   ========================================================================== */

/* ── 「其它环节还有单」的跨页提示 ──
   去掉标签后，原本靠标签角标才能发现的另一批待审单会失去入口。
   这里用一行浅色提示加链接补上，既不破坏「一页一环节」，也不让人漏审。 */
.stage-crosslink {
    margin-bottom: 14px; padding: 8px 12px;
    background: #F7F9FB; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 12.5px; color: var(--text-2);
}
.stage-crosslink a { color: var(--brand-dark); text-decoration: none; font-weight: 500; }
.stage-crosslink a:hover { text-decoration: underline; }

/* ── 预计交货日期（仅制造确认环节）── */
.approval-delivery {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; margin-bottom: 10px;
}
.approval-delivery label { font-size: 12.5px; color: var(--text-2); flex-shrink: 0; }
.approval-delivery .txt { width: 168px; }
.approval-delivery .hint { font-size: 11.5px; color: var(--text-3); }

/* ── 环节切换（生产指令页仍在使用）── */
.stage-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.stage-tab {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 15px; border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid var(--border); border-bottom: 2px solid transparent;
    background: #F7F8FA; color: var(--text-2);
    font: inherit; font-size: 13px; cursor: pointer;
    transition: background .12s, color .12s;
}
.stage-tab:hover:not(:disabled) { background: #F0F2F5; }
.stage-tab.active {
    background: var(--surface); color: var(--brand-dark);
    border-bottom-color: var(--brand); font-weight: 600;
}
.stage-tab:disabled { cursor: default; }
.stage-count {
    min-width: 20px; padding: 1px 6px; border-radius: 9px;
    background: #E6E9ED; color: var(--text-2);
    font-size: 11.5px; font-weight: 500; text-align: center;
    font-variant-numeric: tabular-nums;
}
.stage-tab.active .stage-count { background: var(--brand-light); color: var(--brand-dark); }

/* ── 页面级提示条 ── */
.notice-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 14px; margin-bottom: 14px;
    border: 1px solid transparent; border-radius: var(--radius);
    font-size: 13px;
}
.notice-ok    { background: #E9F6EF; border-color: #B7E0C9; color: #1E7B4F; }
.notice-error { background: var(--danger-bg); border-color: #F0B4AC; color: var(--danger); }

.notice-close {
    flex-shrink: 0; width: 22px; height: 22px;
    border: 0; border-radius: 5px; background: transparent;
    color: inherit; opacity: .6; font-size: 17px; line-height: 1; cursor: pointer;
}
.notice-close:hover { opacity: 1; background: rgba(0,0,0,.06); }

/* 抽屉内的行内提示 */
.notice-inline {
    padding: 8px 11px; margin-bottom: 13px;
    background: #FDF6E3; border: 1px solid #F0D89B; border-radius: var(--radius);
    color: #7A5A10; font-size: 12.5px; line-height: 1.55;
}
.notice-inline-error {
    background: var(--danger-bg); border-color: #F0B4AC; color: var(--danger);
    margin-bottom: 10px;
}

/* ── 队列行 ── */
.data-table tr.row-click { cursor: pointer; }

.wait-badge {
    display: inline-block; padding: 1px 7px; border-radius: 4px;
    font-size: 12px; font-variant-numeric: tabular-nums;
    background: #F1F2F4; color: var(--text-2);
}
.wait-warn    { background: #FDF6E3; color: #8A5A0C; }
.wait-overdue { background: var(--danger-bg); color: var(--danger); font-weight: 500; }

/* 交货日期紧迫度 */
.due-overdue { color: var(--danger) !important; font-weight: 600; }
.due-soon    { color: #8A5A0C !important; }
.due-cell    { font-variant-numeric: tabular-nums; }

/* 概览徽标里的警示变体 */
.scope-badge.badge-alert { background: var(--danger-bg); color: var(--danger); border-color: #F0B4AC; }

/* ── 审核抽屉：内容滚动、操作栏常驻底部 ── */
.drawer.drawer-approval {
    display: flex; flex-direction: column;
    padding: 22px 0 0; overflow: hidden;
}
.drawer-approval .drawer-head { padding: 0 24px 15px; margin-bottom: 0; }
.drawer-approval .drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 24px 24px; }

/* ── 审核操作栏 ── */
.approval-bar {
    flex-shrink: 0;
    padding: 13px 24px 16px;
    background: #FBFCFD;
    border-top: 1px solid var(--border);
    box-shadow: 0 -3px 10px rgba(20,30,40,.04);
}

.approval-input { display: flex; flex-direction: column; gap: 5px; }
.remark-input {
    width: 100%; padding: 8px 11px;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--text);
    font: inherit; font-size: 13px; line-height: 1.6;
    resize: vertical; min-height: 54px; box-sizing: border-box;
}
.remark-input:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,94,140,.11);
}
.remark-input:disabled { background: #F5F6F8; color: var(--text-3); }

.remark-hint {
    display: flex; justify-content: space-between;
    font-size: 11.5px; color: var(--text-3);
}

.approval-actions {
    display: flex; justify-content: flex-end; gap: 8px; margin-top: 11px;
}
.approval-actions button {
    height: 34px; padding: 0 16px; border-radius: var(--radius);
    font: inherit; font-size: 13px; cursor: pointer;
    border: 1px solid transparent;
    transition: background .12s, border-color .12s;
}
.approval-actions button:disabled { opacity: .55; cursor: default; }

.btn-ghost {
    background: var(--surface); border-color: var(--border-strong) !important;
    color: var(--text-2);
}
.btn-ghost:hover:not(:disabled) { background: #F5F6F8; color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #A8332A; }

/* ── 二次确认 ── */
.confirm-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 11px 13px;
    background: #FFFDF8; border: 1px solid #EADFC4; border-radius: var(--radius);
}
.confirm-bar .approval-actions { margin-top: 0; }
.confirm-text { display: flex; flex-direction: column; gap: 2px; }
.confirm-text b { font-size: 13.5px; font-weight: 600; }
.confirm-text span { font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* ==========================================================================
   订单输入（/sales/order/new）
   ========================================================================== */

/* ── 卡片分节 ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px 18px;
    margin-bottom: 14px;
}

.card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; margin-bottom: 14px;
    padding-bottom: 11px; border-bottom: 1px solid var(--border);
}
.card-head h2 {
    margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
}

/* ── 分段切换（订单类型 / 录入方式） ── */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
.seg-btn {
    height: 30px; padding: 0 13px;
    border: 0; border-right: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text-2);
    font: inherit; font-size: 12.5px; cursor: pointer;
    transition: background .12s, color .12s;
}
.seg-btn:last-child { border-right: 0; }
.seg-btn:hover { background: #F5F6F8; }
.seg-btn.active { background: var(--brand); color: #fff; font-weight: 500; }

/* ── 表单栅格 ── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}
.fg-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fg-item.span-2 { grid-column: span 2; }
.fg-item.span-3 { grid-column: 1 / -1; }

.fg-item > label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.req { color: var(--danger); margin-left: 2px; }

.txt, .area, .sel {
    width: 100%; box-sizing: border-box;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--text);
    font: inherit; font-size: 13px;
}
.txt { height: 34px; padding: 0 10px; }
.area { padding: 8px 10px; line-height: 1.6; resize: vertical; }

/* 【select 必须去掉原生外观，否则各引擎高度对不上】
   Safari 的原生 <select> 自带上下内边距 + 圆角 + 渐变，
   即使设了 height: 34px 也会被它自己的外观撑开，实测比 Chrome 高 2~4px，
   同一行里和 input 就不齐了（这是「Safari 和 Chrome 细节不一致」的常见来源）。
   appearance: none 去掉原生外观后，自己画边框和箭头，两端才一致。
   · -webkit-appearance —— Safari / 旧 Chrome
   · -moz-appearance    —— Firefox
   · appearance         —— 标准                                                                        */
.sel {
    height: 34px; padding: 0 26px 0 8px; cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* 自绘下拉箭头：用背景图比插伪元素稳（select 不支持 ::after） */
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%235B616E' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-color: var(--surface);
}

/* 【裸 <select>（没加 class 的那些）也要统一外观】
   实测：全项目 92 个 select 带 class（走 .sel），还有 9 个是裸元素。
   裸 select 走浏览器原生外观 —— 而 Safari 的原生 select 有自己的
   内边距 / 圆角 / 高度，Chromium 的又不一样，于是同一行里高度对不齐。
   （跨引擎实测证据：订单总览页那个「每页 50/100/200 条」的下拉，
     Chromium 算出 padding"0px 6px"、宽 58px，WebKit 算出 padding"0px"、宽 56px。）

   这里只给「没有任何 class 的 select」补最小必要样式，
   带 class 的 92 个仍由 .sel 精确控制，两者互不干扰。
   :not([class]) 保证不会覆盖 .sel。 */
select:not([class]) {
    height: 30px;
    padding: 0 4px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* 自绘箭头，与 .sel 用同一枚图标 */
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%235B616E' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    padding-right: 18px;
}

.txt:focus, .area:focus, .sel:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,94,140,.11);
}
.txt:disabled, .sel:disabled { background: #F5F6F8; color: var(--text-3); cursor: default; }
.txt::placeholder { color: #AEB3BB; }

/* ── 搜索行 ── */
.search-row { display: flex; gap: 7px; }
.search-row .txt { flex: 1; }

/* ── 客户 / 产品选择结果 ── */
.pick-list {
    margin-top: 7px;
    border: 1px solid var(--border); border-radius: var(--radius);
    max-height: 232px; overflow-y: auto;
}
.pick-item {
    display: flex; align-items: baseline; gap: 10px; width: 100%;
    padding: 8px 11px; border: 0; border-bottom: 1px solid #EFF1F4;
    background: var(--surface); text-align: left;
    font: inherit; cursor: pointer;
}
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: var(--brand-light); }
.pick-name { font-size: 13.5px; font-weight: 500; }
.pick-meta { font-size: 12px; color: var(--text-3); }

.pick-empty {
    margin-top: 7px; padding: 9px 11px;
    background: #FAFBFC; border: 1px dashed var(--border-strong); border-radius: var(--radius);
    font-size: 12.5px; color: var(--text-3);
}

/* 检索结果条数提示：让「只显示了前 N 条」成为可见信息，避免用户误判搜不到 */
.pick-summary {
    margin-bottom: 6px; font-size: 12.5px; color: var(--text-2);
}
.pick-summary b { color: var(--text); }
.pick-summary-hint { color: var(--text-3); }

.picked {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 8px 12px; min-height: 34px; box-sizing: border-box;
    background: var(--brand-light); border: 1px solid #C0DAEC; border-radius: var(--radius);
}
.picked b { font-size: 13.5px; }
.picked .pick-meta { margin-left: 8px; }
.picked-product { background: #F7F9FB; border-color: var(--border); }
.item-hint { font-size: 11.5px; color: var(--text-3); margin-left: 7px; font-weight: 400; }

/* ── 牙位图 ── */
.tooth-grid {
    display: grid;
    /* 固定格宽：上前牙 6 格时不会右侧空两列，后牙 16 格自动换行 */
    grid-template-columns: repeat(auto-fill, 64px);
    justify-content: start;
    gap: 6px;
}
.tooth-cell {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 3px 4px;
    border: 1px solid var(--border); border-radius: 7px;
    background: #FAFBFC;
    transition: border-color .12s, background .12s;
}
.tooth-cell.filled { background: var(--brand-light); border-color: #8FBBD9; }
.tooth-fdi { font-size: 11px; color: var(--text-3); letter-spacing: .02em; }
.tooth-cell.filled .tooth-fdi { color: var(--brand-dark); font-weight: 600; }
.tooth-cell input {
    width: 100%; box-sizing: border-box;
    border: 0; background: transparent; text-align: center;
    font: inherit; font-size: 13px; color: var(--text);
    -moz-appearance: textfield;
}
.tooth-cell input::-webkit-outer-spin-button,
.tooth-cell input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tooth-cell input:focus { outline: none; }
.tooth-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 7px;
}

/* ── 编码预览 ── */
.preview-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 8px 11px;
    background: #F7F8FA; border: 1px solid var(--border); border-radius: var(--radius);
}
.preview-bar .hint { flex-shrink: 0; }
.preview-name {
    font-size: 12.5px; color: var(--text); word-break: break-all;
}
.preview-code {
    font-size: 12.5px; color: var(--brand-dark); font-weight: 600;
    letter-spacing: .06em;
}
.preview-bar .btn-primary { margin-left: auto; }

.inline-error {
    margin-top: 6px; padding: 6px 10px;
    background: var(--danger-bg); border-radius: 6px;
    font-size: 12.5px; color: var(--danger);
}

/* ── 小按钮 ── */
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 5px; }
.btn-lg { height: 40px; padding: 0 26px; font-size: 14px; }
.btn-ghost {
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--text-2);
    font: inherit; cursor: pointer; transition: background .12s;
}
.btn-ghost:hover:not(:disabled) { background: #F5F6F8; color: var(--text); }
.btn-ghost:disabled { opacity: .55; cursor: default; }
a.btn-link { text-decoration: none; }

/* ── 产品结果表 ── */
.pick-table { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.pick-table .data-table { border: 0; }
.data-table tr.row-picked td { background: var(--brand-light); }

/* ── 明细表内联输入 ── */
.qty-input {
    width: 58px; height: 26px; padding: 0 6px; text-align: right;
    border: 1px solid var(--border-strong); border-radius: 5px;
    background: var(--surface); color: var(--text);
    font: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.qty-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(27,94,140,.11); }

.row-del {
    width: 22px; height: 22px; border: 0; border-radius: 5px;
    background: transparent; color: var(--text-3);
    font-size: 16px; line-height: 1; cursor: pointer;
}
.row-del:hover { background: var(--danger-bg); color: var(--danger); }

.total-label { text-align: right; font-weight: 500; color: var(--text-2); }
.total-amount { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }

/* ── 提交区 ── */
.submit-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px; margin-top: 15px;
    padding-top: 14px; border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.submit-summary { font-size: 13px; color: var(--text-2); }
.submit-summary b { font-size: 17px; margin: 0 4px; }

/* ── 提交成功页 ── */
.done-box {
    max-width: 460px; margin: 64px auto; padding: 32px 30px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    text-align: center;
}
.done-icon {
    width: 46px; height: 46px; margin: 0 auto 14px;
    display: grid; place-items: center;
    border-radius: 50%; background: #E9F6EF; color: #1E7B4F;
    font-size: 24px; font-weight: 700;
}
.done-box h2 { margin: 0 0 6px; font-size: 17px; }
.done-id {
    margin: 0 0 10px; font-size: 21px; font-weight: 600;
    letter-spacing: .1em; color: var(--brand-dark);
    font-family: var(--font-mono);
}
.done-hint { margin: 0 0 22px; font-size: 13px; color: var(--text-3); line-height: 1.7; }
.done-actions { display: flex; align-items: center; justify-content: center; gap: 16px; }

/* ── 通用小工具类 ── */
.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.dim { color: var(--text-3); font-size: 12.5px; }
.hint { color: var(--text-3); font-size: 12px; }
.head-note {
    margin-left: 9px; padding: 1px 8px; border-radius: 10px;
    background: #F1F2F4; color: var(--text-3); font-size: 11.5px;
}
.error-list { margin: 7px 0 0; padding-left: 20px; font-size: 12.5px; line-height: 1.75; }

/* ==========================================================================
   退回单修改页（/sales/order/revise）
   ==========================================================================
   只补该页独有的三处，其余全部复用下单页与列表页已有的类
   （form-grid / fg-item / card / data-table / pick-list / notice-*），
   避免为一张页面再造一套视觉语言。

   【为什么按钮要单独写 a.btn-primary】
   全局 a 有下划线（见 89~90 行）和 inline 显示，
   套上 .btn-primary 后仍然带下划线、高度也不生效。
   改单页有两处用它做「跳转型按钮」（返回列表 / 抽屉里的修改入口），
   必须显式去掉下划线并改成 inline-flex 才能和 <button> 对齐。 */
a.btn-primary,
a.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
}
a.btn-primary:hover,
a.btn-ghost:hover { text-decoration: none; }

/* 卡片内的次级区块（新增明细）：与 card-head 区分，不抢标题层级 */
.card-sub {
    margin-top: 16px; padding-top: 14px;
    border-top: 1px dashed var(--border);
    font-size: 13px; color: var(--text-2);
}

/* 明细行内的输入框：表格单元格里 34px 高会把行撑得很松，压到 28px */
.txt-mini {
    height: 28px; padding: 0 6px;
    font-size: 12.5px; text-align: right;
}

/* 「删除」与其他链接按钮并排时用红色，避免误点 */
.danger-link { color: var(--danger); }
.danger-link:hover { color: var(--danger); }

/* 列表「操作」列同时放详情与修改时，两个链接之间留出间距 */
td .btn-link + .btn-link { margin-left: 10px; }
td .btn-link + .revise-blocked { margin-left: 10px; }
a.revise-link { color: var(--danger); font-weight: 500; }

/* 单号重复时「修改」不可点：做成灰字而不是隐藏，
   否则用户会以为系统漏了功能，而实际原因是单号冲突需要管理员处理 */
.revise-blocked {
    color: var(--text-3);
    font-size: 13px;
    cursor: not-allowed;
    border-bottom: 1px dashed var(--border-strong);
}

/* ==========================================================================
   响应式适配（2026-11-23 补）
   ==========================================================================
   【为什么之前完全没有媒体查询】
   本系统是给办公室 PC 用的后台管理界面，设计基准是 1440/1920 宽。
   实测 1280 以上一切正常；但 1024 及以下开始出现两个问题：
     · 侧栏固定 218px + 主区留白 24px×2，主区实际只有约 760px，
       订单列表的列被压得很紧，表格需要横向滚动才能看全
     · 表格单元格 padding 12px 在窄屏下占比过大，一屏放不下几列

   【原则：只收紧留白与侧栏宽度，不动配色、字号体系、组件结构】
   下面三档都不改变任何视觉风格，只是让同样的界面在小屏上少浪费空间。

   断点选择依据（实测主流分辨率）：
     1366 —— 老款笔记本最常见（1366×768）
     1180 —— 1280×800 屏减去滚动条
     1024 —— 小笔记本 / 平板横屏
   ========================================================================== */

/* 中屏：收窄侧栏与页面留白 */
@media (max-width: 1366px) {
    .app-sidebar { width: 200px; }
    .app-main { padding: 16px 18px 32px; }
    .app-header { padding: 0 12px; gap: 14px; }
}

/* 窄屏：进一步收窄，表格单元格也收紧 */
@media (max-width: 1180px) {
    .app-sidebar { width: 186px; }
    .app-main { padding: 14px 14px 28px; }

    /* 表格单元格左右留白 12px → 9px。一屏能多放约 1 列，
       字号与行高不变，视觉密度基本无感。 */
    .data-table th,
    .data-table td { padding-left: 9px; padding-right: 9px; }
}

/* 小屏 / 平板横屏：内容优先，侧栏再收一档 */
@media (max-width: 1024px) {
    .app-sidebar { width: 174px; }
    .app-main { padding: 12px 12px 24px; }

    /* 顶部工具区的搜索框有 min-width: 260px，窄屏下会把同行的按钮挤到换行，
       这里放宽它的收缩能力 */
    .search-box { min-width: 180px; }

    /* 统计卡片在窄屏下排 2 行更整齐，避免单个卡片被压到只剩数字 */
    .stat-card { min-width: 88px; padding: 8px 12px; }
}

/* 打印：去掉屏幕上的装饰，只留内容（本系统打印走独立组件，
   这条主要防止用户直接 Ctrl+P 时把侧栏和按钮打进去） */
@media print {
    .app-sidebar,
    .app-tabs,
    .pager,
    .drawer-mask { display: none !important; }
    .app-main { padding: 0; overflow: visible; }
    .app-shell { height: auto; overflow: visible; }
}

/* ==========================================================================
   错误边界（AppErrorBoundary）
   ==========================================================================
   【为什么放全局而不是组件的 scoped CSS】
   这个组件被两层引用：
     · Routes.razor（在 MainLayout 之外）—— 此时页面骨架还没渲染完，
       异常就发生了，scoped 样式要走 PIGEONERP.Web.styles.css，
       在异常场景下不保证已加载，会出现「白底黑字的裸 HTML」。
     · MainLayout.razor（在里面）—— scoped 可以生效。
   放全局保证两种情况都有样式。代价是这个文件的体积，
   但错误页恰恰是最不能出样式问题的页面。
   ========================================================================== */

.eb-wrap {
    display: flex;
    justify-content: center;
    padding: 48px 24px;
    min-height: 200px;
}

.eb-card {
    width: 100%;
    max-width: 560px;
    padding: 28px 30px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px rgba(20, 30, 40, .06);
    text-align: left;
}

.eb-icon {
    width: 40px; height: 40px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 20px;
    display: flex; align-items: center; justify-content: center;
}

.eb-card h2 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}

.eb-lead {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text-2);
}

.eb-lead b { color: var(--danger); font-weight: 600; }

.eb-hint {
    padding: 11px 14px;
    margin-bottom: 18px;
    background: #F7F8FA;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-2);
}

.eb-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.eb-btn {
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    height: 34px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .12s, background .12s;
}

.eb-btn:hover { border-color: var(--brand); background: var(--brand-light); text-decoration: none; }

.eb-btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.eb-btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.eb-note {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 11.5px;
    line-height: 1.8;
    color: var(--text-3);
}

.eb-note code {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-2);
    background: var(--bg);
    padding: 1px 5px;
    border-radius: 3px;
}

.eb-detail {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-3);
}

.eb-detail summary {
    cursor: pointer;
    padding: 6px 0;
    color: var(--text-2);
}

.eb-detail summary:hover { color: var(--brand); }

.eb-detail pre {
    margin: 8px 0 0;
    padding: 12px;
    max-height: 260px;
    overflow: auto;
    background: #F7F8FA;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--text-2);
}


/* ════════════════════════════════════════════════════════════════
   菜单飞出 · 浏览器兼容性说明（2026-11-25）
   ════════════════════════════════════════════════════════════════
   本菜单只用以下 CSS 特性，均为三大引擎长期稳定支持：
     · position:absolute / relative        全部版本
     · :hover / :focus-within              Safari 10.1+ / Chrome 60+ / FF 52+
     · transition (opacity/transform)      全部版本
     · visibility 作为可过渡属性           全部版本
     · ::before 伪元素做命中热区            全部版本
     · @media (hover: none)                Safari 9+ / Chrome 41+ / FF 64+
     · inset: 0（简写）                    Safari 14.1+ / Chrome 87+ / FF 66+

   【故意避开的东西】
     · 不用 :has()      —— Safari 15.4+ 才支持，旧 macOS 会整段失效
     · 不用 display:grid 做飞出定位 —— 各引擎对 grid + absolute 混用有差异
     · 不用 clip-path / backdrop-filter —— 渲染差异大、性能开销高
     · 不用 CSS 变量拼选择器（不支持）
     · 不用字体图标做箭头 —— 字形在 macOS / Windows 有 1px 级差异，
       改用 border 画三角，像素级一致

   【inset 的兜底】见下：老 Safari（<14.1）不支持 inset 简写，
   用 top/right/bottom/left 显式声明同一效果。
   这里同时显式写了 width —— 上面主规则里的 right:0 与固定宽度
   属于"过约束"，各引擎按方向规则丢弃 right，结果虽一致，
   但读起来容易误解，干脆不写 right。 */
.menu-flyout::before {
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    width: 4px;
}
