/* MEISYOU JAPAN 仓库系统：统一的样式（在 Tabler 之上）
   品牌（2026-09-30）：logo 纯蓝 #0000FF；按钮、选中用稍深一点的 #0010DD（白字对比度够）；左边菜单是深藏青。
   原则：
   - 照顾年纪大的同事：正文 17px，按钮至少 44px 高，颜色旁边一定有文字；
   - 字号只用几档（标题 28 / 小标题 19 / 正文 17 / 次要 15），不在页面里随手写大小；
   - 按钮分主次：每块只有一个实心的“主要操作”，其他是白底描边；危险操作是红色描边。
   例外（V1.22）：升级画面（templates/_upgrade_lock.html）、升级时被拒的整页（upgrade_refused.html）、CSRF 出错页（csrf_failure.html）
   的样式写在页面里——升级时新旧版本混跑，静态文件可能拿到另一个版本的，页面里自带样式才不会刷出空白。 */

:root {
  --m-bg: #f2f4f8;
  --m-surface: #fff;
  --m-subtle: #f8fafc;
  --m-border: #e1e6ee;
  --m-border-strong: #c9d1dd;
  --m-text: #18222f;
  --m-muted: #5a6778;
  --m-faint: #8793a4;
  --m-primary: #0010DD;
  --m-primary-soft: #ECEEFF;
  --m-red: #d23a3a;   --m-red-soft: #fdeeee;   --m-red-text: #a82626;
  --m-amber: #e08a00; --m-amber-soft: #fff3de; --m-amber-text: #8f5600;
  --m-green: #2c9a47; --m-green-soft: #e6f5ea; --m-green-text: #1d7434;
  --m-blue-text: #000FC0;
  --m-purple: #7048c6; --m-purple-soft: #f1ecfb;
  --m-gray-soft: #eef1f5;
  --m-radius: 12px;
  --m-radius-sm: 8px;
  --m-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --m-side: 232px;
  /* V1.21 界面规范（docs/界面规范.md）：颜色按“意思”取，一个颜色只表示一种意思，颜色旁边一定写字。
     上面的旧名字（--m-green、--m-amber、--m-red……）照旧能用，新写的页面用下面按意思起的名字 */
  --m-brand: #0000FF;                                  /* 品牌纯蓝：只用在 logo、登录页 */
  --m-primary-hover: #000CB0;                          /* 主按钮、选中、链接：--m-primary / --m-primary-soft / --m-blue-text */
  --m-nav: #0A0F33;                                    /* 左边菜单、手机顶上一条的底色 */
  --m-ok: var(--m-green);   --m-ok-soft: var(--m-green-soft);   --m-ok-text: var(--m-green-text);    /* 完成、成功 */
  --m-warn: var(--m-amber); --m-warn-soft: var(--m-amber-soft); --m-warn-text: var(--m-amber-text);  /* 要注意、在等 */
  --m-bad: var(--m-red);    --m-bad-soft: var(--m-red-soft);    --m-bad-text: var(--m-red-text);     /* 出错、必须处理、危险 */
  --m-note: var(--m-muted); --m-note-soft: var(--m-gray-soft);  --m-note-text: var(--m-text);        /* 普通说明、中性 */
  /* 角色色：只用在角色标签和流程图里那一栏，永远写着角色名（和状态色错开） */
  --r-admin: #7048c6; --r-admin-soft: #f1ecfb;
  --r-kefu: #0e7c86;  --r-kefu-soft: #e2f3f4;
  --r-wh: #6b7a1f;    --r-wh-soft: #f1f4e1;
  --r-cust: #c2620a;  --r-cust-soft: #fcefe2;
  /* 字号只用 6 档，最小 13px */
  --fs-title: 1.75rem;   /* 28px 页面标题 */
  --fs-num: 1.875rem;    /* 30px 大数字 */
  --fs-head: 1.1875rem;  /* 19px 卡片标题、区块标题 */
  --fs-body: 1.0625rem;  /* 17px 正文、表格、按钮 */
  --fs-sub: .9375rem;    /* 15px 说明、表头、状态标签 */
  --fs-min: .8125rem;    /* 13px 时间、小标记（最小，不能再小） */

  --tblr-primary: #0010DD;
  --tblr-primary-rgb: 0, 16, 221;
  --tblr-primary-darken: #000CB0;
  --tblr-primary-lt: #ECEEFF;
  --tblr-font-sans-serif: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", "Hiragino Sans", -apple-system, "Segoe UI", sans-serif;
  --tblr-body-font-size: 1.0625rem;
  --tblr-body-line-height: 1.6;
  --tblr-body-color: #18222f;
  --tblr-border-color: #e1e6ee;
  --tblr-border-color-translucent: #e1e6ee;
  --tblr-border-radius: 8px;
  --tblr-link-color: #0010DD;
  --tblr-link-color-rgb: 0, 16, 221;
}
html { font-size: 16px; }
body { background: var(--m-bg); color: var(--m-text); font-size: 1.0625rem; line-height: 1.6;
       -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
b, strong, .fw-bold { font-weight: 600 !important; }
.muted { color: var(--m-muted); }
.faint { color: var(--m-faint); }
.small, small { font-size: .9375rem; }
.num-font { font-variant-numeric: tabular-nums; }
.text-red { color: var(--m-red-text) !important; }
.text-amber { color: var(--m-amber-text) !important; }
.text-green { color: var(--m-green-text) !important; }
.text-blue { color: var(--m-blue-text) !important; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .95em; letter-spacing: .01em; }
.break { word-break: break-all; }
/* 段尾只剩一个字单独换行（关于我们“做什 / 么”、日语“進めま / す。”，V1.21 总验证）：正文段落和说明文字让浏览器把最后一行排得不那么短，
   标题排得两行差不多长。用 text-wrap-style（只管怎么断行），不用 text-wrap 简写：简写会把 white-space: nowrap 的“不换行”一起改掉。
   浏览器不认就忽略，排版和以前一样 */
p, li, dd, td, blockquote, .muted, .form-hint, .why, .sub, .meta, .notice .grow, .td-sub, .ov-sub, .rl-item-txt, .wf-l, .wf-line, .fs-head { text-wrap-style: pretty; }
/* 按钮折成两行时两行一样长（V1.22 验证：手机 390 宽“新しい指示書をアップロー / ド”“おすすめ：確認済み・印刷しな / い”最后一个字掉一行） */
h1, h2, h3, h4, .card-title, .btn { text-wrap-style: balance; }
/* 模板过滤器 keep（apps/inbound/templatetags/wms.py）包出来的：数字和单位、段尾最后两个字不拆开（V1.21 复查：上面的 pretty 在窄框里不起作用，
   工作流程图还是“发布给仓 / 库”“押しま / す。”，手机上“共 15 / 张”） */
.nwt { white-space: nowrap; }
/* 字号 6 档（V1.21）：页面里要换字号只用这几个类，不要随手写 font-size */
.fs-title { font-size: var(--fs-title) !important; font-weight: 700; line-height: 1.3; }
.fs-num { font-size: var(--fs-num) !important; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.fs-head { font-size: var(--fs-head) !important; font-weight: 650; line-height: 1.4; }
.fs-body { font-size: var(--fs-body) !important; }
.fs-sub { font-size: var(--fs-sub) !important; }
.fs-min { font-size: var(--fs-min) !important; }

/* ---------- 整体布局：左边导航 + 右边内容 ---------- */
.app { display: flex; min-height: 100vh; }
.side { width: var(--m-side); flex: 0 0 var(--m-side); background: var(--m-nav); color: #CDD2F2;
        display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
        overflow-y: auto; overscroll-behavior: contain;               /* 窗口矮、菜单多时可以滚动，底部的按钮不会被截掉 */
        scrollbar-width: thin; scrollbar-color: #262C66 transparent; }
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: #262C66; border-radius: 3px; }
.side-nav, .side-brand, .side-user { flex-shrink: 0; }
.side-brand { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; padding: 1.35rem 1.25rem 1.4rem; color: #fff; }
.side-brand .brand-logo { height: 40px; width: auto; display: block; }
.side-brand:hover, .side-brand:focus { text-decoration: none; }
.side-brand .brand-sub { display: flex; align-items: baseline; gap: .6rem; font-size: .8125rem; color: #9097C9; line-height: 1.2; white-space: nowrap; }
.side-brand .brand-sub .jp { color: #fff; font-weight: 700; letter-spacing: .34em; }
.side-nav { display: flex; flex-direction: column; gap: .25rem; padding: 0 .75rem; }
.side-label { font-size: .8125rem; color: #7880B8; padding: 1rem .75rem .35rem; }
.side-link { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border-radius: 10px; line-height: 1.35;
             color: #CDD2F2; font-size: 1.0625rem; font-weight: 500; white-space: nowrap; letter-spacing: -.01em; }
.side-link i { font-size: 1.2rem; width: 1.3rem; text-align: center; color: #9097C9; line-height: 1; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link.active { background: #0010DD; color: #fff; }
.side-link.active i { color: #fff; }
.side-user { margin-top: auto; padding: 1rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-user .who { display: flex; align-items: center; gap: .7rem; }
.side-user .avatar { width: 38px; height: 38px; border-radius: 50%; background: #262C66; color: #fff; display: grid;
                     place-items: center; font-weight: 600; flex: 0 0 auto; }
.side-user .uname { color: #fff; font-weight: 600; line-height: 1.25; }
.side-user .urole { font-size: var(--fs-sub); color: #9097C9; line-height: 1.4; }
.side-user .logout { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .85rem;
                     padding: .5rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14); color: #CDD2F2; font-size: .9375rem; }
.side-user .logout:hover, .side-user .logout.on { background: rgba(255, 255, 255, .08); color: #fff; }
.side-user .user-links { display: flex; gap: .5rem; }
.lang-switch { display: flex; margin-top: .85rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; overflow: hidden; }
.lang-switch button { flex: 1 1 0; background: none; border: 0; color: #CDD2F2; padding: .4rem; font-size: .9375rem; cursor: pointer;  white-space: nowrap; }
.lang-switch button.on { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }
.lang-switch button:hover { color: #fff; }
.side-user .user-links .logout { flex: 1 1 0; white-space: nowrap; font-size: var(--fs-sub); padding: .5rem .3rem; gap: .3rem; min-width: 0; }
html[lang="ja"] .side-user .user-links .logout { font-size: var(--fs-min); }   /* 日语“パスワード”“ログアウト”15px 放不下菜单宽（232px），小一档 */
.side-user .user-links form { flex: 1 1 0; display: flex; margin: 0; }   /* 退出是按钮（POST，2026-09-30） */
.side-user button.logout { width: 100%; background: none; font-family: inherit; line-height: inherit; cursor: pointer; }
@media (min-width: 992px) and (max-height: 940px) {                /* 矮窗口（笔记本、浏览器开了书签栏）：菜单收紧一点，一屏放得下 */
  .side-brand { padding: .8rem 1.25rem .85rem; gap: .4rem; }
  .side-brand .brand-logo { height: 32px; }
  .side-nav { gap: .15rem; }
  .side-label { padding: .5rem .75rem .15rem; }
  .side-link { padding: .5rem .85rem; }
  .side-user { padding: .7rem 1rem .6rem; }
  .side-user .logout { margin-top: .5rem; }
  .side-ver { margin-top: .35rem; }
}
@media (min-width: 992px) and (max-height: 860px) {                /* 更矮（1440×900、1366×768 笔记本，浏览器里只剩 700～800px）：再收紧一档（V1.21 总验证） */
  .side-brand { padding: .6rem 1.25rem .65rem; }
  .side-brand .brand-logo { height: 28px; }
  .side-nav { gap: .1rem; }
  .side-label { padding: .4rem .75rem .1rem; }
  .side-link { padding: .38rem .85rem; line-height: 1.25; }
  .side-user { padding: .55rem 1rem .5rem; }
  .side-user .avatar { width: 30px; height: 30px; }
  .lang-switch { margin-top: .55rem; }
}
/* 菜单比窗口高、还没滚到底时，最下面一条渐隐“往下还有菜单”（Mac 默认不显示滚动条，看不出还能滚；点一下滚到底）。脚本在 base.html（sideMore）。
   它自己占一条和提示一样高的地方（菜单最下面的空白）：没滚到底时贴在窗口底部盖在菜单上；滚到底时它待在最后一行“改密码 / 退出”下面、
   字淡出，最后一行完全露出来（V1.21 总验证：390 宽手机上提示盖住了最后一行的上沿）。菜单放得下时整条不显示、不占地方 */
.side-more { position: sticky; bottom: 0; flex-shrink: 0; z-index: 2; cursor: pointer; }
.side-more[hidden] { display: none; }
.side-more > span { display: flex; align-items: center; justify-content: center; gap: .35rem;
                    padding: 1.6rem .75rem .45rem; font-size: var(--fs-sub); color: #fff;
                    background: linear-gradient(to bottom, rgba(10, 15, 51, 0), var(--m-nav) 60%); transition: opacity .15s ease; }
.side-more > span:hover { color: #fff; text-decoration: underline; }
.side-more.at-end { cursor: default; }
.side-more.at-end > span { opacity: 0; pointer-events: none; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pagehead { background: var(--m-surface); border-bottom: 1px solid var(--m-border); }
.pagehead .inner, .content { max-width: 1360px; width: 100%; margin: 0 auto; padding-left: 2rem; padding-right: 2rem; }
.pagehead .inner { padding-top: 1.1rem; padding-bottom: 1.25rem; }
.legacy-ui2-open { display: flex; justify-content: flex-end; margin: 0 0 .75rem; }
.legacy-ui2-open .btn { max-width: 100%; white-space: normal; }
.content { padding-top: 1.5rem; padding-bottom: 3rem; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .9375rem; color: var(--m-muted); margin-bottom: .35rem; }
.crumbs a { color: var(--m-muted); }
.crumbs a:hover { color: var(--m-primary); }
.crumbs i { font-size: .75rem; color: var(--m-faint); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.head-row .grow { flex: 1 1 auto; min-width: 0; }
.title { font-size: 1.75rem; font-weight: 700; line-height: 1.3; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; word-break: break-all; }
.meta { color: var(--m-muted); font-size: .9375rem; margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.meta i { margin-right: .3rem; }
.head-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ---------- 手机、平板（窄于 992px，V1.21）：顶上一条只放 logo、当前页名、写着字的「菜单」按钮；
   点「菜单」从左边滑出完整菜单（和电脑上同一份，带分组、账号、联系我们）。以前是顶上一条横着滑的按钮，管理员 20 多项只露 3～4 项 ---------- */
.mtop, .side-close, .side-dim { display: none; }
@media (max-width: 991.98px) {
  html { scroll-padding-top: 64px; }                      /* 点页内链接跳过去时，不被顶上那一条挡住 */
  .app { flex-direction: column; }
  .mtop { display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 1030; min-height: 56px;
          padding: .5rem .75rem .5rem 1rem; background: var(--m-nav); color: #fff; }
  .mtop-brand { flex: none; display: flex; align-items: center; }
  .mtop-brand .brand-logo { height: 24px; width: auto; display: block; }
  .mtop-title { flex: 1 1 auto; min-width: 0; font-size: var(--fs-body); font-weight: 600; line-height: 1.3; color: #fff;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mtop-menu { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .35rem .9rem; border-radius: 8px;
               border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .08); color: #fff;
               font-size: var(--fs-body); font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer; }
  .mtop-menu > i { font-size: 1.4rem; line-height: 1; }
  .mtop-menu:hover, .mtop-menu:focus-visible { background: rgba(255, 255, 255, .18); }
  .mtop-menu .chip { padding: .05rem .5rem; }
  /* 滑出来的菜单：关着时整个藏起来（Tab 键也到不了），开着时盖在页面上面 */
  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 1045; width: min(320px, 86vw); height: 100%; flex: none;
          transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s;
          box-shadow: 0 0 28px rgba(0, 0, 0, .35); }
  .nav-open .side { transform: none; visibility: visible; transition: transform .22s ease; }
  .side-close { display: inline-flex; align-items: center; gap: .35rem; position: absolute; top: .65rem; right: .65rem; z-index: 1;
                min-height: 44px; padding: .35rem .8rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .3);
                background: rgba(255, 255, 255, .08); color: #fff; font-size: var(--fs-sub); font-weight: 600; cursor: pointer; }
  .side-close:hover, .side-close:focus-visible { background: rgba(255, 255, 255, .18); }
  .side-brand { padding: 1rem 1.25rem 1.1rem; padding-right: 7rem; }
  .side-brand .brand-logo { height: 32px; }
  .side-dim { display: block; position: fixed; inset: 0; z-index: 1040; background: rgba(10, 15, 51, .5);
              opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility 0s linear .22s; }
  .nav-open .side-dim { opacity: 1; visibility: visible; transition: opacity .22s ease; }
  html.nav-open, html.nav-open body { overflow: hidden; }   /* 菜单开着时后面的页面不跟着滚 */
  .pagehead .inner, .content { padding-left: 1rem; padding-right: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .side, .side-dim { transition: none !important; } }

/* ---------- 联系我们：全站统一的联系方式（site_contact）。
   电脑上在左边菜单底部；手机上在每页最下面（不用打开菜单就看得到） ---------- */
.contact { font-size: var(--fs-sub); line-height: 1.5; }
.contact-h { display: flex; align-items: center; gap: .45rem; font-weight: 650; margin-bottom: .45rem; }
.contact-p + .contact-p { margin-top: .6rem; padding-top: .6rem; }
.contact-name { font-weight: 650; }
.contact-row { display: grid; grid-template-columns: 1.2rem auto minmax(0, 1fr); column-gap: .4rem; align-items: baseline; margin-top: .15rem; }
.contact-row .k { white-space: nowrap; }
.contact-row .v { overflow-wrap: anywhere; min-width: 0; }
.contact-row .v a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.contact-none { margin: 0; }
/* 新客户页和设置页预览；只用公共变量，旧界面也能显示。 */
.contact-card { padding: 1.25rem; margin-top: 1rem; border: 1px solid var(--m-border); border-radius: var(--m-radius); background: var(--m-surface); color: var(--m-text); font-size: var(--fs-body); }
.contact-card .contact-h { font-size: var(--fs-head); margin-bottom: 1rem; }
.contact-card .contact-p { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 1rem; }
.contact-card .contact-row { grid-template-columns: 1.2rem minmax(0, 1fr) auto; gap: .25rem .4rem; margin: 0; }
.contact-card .contact-row i, .contact-card .k { color: var(--m-muted); font-size: var(--fs-sub); }
.contact-card .v { grid-column: 1 / -1; font-size: var(--fs-body); overflow-wrap: break-word; }
.contact-card .v a { color: var(--m-blue-text); }
.contact-card .num-font { font-family: monospace; }
.contact-card .contact-row .btn { grid-column: 1 / -1; grid-row: auto; justify-self: start; padding: .25rem .5rem; }
.contact-card textarea { grid-column: 1 / -1; width: 100%; }
@media (min-width: 1200px) { .cust2 .contact-card { top: 1rem; margin-top: 0; } .cust2 #contact:not(:has(.cust2-info)) .contact-card { position: sticky; } .cust2 .contact-card .contact-p { grid-template-columns: minmax(0, 1fr); } }
.contact-side { flex-shrink: 0; margin: 1rem .75rem 0; padding: .85rem .9rem; border-radius: 10px; background: rgba(255, 255, 255, .06);
                border: 1px solid rgba(255, 255, 255, .1); color: #CDD2F2; }
.contact-side .contact-h, .contact-side .contact-name { color: #fff; }
.contact-side .contact-row i, .contact-side .contact-row .k { color: #9097C9; }
.contact-side .contact-p + .contact-p { border-top: 1px solid rgba(255, 255, 255, .1); }
.contact-side .contact-row { grid-template-columns: 1.2rem minmax(0, 1fr); margin-top: .3rem; }   /* 菜单只有 232px 宽：名称一行、内容换到下一行，邮箱、时间不被挤碎 */
.contact-side .contact-row .v { grid-column: 2; color: #fff; }
/* 邮箱（总验证）：在连字符处断成两行（kefu- / li@…）看着像两样东西：不缩进、占满一行，太长时排满了才断 */
.contact-side .contact-row .v:has(> a[href^="mailto:"]) { grid-column: 1 / -1; }
.contact-side .contact-row .v a[href^="mailto:"] { word-break: break-all; }
/* 标题里的小字（客户票页“票 DM-01 [已打印] 10-08”的日期）：小一号、不加粗、灰色，不像票号的一部分（总验证） */
.title .sub { font-size: var(--fs-sub); font-weight: 400; color: var(--m-muted); }
.contact-foot { display: none; }
@media (max-width: 991.98px) {
  .contact-side { display: none; }                   /* 手机上菜单里不重复（每页最下面已经有） */
  .contact-foot { display: block; margin-top: 2rem; padding: 1rem 1.1rem; border-radius: var(--m-radius); background: var(--m-surface);
                  border: 1px solid var(--m-border); }
  .contact-foot .contact-h i, .contact-foot .contact-row i, .contact-foot .contact-row .k { color: var(--m-muted); }
  .contact-foot .contact-p + .contact-p { border-top: 1px solid var(--m-border); }
}

/* ---------- 卡片 ---------- */
.card { --tblr-card-border-color: var(--m-border); --tblr-card-border-radius: var(--m-radius);
        --tblr-card-box-shadow: var(--m-shadow); --tblr-card-spacer-x: 1.5rem; --tblr-card-spacer-y: 1.25rem;
        --tblr-card-cap-bg: var(--m-surface); --tblr-card-cap-padding-x: 1.5rem; --tblr-card-cap-padding-y: 1rem; }
.card + .card { margin-top: 0; }
.card-header { min-height: 3.5rem; }
.card-title { font-size: 1.1875rem; font-weight: 650; margin: 0; display: flex; align-items: center; gap: .5rem; }
.card-title i { color: var(--m-muted); }
.card-footer { background: var(--m-subtle); border-top: 1px solid var(--m-border); }
.section-title { font-size: 1.1875rem; font-weight: 650; margin: 0 0 .75rem; display: flex; align-items: center; gap: .5rem; }
.section-title i { color: var(--m-muted); }
.stack { display: flex; flex-direction: column; gap: 1rem; }

/* ---------- 按钮 ---------- */
.btn { --tblr-btn-font-size: var(--fs-body); --tblr-btn-font-weight: 600; --tblr-btn-padding-x: 1.1rem; --tblr-btn-padding-y: .55rem;
       --tblr-btn-border-radius: 8px; min-height: 44px; gap: .45rem; box-shadow: none; }
.btn i { font-size: 1.1em; }
.btn-lg { --tblr-btn-font-size: var(--fs-head); --tblr-btn-padding-x: 1.5rem; --tblr-btn-padding-y: .7rem; min-height: 52px; }
.btn-sm { --tblr-btn-font-size: .9375rem; --tblr-btn-padding-x: .8rem; --tblr-btn-padding-y: .3rem; min-height: 36px; }
.btn-primary { --tblr-btn-bg: var(--m-primary); --tblr-btn-hover-bg: #000CB0; --tblr-btn-active-bg: #000CB0; }
.btn-success { --tblr-btn-bg: var(--m-green); --tblr-btn-hover-bg: #238039; --tblr-btn-active-bg: #238039;
               --tblr-btn-color: #fff; --tblr-btn-hover-color: #fff; --tblr-btn-border-color: transparent; }
.btn-white, .btn-outline-secondary { --tblr-btn-bg: #fff; --tblr-btn-color: var(--m-text); --tblr-btn-border-color: var(--m-border-strong);
       --tblr-btn-hover-bg: var(--m-subtle); --tblr-btn-hover-color: var(--m-text); --tblr-btn-hover-border-color: #aeb8c7;
       --tblr-btn-active-bg: var(--m-gray-soft); --tblr-btn-active-color: var(--m-text); }
.btn-outline-primary { --tblr-btn-bg: #fff; --tblr-btn-color: var(--m-blue-text); --tblr-btn-border-color: #A8B0F5;
       --tblr-btn-hover-bg: var(--m-primary-soft); --tblr-btn-hover-color: var(--m-blue-text); --tblr-btn-hover-border-color: #7A86F0;
       --tblr-btn-active-bg: var(--m-primary-soft); --tblr-btn-active-color: var(--m-blue-text); }
.btn-outline-danger { --tblr-btn-bg: #fff; --tblr-btn-color: var(--m-red-text); --tblr-btn-border-color: #eab3b3;
       --tblr-btn-hover-bg: var(--m-red-soft); --tblr-btn-hover-color: var(--m-red-text); --tblr-btn-hover-border-color: #de8e8e;
       --tblr-btn-active-bg: var(--m-red-soft); --tblr-btn-active-color: var(--m-red-text); }
.btn-ghost { --tblr-btn-bg: transparent; --tblr-btn-color: var(--m-muted); --tblr-btn-border-color: transparent;
       --tblr-btn-hover-bg: var(--m-gray-soft); --tblr-btn-hover-color: var(--m-text); --tblr-btn-hover-border-color: transparent;
       --tblr-btn-active-bg: var(--m-gray-soft); }
.btn-done { --tblr-btn-bg: var(--m-green); --tblr-btn-color: #fff; --tblr-btn-border-color: var(--m-green); }
/* 筛选用的分段按钮（V1.21）：浅蓝底，选中的是白底蓝字加粗；筛选不用实心蓝按钮（实心蓝只留给“这一步要做的事”）。
   <div class="seg" role="group" aria-label="筛选"><a class="on" aria-current="page" href="…">全部</a><a href="…">进行中</a></div>
   也可以放单选框：<label><input type="radio" name="x"><span>全部</span></label> */
.seg { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border-radius: 10px; background: var(--m-primary-soft); max-width: 100%; }
.seg > a, .seg > button, .seg > label > span { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .35rem .95rem;
       border: 0; border-radius: 8px; background: transparent; color: var(--m-blue-text); font-size: var(--fs-sub); font-weight: 600;
       line-height: 1.3; white-space: nowrap; cursor: pointer; text-decoration: none; }
.seg > label { margin: 0; position: relative; }
.seg > label > input { position: absolute; opacity: 0; pointer-events: none; }
.seg > a:hover, .seg > button:hover, .seg > label > span:hover { background: rgba(255, 255, 255, .6); }
.seg > .on, .seg > [aria-current="page"], .seg > [aria-pressed="true"], .seg > label > input:checked + span {
       background: #fff; color: var(--m-blue-text); font-weight: 700; box-shadow: 0 1px 2px rgba(16, 24, 40, .12), 0 0 0 1px #c4caf7; }
.seg > a:focus-visible, .seg > button:focus-visible, .seg > label > input:focus-visible + span { outline: 3px solid rgba(0, 16, 221, .35); outline-offset: 1px; }
.seg .chip { font-size: var(--fs-min); padding: 0 .45rem; }
/* 「更多 ▾」下拉（Tabler 自带：data-bs-toggle="dropdown"）：危险的一项放最下面、上面隔一条线、红字（.danger），点了一定再确认 */
.dropdown-menu { --tblr-dropdown-font-size: var(--fs-body); min-width: 14rem; padding: .35rem; border-radius: 10px; }
.dropdown-menu .dropdown-item { display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .85rem; border-radius: 6px;
       font-size: var(--fs-body); white-space: normal; }
.dropdown-menu .dropdown-item > i { color: var(--m-muted); width: 1.2rem; text-align: center; }
.dropdown-menu .dropdown-item.danger, .dropdown-menu .dropdown-item.danger > i { color: var(--m-bad-text); }
.dropdown-menu .dropdown-item.danger:hover, .dropdown-menu .dropdown-item.danger:focus { background: var(--m-bad-soft); }
.dropdown-menu form { margin: 0; }
.dropdown-menu button.dropdown-item { width: 100%; text-align: left; background: none; border: 0; }

/* ---------- 状态小标签（颜色 + 图标 + 文字） ---------- */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .9375rem;
        font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--m-gray-soft); color: var(--m-muted); }
.chip i { font-size: .95em; }
.chip-red { background: var(--m-red-soft); color: var(--m-red-text); }
.chip-amber { background: var(--m-amber-soft); color: var(--m-amber-text); }
.chip-green { background: var(--m-green-soft); color: var(--m-green-text); }
.chip-blue { background: var(--m-primary-soft); color: var(--m-blue-text); }
.chip-purple { background: var(--m-note-soft); color: var(--m-note); }   /* V1.21：紫色只表示管理员（角色标签 chip-role-admin）；以前用紫色的混装、整票、返货、单箱、平台这些说明标签一律灰底（旁边配图标） */
.chip-solid-red { background: var(--m-red); color: #fff; }
.chip-solid-amber { background: var(--m-amber); color: #fff; }
.chip-lg { font-size: var(--fs-body); padding: .3rem .8rem; }
.chips { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
/* V1.21：按意思取色的状态标签（新页面用这几个；模板里 {% chip "ok" "已完成" "完了" %} 会自动配图标，见 inbound/templatetags/ui.py） */
.chip-ok { background: var(--m-ok-soft); color: var(--m-ok-text); }
.chip-warn { background: var(--m-warn-soft); color: var(--m-warn-text); }
.chip-bad { background: var(--m-bad-soft); color: var(--m-bad-text); }
.chip-note { background: var(--m-note-soft); color: var(--m-note); }
.chip-doing { background: #fff; color: var(--m-blue-text); box-shadow: inset 0 0 0 1.5px var(--m-primary); }   /* 正在进行：蓝描边 */
/* 角色标签：只用在角色上，永远写着角色名 */
.chip-role-admin { background: var(--r-admin-soft); color: var(--r-admin); }
.chip-role-kefu { background: var(--r-kefu-soft); color: var(--r-kefu); }
.chip-role-wh { background: var(--r-wh-soft); color: var(--r-wh); }
.chip-role-cust { background: var(--r-cust-soft); color: var(--r-cust); }

/* ---------- 提示条 ---------- */
.notice { display: flex; align-items: flex-start; gap: .75rem; padding: .9rem 1.1rem; border-radius: var(--m-radius-sm);
          border: 1px solid; margin-bottom: 1rem; font-size: 1.0625rem; }
.notice > i { font-size: 1.3rem; line-height: 1.3; }
.notice .grow { flex: 1 1 auto; }
.notice-ok { background: var(--m-green-soft); border-color: #bfe3c8; color: #17602b; }
.notice-err { background: var(--m-red-soft); border-color: #f1c2c2; color: #8e1f1f; }
.notice-warn { background: var(--m-amber-soft); border-color: #f3d9a6; color: #7a4a00; }
.notice-info { background: var(--m-gray-soft); border-color: var(--m-border-strong); color: var(--m-text, inherit); }   /* V1.21：说明不再用蓝色（和按钮、链接分开），和 notice-note 一样 */
.notice-info > i { color: var(--m-muted); }
.notice-note { background: var(--m-gray-soft); border-color: var(--m-border-strong); color: var(--m-text, inherit); }   /* 说明（messages.info，V1.15） */
.notice-note > i { color: var(--m-muted); }
.notice-closed { background: var(--m-gray-soft); border-color: var(--m-border-strong); color: var(--m-text, inherit); }   /* 柜子已完成（V1.10） */
.notice-closed > i { color: var(--m-muted); }
.chk { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .9375rem; }
.chip-gray { background: var(--m-gray-soft); color: var(--m-muted); }
tr.is-closed td { color: var(--m-muted); }
.notice .close { background: none; border: 0; color: inherit; opacity: .6; font-size: 1.2rem; line-height: 1; padding: 0 .2rem; cursor: pointer; }
.notice .close:hover { opacity: 1; }
/* 提示条右边的处理按钮（V1.21，{% notice "err" %}…{% action %}…{% endnotice %}）：出错一定写“出了什么事 + 一个处理按钮” */
.notice-act { flex: none; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; align-self: center; }
.notice-act form { margin: 0; }
@media (max-width: 575.98px) { .notice-act { flex: 1 1 100%; } .notice-act .btn { flex: 1 1 auto; } }
/* 技术细节收起来（出错提示条里）：<details class="tech"><summary>技术说明（给维护的人看，点开）</summary>…</details> */
.tech { margin-top: .4rem; font-size: var(--fs-sub); }
.tech > summary { display: inline-flex; align-items: center; gap: .35rem; color: var(--m-muted); text-decoration: underline; text-underline-offset: 2px; }
.tech > summary::before { content: "\F282"; font-family: "bootstrap-icons"; font-size: .8em; transition: transform .15s; }
.tech[open] > summary::before { transform: rotate(180deg); }
.tech > :not(summary) { margin-top: .35rem; color: var(--m-muted); overflow-wrap: anywhere; }

/* ---------- 表格 ---------- */
.table { --tblr-table-color: var(--m-text); font-size: var(--fs-body); margin: 0; }
.table > :not(caption) > * > * { padding: .8rem 1rem; border-bottom-color: var(--m-border); }
.table thead th { background: var(--m-subtle); color: var(--m-muted); font-size: .9375rem; font-weight: 600;
                  text-transform: none; letter-spacing: 0; white-space: nowrap; padding-top: .65rem; padding-bottom: .65rem; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { --tblr-table-bg-state: #f5f9ff; }
.table .sub { color: var(--m-muted); font-size: .9375rem; }
.row-link { cursor: pointer; }
.table-compact > :not(caption) > * > * { padding: .55rem .9rem; }
/* 手机上表格变卡片（V1.21，只用 CSS）：<table class="table tcards">，每个 <td data-label="状态"> 写上列名；
   第一列（.tc-main）是名称 + 状态，占满一行；次要的列加 d-none d-md-table-cell 在手机上藏起来 */
@media (max-width: 767.98px) {
  .tcards thead { display: none; }
  .tcards, .tcards tbody, .tcards tr, .tcards td { display: block; width: 100%; }
  .tcards tbody tr { border: 1px solid var(--m-border); border-radius: var(--m-radius-sm); background: var(--m-surface); margin-bottom: .75rem; padding: .35rem 0; }
  .tcards.table > :not(caption) > * > * { border-bottom: 0; padding: .3rem 1rem; }
  .tcards.table > :not(caption) > * > [data-label] { position: relative; padding-left: calc(35% + 1.5rem); min-height: 2rem; }   /* 左边列名、右边内容（内容里几个元素照常上下排） */
  .tcards td[data-label]::before { content: attr(data-label); position: absolute; left: 1rem; top: .3rem; width: 35%;
                                   color: var(--m-muted); font-size: var(--fs-sub); overflow-wrap: anywhere; }
  .tcards td.tc-main { font-weight: 650; padding-top: .55rem; padding-bottom: .45rem; }
}
/* 时间跟账号设的时区显示（V1.22）：一张表、一块里只在表头或标题写一次“北京时间 / 日本时间”（.tzn），不每个时间都写。
   手机上 tcards 的表头藏起来了，改用表格上面的一行（<caption class="tz-cap">，电脑上不显示） */
.tzn { font-size: var(--fs-min); font-weight: 400; color: var(--m-muted); white-space: nowrap; }
.fw-bold > .tzn, .muted + .tzn { margin-left: .4rem; }
th .tzn { display: block; line-height: 1.2; }   /* 表头里另起一行小字写在列名下面：不把这一列撑宽（1280 宽时表格照样放得下） */
.meta > .tzn { font-size: inherit; }   /* 页头那一排：和旁边的字一样大 */
.tz-cap { display: none; }
@media (max-width: 767.98px) {
  .tcards > caption.tz-cap { display: block; caption-side: top; padding: .25rem 1rem .5rem; color: var(--m-muted); font-size: var(--fs-min); }
}

/* ---------- 标签页（页面上的一排切换） ---------- */
.tabbar { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--m-border-strong); margin-bottom: 1.25rem; }
.tabbar a { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.1rem; margin-bottom: -1px; font-size: 1.0625rem;
            font-weight: 600; color: var(--m-muted); border-bottom: 3px solid transparent; }
.tabbar a:hover { color: var(--m-text); }
.tabbar a.active { color: var(--m-primary); border-bottom-color: var(--m-primary); }
.tabbar a .chip { font-size: var(--fs-min); padding: .05rem .5rem; }

/* ---------- 流程进度（上传 → 核对 → 处理问题 → 发布 → 打印） ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.flow .step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 .5rem; }
.flow .step::before { content: ""; position: absolute; top: 21px; left: calc(-50% + 26px); right: calc(50% + 26px); height: 3px;
                      background: var(--m-border); border-radius: 2px; }
.flow .step:first-child::before { display: none; }
.flow .step.done::before, .flow .step.now::before, .flow .step.warn::before, .flow .step.wait::before { background: #9fd3ad; }
.flow .dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-body);
             background: var(--m-gray-soft); color: var(--m-faint); border: 2px solid var(--m-border); position: relative; z-index: 1; }
.flow .done .dot { background: var(--m-green); border-color: var(--m-green); color: #fff; }
.flow .now .dot { background: var(--m-primary); border-color: var(--m-primary); color: #fff; box-shadow: 0 0 0 5px var(--m-primary-soft); }
.flow .warn .dot { background: var(--m-amber); border-color: var(--m-amber); color: #fff; box-shadow: 0 0 0 5px var(--m-amber-soft); }
.flow .stop .dot { background: var(--m-red); border-color: var(--m-red); color: #fff; box-shadow: 0 0 0 5px var(--m-red-soft); }
.flow .wait .dot { background: var(--m-amber); border-color: var(--m-amber); color: #fff; box-shadow: 0 0 0 5px var(--m-amber-soft); }   /* 等客户回复（总验证：以前是红色“必须处理”） */
.flow .name { margin-top: .6rem; font-weight: 600; font-size: 1.0625rem; }
.flow .todo .name { color: var(--m-faint); }
.flow .desc { color: var(--m-muted); font-size: .9375rem; line-height: 1.45; margin-top: .15rem; }
.flow .desc b { color: var(--m-text); }
.flow .here { display: inline-block; margin-top: .35rem; padding: .05rem .6rem; border-radius: 999px; font-size: .8125rem; font-weight: 700;
              background: var(--m-primary); color: #fff; }                  /* “现在在这一步”（V1.10） */
.flow .stop .here { background: var(--m-red); }
.flow .wait .here { background: var(--m-amber-text); }
.nextbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.25rem; padding: 1rem 1.25rem;
           border-radius: var(--m-radius-sm); background: var(--m-primary-soft); border: 1px solid #cddcf3; }
.nextbar .ico { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--m-primary); display: grid;
                place-items: center; font-size: 1.35rem; flex: 0 0 auto; }
.nextbar .grow { flex: 1 1 300px; min-width: 0; }
.nextbar .what { font-size: 1.1875rem; font-weight: 650; line-height: 1.4; }
.nextbar .why { color: var(--m-muted); font-size: .9375rem; margin-top: .15rem; }
.nextbar.ok { background: var(--m-green-soft); border-color: #c3e5cc; }
.nextbar.ok .ico { color: var(--m-green); }
.nextbar.warn { background: var(--m-amber-soft); border-color: #f1d9ab; }
.nextbar.warn .ico { color: var(--m-amber); }
@media (max-width: 767.98px) {
  .flow { grid-template-columns: 1fr; gap: .75rem; }
  .flow .step { flex-direction: row; flex-wrap: wrap; text-align: left; gap: .25rem .75rem; align-items: flex-start; }
  .flow .step::before { display: none; }
  .flow .name { margin-top: .55rem; white-space: nowrap; min-width: 5.5em; }
  .flow .desc { flex: 1 1 0; min-width: 0; margin-top: .6rem; }
  .flow .here { flex-basis: 100%; width: max-content; max-width: max-content; margin: 0 0 0 calc(44px + .75rem); }
}

/* ---------- 数字一排 ---------- */
.kpis { display: grid; gap: 1px; background: var(--m-border); border-radius: var(--m-radius) var(--m-radius) 0 0; overflow: hidden; }
.kpis:last-child { border-radius: var(--m-radius); }
.kpis-6 { grid-template-columns: repeat(6, 1fr); }
.kpis-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1199.98px) { .kpis-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575.98px) { .kpis-6, .kpis-4 { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 1.1rem 1.5rem; background: var(--m-surface); }
.kpi .lbl { color: var(--m-muted); font-size: .9375rem; display: flex; align-items: center; gap: .4rem; }
html[lang="ja"] .kpi .lbl { word-break: keep-all; overflow-wrap: break-word; }   /* 日语“FBA 箱ラベル”只在空格处换行，不断成“箱ラベ / ル”（总验证）；
   V1.22：以前是 anywhere，“Transparency”这种英文词也被拆成“Transparenc / y”——改成 break-word（一个词整行都放不下才拆） */
@media (min-width: 1200px) and (max-width: 1439.98px) { .kpis-6 .kpi { padding-left: 1.25rem; padding-right: 1.25rem; } }   /* 1280 宽 6 格时每格少留一点边，“Transparency”放得下一行 */
.kpi .val { font-size: 1.875rem; font-weight: 700; line-height: 1.25; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: var(--fs-body); font-weight: 500; color: var(--m-muted); margin-left: .2rem; }

/* ---------- 一组问题 ---------- */
.issue { border-left: 4px solid var(--m-border-strong); }
.issue.red { border-left-color: var(--m-red); }
.issue.yellow { border-left-color: var(--m-amber); }
.issue .card-header { gap: .75rem; flex-wrap: wrap; }
.issue .count { color: var(--m-muted); font-size: .9375rem; white-space: nowrap; }
.issue .explain { color: var(--m-muted); margin: 0 0 .9rem; display: flex; gap: .5rem; }
.issue .explain i { color: var(--m-faint); margin-top: .15rem; }
.issue .items { border: 1px solid var(--m-border); border-radius: var(--m-radius-sm); overflow: hidden; }
.issue .items .table thead th { background: var(--m-subtle); }
.issue .tip { color: var(--m-muted); font-size: .9375rem; margin-top: .25rem; display: flex; gap: .35rem; }
.issue .tip i { color: var(--m-amber); }
/* 问题：这是什么 / 不处理会怎样 / 怎么处理 */
.guide3 { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0 0 1rem;
          background: var(--m-subtle); border: 1px solid var(--m-border); border-radius: var(--m-radius-sm); padding: .8rem 1rem; }
.guide3 dt { color: var(--m-muted); font-weight: 600; white-space: nowrap; }
.guide3 dd { margin: 0; }
@media (max-width: 640px) { .guide3 { grid-template-columns: 1fr; } .guide3 dd { margin-bottom: .4rem; } }
.issue-sec { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 .75rem; font-size: 1.1875rem; font-weight: 650; }
.issue-sec .muted { font-size: .9375rem; font-weight: 400; }
/* 证据：客户 Excel 原来那一行、标签小图 */
.evid { margin-top: .6rem; padding: .6rem .75rem; border: 1px dashed var(--m-border-strong); border-radius: var(--m-radius-sm); background: var(--m-surface); }
.evid-t { font-size: var(--fs-sub); font-weight: 650; color: var(--m-muted); margin-bottom: .35rem; display: flex; gap: .35rem; }
.erow + .erow { margin-top: .5rem; }
.esrc { font-size: .9375rem; color: var(--m-blue-text); display: flex; gap: .35rem; flex-wrap: wrap; }
/* 证据表（客户 Excel 原来那一行）：每一格能换行就换行（只在空格、连字符处换：中文词、英文单词不拆开；8 个字以内的短编号如“DQ-02”整个不拆），
   整张表尽量放进框里；一格最宽 15em，再长的才在格子里拆开。列太多实在放不下才在框里左右滑：右边还有内容时框的右边渐隐，
   下面写“表格比框宽：左右滑动看右边的列”（脚本在 base.html）。以前每格不换行，1280 宽时最后一列“总数量”只露出一半、看不出能滑（V1.21 总验证） */
.ecells { overflow-x: auto; margin-top: .2rem; max-width: 100%; }
.ecells table { border-collapse: collapse; font-size: var(--fs-sub); }
.ecells th, .ecells td { border: 1px solid var(--m-border); padding: .2rem .3rem; vertical-align: top; }
.ecells .c { max-width: 15em; word-break: keep-all; overflow-wrap: break-word; }
.ecells .c.nw { white-space: nowrap; }
.evid .ecells tr:last-child > td { border-bottom: 1px solid var(--m-border); }   /* 外面的 .table 规则会把最后一行底线去掉（以前证据表下边没有线） */
.ecells th { background: var(--m-subtle); color: var(--m-muted); font-weight: 600; font-size: var(--fs-min); }
/* V1.22：货柜号、票号这类编号整个不拆（模板 whole_cell：以前只看长度，“DEMO-2610C”“QD-68-767CT”在连字符处断成两行）；
   为了 1280 宽时整张表照样放得进框里，每格左右少留一点、表头（灰色小字）用最小号 */
.ecells td.rowno { color: var(--m-blue-text); font-weight: 650; text-align: right; white-space: nowrap; }   /* 行号不拆（下面 .issue .items td 的 anywhere 会管到这一格：窄框里“1284”断成“12 / 84”，V1.21 复查） */
.ecells.more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent);
                 mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent); }
.ecells.more-l { -webkit-mask-image: linear-gradient(to right, transparent, #000 3rem); mask-image: linear-gradient(to right, transparent, #000 3rem); }
.ecells.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent);
                        mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent); }
.ecells-hint { display: flex; align-items: center; gap: .35rem; margin-top: .25rem; font-size: var(--fs-min); color: var(--m-muted); }
.ecells-hint[hidden] { display: none; }
.issue .where-col { width: 160px; min-width: 160px; overflow-wrap: anywhere; }   /* 以前 215px：1280 宽时右边说明和证据表太挤（V1.21 总验证） */
/* 问题明细表（员工问题页、客户“查看详情”）：外面这张表定宽排版，每一格按表头的宽，说明自己换行，很宽的证据表在自己那一格里左右滑。
   以前只有员工页有这几条（containers.css），客户柜子页“查看详情”展开后表格比外框宽约 126px，“说明”右边被切掉（V1.21 总验证） */
.issue .items > .table-responsive > .table { table-layout: fixed; width: 100%; }
.issue .items .ecells { max-width: 100%; }
.issue .items td { overflow-wrap: anywhere; }
.issue .items .evid { max-width: 100%; overflow: hidden; }
@media (max-width: 767.98px) {   /* 手机上每一处上下排：“在哪里”一行，下面说明和证据、处理按钮 */
  .issue .items > .table-responsive > .table > thead { display: none; }
  .issue .items > .table-responsive > .table, .issue .items > .table-responsive > .table > tbody,
  .issue .items > .table-responsive > .table > tbody > tr { display: block; width: 100%; }
  .issue .items > .table-responsive > .table > tbody[style*="table-row-group"] { display: block !important; }   /* “还有 N 处”展开后 */
  .issue .items > .table-responsive > .table > tbody > tr > td { display: block; width: 100%; min-width: 0; max-width: 100%; }
  .issue .items > .table-responsive > .table > tbody > tr > td.where-col { border-bottom: 0; padding-bottom: 0; }
}
.efact { font-size: .9375rem; margin-top: .4rem; display: flex; gap: .35rem; }
.efact i { color: var(--m-blue-text); margin-top: .15rem; }
.elabels { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.elabel { display: flex; flex-direction: column; width: 150px; border: 1px solid var(--m-border); border-radius: 6px; overflow: hidden;
          color: var(--m-text); text-decoration: none; background: var(--m-surface); }
.elabel img { width: 100%; height: 110px; object-fit: contain; background: var(--m-subtle); border-bottom: 1px solid var(--m-border); }
.elabel span { font-size: var(--fs-min); line-height: 1.35; padding: .25rem .4rem; color: var(--m-muted); word-break: break-all; }
a.elabel:hover { border-color: var(--m-blue-text); }
.actbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.actbar .note { flex: 1 1 260px; min-width: 220px; max-width: 420px; }
.actbar .lead { width: 100%; color: var(--m-muted); font-size: .9375rem; margin-bottom: -.1rem; }
.copybox { display: none; width: 100%; min-height: 340px; font-size: var(--fs-body); line-height: 1.7; margin-top: .75rem;
           background: var(--m-subtle); }
.more-btn { margin-top: .5rem; }

/* ---------- 标签图片 / 打印顺序 ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.tile { background: var(--m-surface); border: 1px solid var(--m-border); border-radius: var(--m-radius-sm); overflow: hidden;
        display: flex; flex-direction: column; box-shadow: var(--m-shadow); }
.tile .pic { height: 170px; display: flex; align-items: center; justify-content: center; background: #f6f7f9;
             border-bottom: 1px solid var(--m-border); padding: .6rem; }
.tile .pic img { max-width: 100%; max-height: 150px; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px #e3e6ea; }
.tile .body { padding: .7rem .85rem .85rem; display: flex; flex-direction: column; gap: .3rem; }
.tile .step-no { font-size: var(--fs-min); color: var(--m-faint); }
.tile .name { font-weight: 600; word-break: break-all; line-height: 1.4; }
.tile .copies { font-size: var(--fs-head); font-weight: 700; color: var(--m-text); }
.tile.bad { border-color: #eab3b3; }
.tile.swap { border: 2px dashed #efc36b; background: var(--m-amber-soft); box-shadow: none; }
.tile.swap .pic { background: transparent; border: 0; color: var(--m-amber); font-size: 2.6rem; }
.printer-head { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 .9rem; }
.printer-head:first-child { margin-top: 0; }
.printer-head .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--m-primary-soft); color: var(--m-primary);
                     display: grid; place-items: center; font-size: 1.25rem; }
.printer-head .t { font-size: 1.1875rem; font-weight: 650; line-height: 1.3; }
.printer-head .s { color: var(--m-muted); font-size: .9375rem; }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 3.5rem 1rem; }
.empty-state .ico { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem;
                    background: var(--m-gray-soft); color: var(--m-faint); font-size: 2.2rem; }
.empty-state.ok .ico { background: var(--m-green-soft); color: var(--m-green); }
.empty-state .t { font-size: var(--fs-head); font-weight: 650; }
.empty-state .s { color: var(--m-muted); margin-top: .35rem; }
.empty-state .a { margin-top: 1.25rem; }
/* V1.21：空页 = 图标 + “现在没有 X” + 下一步（谁、去哪做）。放在卡片里用小一号的 empty-state-sm */
.empty-state.warn .ico { background: var(--m-warn-soft); color: var(--m-warn); }
.empty-state-sm { padding: 1.75rem 1rem; }
.empty-state-sm .ico { width: 56px; height: 56px; font-size: 1.6rem; margin-bottom: .75rem; }
.empty-state-sm .t { font-size: var(--fs-head); }
.empty-state .next { display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; padding: .3rem .8rem; border-radius: 999px;
                     background: var(--m-note-soft); color: var(--m-text); font-size: var(--fs-sub); }
.empty-state .next > i { color: var(--m-muted); }

/* ---------- 表单 ---------- */
.form-control, .form-select { font-size: 1.0625rem; min-height: 44px; border-color: var(--m-border-strong); border-radius: 8px; }
.form-control-lg, .form-select-lg { font-size: var(--fs-head); min-height: 52px; }
.form-control:focus, .form-select:focus { border-color: #7A86F0; box-shadow: 0 0 0 3px rgba(0, 16, 221, .15); }
.form-label { font-weight: 600; font-size: var(--fs-body); margin-bottom: .4rem; }
.form-hint { color: var(--m-muted); font-size: .9375rem; margin-top: .35rem; }
.search { position: relative; }
.search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--m-faint); }
.search .form-control { padding-left: 2.5rem; }

/* 上传页：带编号的步骤 */
.fstep { display: flex; gap: 1rem; padding: 1.4rem 0; border-top: 1px solid var(--m-border); }
.fstep:first-child { border-top: 0; padding-top: .25rem; }
.fstep .no { width: 34px; height: 34px; border-radius: 50%; background: var(--m-primary-soft); color: var(--m-primary);
             display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.fstep .grow { flex: 1 1 auto; min-width: 0; }
.fstep h3 { font-size: 1.1875rem; font-weight: 650; margin: .15rem 0 .75rem; }
.pick { display: flex; flex-wrap: wrap; gap: .6rem; }
.pick label { cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; gap: .5rem; min-width: 120px; justify-content: center; padding: .75rem 1.25rem;
             border: 2px solid var(--m-border-strong); border-radius: 10px; font-size: 1.1875rem; font-weight: 600; background: var(--m-surface); }
.pick span:hover { border-color: #7A86F0; }
.pick input:checked + span { border-color: var(--m-primary); background: var(--m-primary-soft); color: var(--m-blue-text); }
.pick input:checked + span::before { content: "\F26A"; font-family: "bootstrap-icons"; font-weight: normal; }
.pick input:disabled + span { color: var(--m-muted); background: var(--m-subtle); border-color: var(--m-border); cursor: not-allowed; }
.kefu2-error { color: var(--m-red-text); }
.drop { display: block; border: 2px dashed var(--m-border-strong); border-radius: var(--m-radius); padding: 2rem 1rem; text-align: center;
        cursor: pointer; background: var(--m-subtle); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--m-primary); background: var(--m-primary-soft); }
.drop .ico { font-size: 2.6rem; color: var(--m-primary); line-height: 1; }
.drop .t { font-size: 1.1875rem; font-weight: 600; margin-top: .5rem; }
.filelist { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-direction: column; gap: .4rem; }
.filelist li { display: flex; align-items: center; gap: .6rem; padding: .55rem .85rem; border: 1px solid var(--m-border); border-radius: 8px; background: var(--m-surface); }
.filelist li i { color: var(--m-green); }
.filelist li .size { margin-left: auto; color: var(--m-muted); font-size: .9375rem; white-space: nowrap; }
.bar { height: 10px; border-radius: 999px; background: var(--m-gray-soft); overflow: hidden; }
.bar > div { height: 100%; background: var(--m-green); border-radius: 999px; transition: width .2s; }
.bar-lg { height: 22px; }
.helpcard ul { padding-left: 1.2rem; margin: 0; }
.helpcard li { margin-bottom: .45rem; }

/* 登录页 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
         background: radial-gradient(1200px 600px at 10% -10%, #E4E7FF 0, transparent 60%), var(--m-bg); }
.login .box { width: 100%; max-width: 440px; min-width: 0; }
.login .card .btn { white-space: normal; }   /* V1.22：390 宽手机上登录确认页“收不到短信？请另一个管理员授权”按钮放不下一行时折行，不把整页撑出横向滚动 */
.login .brand { display: flex; flex-direction: column; align-items: center; gap: .35rem; margin-bottom: 1.6rem; }
.login .brand-logo { height: 92px; width: auto; }
.login .brand-jp { color: #0000FF; font-weight: 800; letter-spacing: .55em; padding-left: .55em; font-size: 1.05rem; line-height: 1.2; }
.login .brand .sub { color: var(--m-muted); font-size: .9375rem; }

/* 其他 */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary .when-closed { display: none; }
details:not([open]) > summary .when-open { display: none; }
.fold > summary { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.5rem; font-weight: 600; font-size: 1.0625rem; }
.fold > summary .chev { margin-left: auto; color: var(--m-faint); transition: transform .15s; }
.fold[open] > summary .chev { transform: rotate(180deg); }
.fold > summary:hover { background: var(--m-subtle); }
.fold[open] > summary { border-bottom: 1px solid var(--m-border); }
.divide > * + * { border-top: 1px solid var(--m-border); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; }
.kv dt { color: var(--m-muted); font-weight: 500; }
.kv dd { margin: 0; }
.callout { padding: .85rem 1rem; border-radius: var(--m-radius-sm); background: var(--m-amber-soft); border: 1px solid #f1d9ab; }
.callout .h { font-weight: 650; color: var(--m-amber-text); display: flex; align-items: center; gap: .4rem; margin-bottom: .25rem; }
.log { list-style: none; padding: 0; margin: .5rem 0 0; font-size: .9375rem; color: var(--m-muted); }
.log li { padding: .2rem 0; }
.pager { display: flex; gap: .5rem; }

/* 账号管理 */
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; background: var(--m-primary-soft); color: var(--m-primary);
             display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.rolepick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; }
.rolepick label { cursor: pointer; margin: 0; }
.rolepick input { position: absolute; opacity: 0; pointer-events: none; }
.rolepick label > div { height: 100%; border: 2px solid var(--m-border-strong); border-radius: 10px; padding: .8rem 1rem; background: var(--m-surface); }
.rolepick label > div:hover { border-color: #7A86F0; }
.rolepick .t { font-size: 1.1875rem; font-weight: 650; display: flex; align-items: center; gap: .4rem; }
.rolepick .h { color: var(--m-muted); font-size: .9375rem; margin-top: .15rem; line-height: 1.45; }
.rolepick input:checked + div { border-color: var(--m-primary); background: var(--m-primary-soft); }
.rolepick input:checked + div .t { color: var(--m-blue-text); }
.rolepick input:checked + div .t::before { content: "\F26A"; font-family: "bootstrap-icons"; font-weight: normal; }
.rolepick input:disabled + div { opacity: .45; cursor: not-allowed; }
.pick input:focus-visible + span, .rolepick input:focus-visible + div { outline: 3px solid rgba(0, 16, 221, .35); outline-offset: 2px; }
.login-lang { display: flex; justify-content: flex-end; gap: .25rem; margin-bottom: .75rem; }
.login-lang button { background: none; border: 1px solid var(--m-border-strong); border-radius: 999px; padding: .2rem .8rem; color: var(--m-muted); font-size: .9375rem; cursor: pointer; }
.login-lang button.on { background: var(--m-primary); border-color: var(--m-primary); color: #fff; }
/* 登录页的升级日志（2026-09-29）：灰色小字，每次最多两行，放不下就省略号（鼠标放上去看全文），不影响登录框的样子 */
/* 左下角的系统版本号 */
.side-ver { margin-top: .6rem; text-align: center; font-size: var(--fs-min); color: #7880B8; letter-spacing: .02em; }   /* V1.21：12px → 13px（最小一档） */

/* 条码重画前后对比 */
.compare { margin-top: 0; padding: .85rem; border: 1px solid var(--m-border); border-radius: var(--m-radius-sm); background: var(--m-subtle); }
.compare .pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); max-width: 980px; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.compare .cmp-side { background: var(--m-surface); border: 1px solid var(--m-border); border-radius: 8px; padding: .6rem; }
.compare .cmp-side img { width: 100%; max-height: 360px; object-fit: contain; background: #fff; display: block; margin: .4rem 0; }
.compare .cap { font-weight: 650; display: flex; align-items: center; gap: .35rem; }
.compare .cap.bad { color: var(--m-red-text); }
.compare .cap.ok { color: var(--m-green-text); }
.compare .res { font-size: .9375rem; color: var(--m-muted); }
.compare .arrow { color: var(--m-faint); font-size: 1.5rem; }
.compare .noimg { padding: 2rem; text-align: center; color: var(--m-faint); }
@media (max-width: 767.98px) { .compare .pair { grid-template-columns: 1fr; } .compare .arrow { transform: rotate(90deg); justify-self: center; } }
.table tr.no-bb > * { border-bottom: 0 !important; }

/* ---------- A4 单面指导书（inbound/guide.html）：屏幕上像一张纸，打印时按 A4 排 ---------- */
@page { size: A4 portrait; margin: 10mm 9mm; }
body.guide-page { background: var(--m-bg); font-size: 10pt; line-height: 1.4; }
.guide-bar { max-width: 210mm; margin: 12px auto; display: flex; gap: 8px; align-items: center; padding: 0 12px; }
.guide { max-width: 210mm; margin: 0 auto 24px; background: #fff; padding: 10mm 9mm; box-shadow: 0 1px 4px rgba(0,0,0,.12); color: #000; }
.guide h1 { font-size: 16pt; font-weight: 700; margin: 0 0 2mm; }
.guide .g-meta { font-size: 9pt; color: #333; display: flex; flex-wrap: wrap; gap: 2mm 6mm; margin-bottom: 3mm; }
.guide .g-sum { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid #000; margin-bottom: 3mm; }
.guide .g-sum div { padding: 1.5mm 2mm; border-right: 1px solid #000; font-size: 8.5pt; }
.guide .g-sum div:last-child { border-right: 0; }
.guide .g-sum b { display: block; font-size: 13pt; }
.guide .g-box { border: 1.5px solid #000; padding: 2mm 3mm; margin-bottom: 3mm; font-size: 9pt; }
.guide .g-box h2 { font-size: 10pt; font-weight: 700; margin: 0 0 1mm; }
.guide .g-box ul { margin: 0; padding-left: 5mm; }
.guide .g-steps { font-size: 8.5pt; color: #222; margin-bottom: 3mm; }
.guide table { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.guide th, .guide td { border: 1px solid #000; padding: 1mm 1.4mm; vertical-align: top; }
.guide th { background: #eee; font-weight: 700; text-align: left; }
.guide td.n { text-align: right; white-space: nowrap; }
.guide td.no { font-weight: 700; word-break: break-all; }
.guide td.ck { width: 11mm; }
.guide th.ck { white-space: nowrap; width: 11mm; }
.guide tr.off td { color: #666; }
.guide .tag { display: inline-block; border: 1px solid #000; border-radius: 2px; padding: 0 1mm; font-size: 7.5pt; font-weight: 700; margin-right: 1mm; }
.guide .small { font-size: 7.5pt; color: #333; }
.guide thead { display: table-header-group; }
.guide tr { page-break-inside: avoid; }
@media print {
  body.guide-page { background: #fff; }
  .guide-bar { display: none; }
  .guide { box-shadow: none; margin: 0; padding: 0; max-width: none; }
}
@media (max-width: 767.98px) { .guide { padding: 12px; } .guide .g-sum { grid-template-columns: repeat(3, 1fr); } .guide-bar { flex-wrap: wrap; } }

/* ---------- 返货作业 ---------- */
.r-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.r-step { background: var(--m-surface); border: 1px solid var(--m-border); border-radius: var(--m-radius-sm); padding: .7rem .9rem;
          display: flex; flex-direction: column; font-weight: 650; color: var(--m-muted); }
.r-step b { display: inline-flex; width: 1.7rem; height: 1.7rem; border-radius: 50%; align-items: center; justify-content: center;
            background: var(--m-gray-soft); margin-bottom: .3rem; }
.r-step small { font-weight: 400; font-size: var(--fs-sub); }
.r-step.now { border-color: var(--m-blue-text); color: var(--m-blue-text); }
.r-step.now b { background: var(--m-primary-soft); }
.r-step.done { color: var(--m-green-text); }
.r-step.done b { background: var(--m-green-soft); }
@media (max-width: 640px) { .r-steps { grid-template-columns: repeat(2, 1fr); } }
.r-ops { padding-left: 1.3rem; }
.r-ops li { margin-bottom: .15rem; }
.r-img { width: 180px; }
.r-img img { height: 150px; }

/* ---------- 点图片弹出看大图（base.html #zoom） ---------- */
.zoom { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 20, 28, .94); display: flex; flex-direction: column; }
.zoom[hidden] { display: none; }
.zoom-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem 1rem; background: rgba(0,0,0,.35); color: #fff; }
.zoom-cap { flex: 1 1 260px; font-size: var(--fs-sub); overflow-wrap: anywhere; }
.zoom-tools { display: flex; flex-wrap: wrap; gap: .4rem; }
.zoom-tools .btn.active { --tblr-btn-bg: var(--m-primary-soft); --tblr-btn-border-color: #7A86F0; font-weight: 700; }
.zoom-stage { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 1rem 4rem; }
.zoom-stage img { background: #fff; box-shadow: 0 4px 24px rgba(0,0,0,.4); cursor: zoom-in; }
.zoom-stage[data-mode="fit"] img { max-width: 100%; max-height: calc(100vh - 7rem); width: auto; height: auto; object-fit: contain; }
.zoom-stage[data-mode="1"], .zoom-stage[data-mode="2"] { align-items: flex-start; justify-content: flex-start; }
.zoom-stage[data-mode="1"] img, .zoom-stage[data-mode="2"] img { max-width: none; max-height: none; margin: auto; image-rendering: pixelated; }
.zoom-stage[data-mode="2"] img { cursor: zoom-out; }
.zoom-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 4rem; border: 0; border-radius: 10px;
            background: rgba(0,0,0,.55); color: #fff; font-size: 1.6rem; box-shadow: 0 0 0 1px rgba(255,255,255,.35); z-index: 1; }
.zoom-nav:hover { background: rgba(0,0,0,.75); }
.zoom-nav.prev { left: .6rem; } .zoom-nav.next { right: .6rem; }
.zoom-hint { text-align: center; color: rgba(255,255,255,.7); font-size: var(--fs-min); padding: .3rem 0 .6rem; }
@media (max-width: 640px) { .zoom-stage { padding: .5rem; } .zoom-nav { width: 2.4rem; height: 3rem; } }

/* 大的可选一行（单选）：整行都能点（连接新电脑选工作台，2026-09-30） */
.choice { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.2rem; border: 2px solid var(--m-border, #d0d7e2); border-radius: 12px;
          background: var(--m-surface); cursor: pointer; font-size: 1.1rem; }
.choice:has(input:checked) { border-color: var(--m-primary, #0010DD); background: var(--m-primary-soft, #ECEEFF); }
.choice input[type=radio] { width: 1.4rem; height: 1.4rem; margin-top: .15rem; flex: none; }
/* 问题上的解决入口（2026-10-01）：直接解决（一键 / 上传）、在这里改 */
.fixbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .8rem 1rem; margin: 0 0 1rem;
          border: 2px solid var(--m-primary, #0010DD); border-radius: 10px; background: var(--m-primary-soft, #ECEEFF); }
.fixbar .lead { font-weight: 700; color: var(--m-primary, #0010DD); display: inline-flex; align-items: center; gap: .4rem; }   /* 图标和“直接解决：”之间留空（V1.21 总验证） */
.fixbar form { margin: 0; }
.editrow summary { cursor: pointer; color: var(--m-primary, #0010DD); font-weight: 600; }
.editrow summary > .bi { margin-right: .35rem; }   /* “在这里改”前面的笔：和字留空（V1.21 总验证，同“直接解决：”） */
.editrow .editform { padding: .5rem 0; border-bottom: 1px dashed var(--m-border, #d0d7e2); }
.editrow label { display: flex; flex-direction: column; font-size: var(--fs-sub); color: var(--m-muted); }
.pre { white-space: pre-line; }
/* 说明一行很长、证据表很宽时：说明自己换行，证据表在自己的框里左右滑（不把整个表格撑宽、说明被挡住，2026-10-01） */
.issue .items td .pre { display: block; max-width: 72ch; overflow-wrap: anywhere; }
/* 登录页：系统版本号（2026-10-01 用户：登录页不放升级日志，只醒目地显示版本号） */
.login-ver { display: inline-block; margin-top: .6rem; padding: .25rem 1rem; border-radius: 999px; background: var(--m-primary, #0010DD);
             color: #fff; font-weight: 700; font-size: var(--fs-body); letter-spacing: .06em; }
a.side-ver { display: block; text-decoration: none; }
a.side-ver:hover { color: #CDD2F2; }
/* 关于我们（V1.21，10-08 用户：页面太长）：最上面当前版本 + 各程序版本；升级日志最近 3 版展开，更早的按月份收起来 */
.about-top { border-radius: var(--m-radius, 12px); padding: 1.5rem 1.75rem; color: #fff;
             background: linear-gradient(135deg, #0010DD 0%, #0a2bb8 55%, #071a7a 100%); }
.about-top-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.about-brand { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.about-brand .brand-logo { height: 40px; width: auto; flex: none; }
.about-name { font-size: 1.1875rem; font-weight: 700; letter-spacing: .02em; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.about-sub { opacity: .75; letter-spacing: .3em; font-size: var(--fs-min); }
.about-now { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; padding: .4rem 1.1rem; border-radius: 999px;
             background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); }
.about-now .lbl, .about-now .date { font-size: .9375rem; opacity: .9; }
.about-now b { font-size: var(--fs-title); font-weight: 800 !important; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.about-apps { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.about-apps li { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; border-radius: var(--m-radius-sm, 8px);
                 background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); min-width: 0; }
.about-apps li > i { font-size: 1.4rem; flex: none; }
.about-apps .grow { flex: 1 1 auto; min-width: 0; }
.about-apps .nm { font-weight: 600; }
.about-apps .nt { font-size: var(--fs-sub); opacity: .85; line-height: 1.45; }
.about-apps .v { font-weight: 800; font-size: var(--fs-body); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 升级日志 */
.rl-header { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.rl-total { margin-left: auto; color: var(--m-muted); font-size: .9375rem; }
.rl-h { font-size: .9375rem; font-weight: 600; color: var(--m-muted); letter-spacing: .04em; margin: 0 0 .5rem; }
.rl-older { margin-top: 1.5rem; }
.rl-entry { padding: 1rem 0 1rem 1rem; border-left: 3px solid var(--m-border); }
.rl-entry + .rl-entry { margin-top: .25rem; }
.rl-entry.latest { border-left-color: var(--m-primary); }
.rl-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; }
.rl-ver { font-weight: 800; color: var(--m-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-entry .rl-ver { font-size: var(--fs-body); }
.rl-new { font-size: var(--fs-min); font-weight: 600; color: #fff; background: var(--m-primary); padding: .05rem .55rem; border-radius: 999px; }
.rl-date { color: var(--m-muted); font-size: .9375rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-title { font-weight: 600; margin: .3rem 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.rl-items { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .45rem; }
.rl-items li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: baseline; }
.rl-item-txt { line-height: 1.6; overflow-wrap: anywhere; }
.rl-tag { display: inline-block; min-width: 6.2em; text-align: center; font-size: var(--fs-min); font-weight: 600; line-height: 1.5;
          padding: .05rem .45rem; border-radius: 6px; white-space: nowrap; }
.rl-tag-new { background: var(--m-primary-soft); color: var(--m-blue-text); }
.rl-tag-better { background: var(--m-green-soft); color: var(--m-green-text); }
.rl-tag-fix { background: var(--m-amber-soft); color: var(--m-amber-text); }
.rl-tag-safe { background: var(--m-note-soft); color: var(--m-note-text); }   /* 安全：灰底（紫色只表示管理员，V1.21） */
/* 收起来的部分：原生 details，点整行开合（按钮至少 44px 高） */
.rl-fold { border: 1px solid var(--m-border); border-radius: var(--m-radius-sm, 8px); background: var(--m-surface); }
.rl-fold + .rl-fold { margin-top: .6rem; }
.rl-fold > summary { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: .5rem .9rem; cursor: pointer;
                     list-style: none; font-weight: 600; border-radius: var(--m-radius-sm, 8px); }
.rl-fold > summary .grow { flex: 1 1 auto; min-width: 0; }
.rl-fold > summary:hover { background: var(--m-subtle); }
.rl-fold[open] > summary { border-bottom: 1px solid var(--m-border); border-radius: var(--m-radius-sm, 8px) var(--m-radius-sm, 8px) 0 0; }
.rl-trial > summary { color: var(--m-muted); }
.rl-open { color: var(--m-primary); font-weight: 500; font-size: var(--fs-sub); white-space: nowrap; }
.rl-fold > summary .nw { white-space: nowrap; }
.rl-fold[open] > summary .rl-open { display: none; }
summary::-webkit-details-marker { display: none; }
.rl-chev { display: inline-block; flex: none; width: 1rem; color: var(--m-muted); transition: transform .15s; }
details[open] > summary > .rl-chev { transform: rotate(90deg); }
.rl-list { list-style: none; margin: 0; padding: .25rem 0; }
.rl-list > li + li { border-top: 1px solid var(--m-border); }
/* 一行：箭头 | 版本号 | 日期 | 标题 | 几项要点（手机上标题换到下一行，和版本号对齐） */
.rl-row { display: grid; grid-template-columns: 1rem 3.6em 6.2em minmax(0, 1fr) auto; column-gap: .8rem; row-gap: .1rem; align-items: baseline;
          padding: .6rem .9rem; min-height: 2.75rem; list-style: none; }
.rl-trial .rl-row { grid-template-columns: 1rem 4.4em 6.2em minmax(0, 1fr) auto; }
summary.rl-row { cursor: pointer; }
summary.rl-row:hover { background: var(--m-subtle); }
.rl-row .rl-txt { min-width: 0; line-height: 1.6; overflow-wrap: anywhere; }
.rl-more { color: var(--m-faint); font-size: var(--fs-min); white-space: nowrap; }
.rl-one[open] > summary .rl-more { display: none; }
.rl-one > .rl-items { margin: 0; padding: 0 .9rem .8rem 2.7rem; }
.rl-trial .rl-ver { color: var(--m-muted); }
/* 右边：关于 MEISYOU JAPAN */
.about-side .card-title { word-break: keep-all; overflow-wrap: anywhere; }
.about-text p { line-height: 1.85; margin-bottom: .8rem; }
.about-points { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.about-points li { display: flex; gap: .75rem; align-items: flex-start; }
.about-points li > i { font-size: 1.4rem; color: var(--m-primary); flex: none; line-height: 1.2; }
.about-points h4 { font-size: var(--fs-body); font-weight: 700; margin: 0 0 .15rem; }
.about-points p { color: var(--m-muted); margin: 0; line-height: 1.65; font-size: .9375rem; }
.about-langs { color: var(--m-muted); display: flex; gap: .4rem; align-items: center; border-top: 1px solid var(--m-border); padding-top: .8rem; }
@media (min-width: 768px) and (max-width: 1199.98px) { .about-points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .about-apps { grid-template-columns: minmax(0, 1fr); gap: .5rem; } }
@media (max-width: 575.98px) {
  .about-top { padding: 1.1rem 1rem; }
  .about-brand .brand-logo { height: 32px; }
  .about-name { font-size: 1.0625rem; }
  .about-now { padding: .35rem .9rem; border-radius: var(--m-radius-sm, 8px); }
  .about-now b { font-size: var(--fs-head); }
  .about-apps li { padding: .6rem .8rem; }
  .rl-total { margin-left: 0; }
  .rl > .card-body { padding: 1rem; }
  .rl-entry { padding-left: .8rem; }
  .rl-fold > summary { padding: .5rem .75rem; }
  .rl-open { display: none; }                 /* 手机上一行放不下：整行有边框、有箭头，点哪里都能开 */
  .rl-row, .rl-trial .rl-row { grid-template-columns: 1rem auto minmax(0, 1fr); padding: .55rem .75rem; }
  .rl-row .rl-txt, .rl-row .rl-more { grid-column: 2 / -1; }
  .rl-one > .rl-items { padding: 0 .75rem .75rem 2.55rem; }
  .rl-items li { display: block; }            /* 手机上小标签放在句首、字接着往后排，不再占一整列（390 宽每行多 5～6 个字） */
  .rl-tag { min-width: 0; margin-right: .4rem; }
}

/* ---------- V1.7（2026-10-02）：菜单分组、总览页、打印台嵌在后台 ---------- */
.side-label { text-transform: none; letter-spacing: .08em; font-weight: 600; border-top: 1px solid rgba(255, 255, 255, .06); margin-top: .35rem; }
.side-nav > .side-label:first-child { border-top: 0; margin-top: 0; }
/* 打印台嵌在右边：去掉页头和留白，打印台占满右边整个高度（它自己会分左右两栏） */
.main.embed { height: 100vh; }
.main.embed .pagehead { display: none; }
.main.embed .content { max-width: none; padding: 0; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.main.embed .content > .notice { margin: .75rem 1rem 0; }
.desk-frame { flex: 1 1 auto; width: 100%; min-height: 480px; border: 0; display: block; background: #eef1f6; }
@media (max-width: 991.98px) { .main.embed { height: auto; } .desk-frame { height: calc(100vh - 56px); flex: none; } }   /* 手机顶上那一条 56px 高（V1.21） */
/* 总览 */
.ov-alert { color: inherit; text-decoration: none; }
.ov-lanes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr); gap: 1rem; align-items: start; }
.ov-lane .card-header { display: flex; align-items: center; }
.ov-count { margin-left: auto; font-size: var(--fs-title); font-weight: 800; line-height: 1; color: var(--m-text, #18222f); text-decoration: none; }
.ov-issues .ov-count { color: var(--m-red-text); }
.ov-lane.ov-issues { box-shadow: inset 5px 0 0 var(--m-red-text); }
.ov-lane.ov-publish { box-shadow: inset 5px 0 0 var(--m-warn); }   /* 等客服发布：在等（橙黄）；V1.21 颜色按意思 */
.ov-lane.ov-print { box-shadow: inset 5px 0 0 var(--m-primary); }   /* 等仓库打印 / 打印中：正在进行（蓝），不再用紫色 */
.ov-lane.ov-finish { box-shadow: inset 5px 0 0 var(--m-ok); }
.ov-finish .ov-count { color: var(--m-green-text); }
.ov-item { display: flex; flex-direction: column; gap: .1rem; color: inherit; text-decoration: none; }
.ov-item:hover { background: #f6f7fb; }
.ov-name { font-weight: 600; overflow-wrap: anywhere; }   /* “打印电脑和打印机”“新的出错”：照旧换行，整句都看得到 */
/* 泳道里的“客户代码 · 柜子名”：一行显示，太长打省略号，鼠标放上去看全名（title）。以前“DEMO · / DEMO-2603G”拆成两行（V1.21 总验证）。
   只管泳道：“新的出错”的标题如果也一行省略，1280 宽只剩前 18 个字左右、看不出出了什么错（V1.21 复查） */
.ov-lane .ov-name { min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.ov-grid .card-header { flex-wrap: wrap; row-gap: .25rem; }   /* 1280 宽日语：“バックアップ”标题和旁边的链接不在词中间断开，放不下时链接换到下一行 */
.ov-grid .card-header .card-title, .ov-grid .card-header > a { white-space: nowrap; }
.ov-sub { font-size: var(--fs-sub); color: var(--m-muted); }
.ov-empty { color: var(--m-muted); }
.ov-empty .bi { color: var(--m-ok); margin-right: .35rem; }
.ov-lane .list-group { --tblr-list-group-item-padding-x: 1rem; }   /* 1280 宽 4 栏时每栏只有 230px：左右少留一点，“DEMO · DEMO-2603G”放得下 */
/* “另有 2 个在等客户回复 >”：箭头前面是不换行空格，箭头图标改成普通文字排（图标默认是 inline-block，不换行空格粘不住它），
   箭头跟着最后几个字走，不单独掉一行；两行时排得差不多长（V1.21 总验证） */
.ov-more { color: var(--m-muted); font-size: var(--fs-sub); text-decoration: none; text-wrap-style: balance; }
.ov-more .bi-chevron-right::before { display: inline; }
.ov-busy a { margin-left: .25rem; }
@media (max-width: 1199.98px) { .ov-grid, .ov-lanes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767.98px) { .ov-lanes, .ov-grid { grid-template-columns: 1fr; } }
.ov-backup { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }

/* 大票的标签图先显示前 48 张（V1.9） */
.tile.tile-more { display: none; }

/* 标签查询（V1.13）：条码内容 + 暗号小格子；结果左边标签图（红框 = 暗号）、右边证明信息 */
.lk-search { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1.25rem 2rem; align-items: start; }
.lk-grid { display: inline-grid; grid-template-columns: repeat(7, 34px); gap: 6px; padding: 10px; border: 1px solid var(--m-border);
  border-radius: var(--m-radius-sm); background: #fff; }
.lk-cell { position: relative; width: 34px; height: 34px; margin: 0; cursor: pointer; }
.lk-cell input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lk-cell > span { display: block; width: 100%; height: 100%; border-radius: 50%; border: 2px dashed #b8bfd0; background: #fff; }
.lk-cell input:checked + span, .lk-show .lk-cell.on > span { background: #17203b; border: 2px solid #17203b; }
.lk-cell input:focus-visible + span { outline: 3px solid var(--m-primary); outline-offset: 2px; }
.lk-fixed > span { border-style: solid; }
.lk-show { grid-template-columns: repeat(7, 18px); gap: 4px; padding: 8px; }
.lk-show .lk-cell { width: 18px; height: 18px; cursor: default; }
.lk-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1.5rem; }
.lk-pics canvas { max-width: 100%; height: auto; display: block; margin: .35rem 0; }
.lk-zoomrow { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; margin-top: .75rem; }
.lk-info { align-content: start; grid-template-columns: max-content minmax(0, 1fr); }
.lk-info dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 991px) {
  .lk-search, .lk-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575px) {
  .lk-info { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .lk-info dt { margin-top: .5rem; }
}

/* 总览：系统现在在做什么（V1.13）。V1.15：三栏各是一块浅底的“栏”，栏底部可以点开“最近一小时做完的 / 打完的”“怎么估的”；
   宽屏（1340px 以上，每栏约 320px 起）三栏并排、平板和小笔记本两栏（打印那栏占一整行）、手机一栏；栏宽用 minmax(0, 1fr)，长柜子名换行，不把页面撑宽 */
.act .card-header { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.act-at { color: var(--m-muted); font-size: .9375rem; margin-left: auto; }
.act-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.act-sec { display: flex; flex-direction: column; gap: .5rem; min-width: 0; padding: .85rem; background: var(--m-subtle);
           border: 1px solid var(--m-border); border-radius: var(--m-radius-sm); }
.act-title { display: flex; align-items: baseline; gap: .45rem; font-weight: 650; font-size: 1.0625rem; line-height: 1.4; }
.act-title > i { color: var(--m-muted); flex: none; }
.act-tt { flex: 1 1 auto; min-width: 0; }
.act-n { flex: none; font-size: .9375rem; font-weight: 600; color: var(--m-muted); white-space: nowrap; }
.act-row { display: grid; gap: .3rem; padding: .55rem .75rem; background: var(--m-surface); border: 1px solid var(--m-border);
           border-radius: var(--m-radius-sm); min-width: 0; }
.act-now { border-color: var(--m-primary); }
.act-bad { border-color: var(--m-red); background: var(--m-red-soft); }   /* 中途停了没打完：要处理，红框直接显示（V1.15 复查） */
.act-bad .act-todo { color: var(--m-red-text); }
.act-main { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; min-width: 0; overflow-wrap: anywhere; }
.act-main > a, .act-main > span:not(.chip) { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.act-sub { color: var(--m-muted); font-size: .9375rem; overflow-wrap: anywhere; }
.act-sub b { color: var(--m-text); font-weight: 600; }
@media (min-width: 400px) { .act-sub .nw { white-space: nowrap; } }   /* 时间一段不从中间断开，换行只在“·”那里；特别窄的手机照常换行，不撑宽 */
.act-empty { color: var(--m-muted); padding: .15rem 0; }
.act-empty .bi { color: var(--m-green-text); margin-right: .35rem; }
.act-foot { color: var(--m-faint); font-size: .9375rem; border-top: 1px dashed var(--m-border-strong); padding-top: .5rem; margin-top: .1rem; }
.act-more { border-top: 1px dashed var(--m-border-strong); padding-top: .35rem; margin-top: .1rem; }
.act-more > summary { display: flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: .2rem .45rem; margin: 0 -.45rem;
                      border-radius: var(--m-radius-sm); color: var(--m-blue-text); font-weight: 600; font-size: .9375rem; }
.act-more > summary:hover { background: var(--m-primary-soft); }
.act-more > summary:focus-visible { outline: 2px solid var(--m-primary); outline-offset: 1px; }
.act-sum { flex: 1 1 auto; min-width: 0; }
.act-sum .chip { margin-left: .2rem; font-weight: 500; }   /* 收起时也看得见“其中 N 个出错 / 有问题” */
.act-tog { display: inline-flex; align-items: center; gap: .25rem; color: var(--m-muted); font-weight: 500; white-space: nowrap; }
.act-tog .bi { transition: transform .15s; }
.act-more[open] .act-tog .bi { transform: rotate(180deg); }
.act-list { display: grid; gap: .4rem; margin-top: .35rem; }
/* 做完的、打完的最多 10 条：电脑、平板上点开后限高、在里面滚动，不把整页拉得很长；滚到哪儿刷新后照样留着（overview.html 的脚本）。
   手机一栏照常往下排（手机上框里再套滚动不好用） */
@media (min-width: 768px) { .act-long .act-list { max-height: 26rem; overflow-y: auto; padding-right: .2rem; } }
.act-item { display: grid; gap: .15rem; padding: .45rem .65rem; background: var(--m-surface); border: 1px solid var(--m-border);
            border-radius: var(--m-radius-sm); min-width: 0; }
.act-note { color: var(--m-muted); font-size: .9375rem; overflow-wrap: anywhere; }
.act-kinds { display: grid; gap: .25rem; padding: .45rem .65rem; background: var(--m-surface); border: 1px solid var(--m-border);
             border-radius: var(--m-radius-sm); font-size: .9375rem; }
.act-kinds > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 .75rem; }
.act-kinds b { font-weight: 600; white-space: nowrap; }
.act .notice { grid-column: 1 / -1; margin-bottom: 0; }
@media (max-width: 1339.98px) { .act-body { grid-template-columns: repeat(2, minmax(0, 1fr)); } .act-sec-print { grid-column: 1 / -1; } }
@media (max-width: 767.98px) { .act-body { grid-template-columns: minmax(0, 1fr); } .act .card-body { padding: .75rem; } .act-sec { padding: .6rem; } }

/* 手机上字很长的按钮、小标签换行，不把整页撑宽（V1.14 审查）：问题卡片里的按钮、标了 btn-wrap 的按钮、卡片标题里的小标签。
   不对所有按钮这样做：放在窄的表单 / 弹性布局里的短按钮会被挤成一个字一行。放在最后：盖过前面的 nowrap */
@media (max-width: 575.98px) { .issue .btn, .btn-wrap, .card-header .chip { white-space: normal; min-width: fit-content; } .issue td .btn { white-space: nowrap; } }
/* V1.21：标了 btn-wrap / chip-wrap 的（自己选的长按钮、长标签）在任何宽度都能换行（电脑上放在窄的右栏里也不撑出横向滚动） */
.btn-wrap { white-space: normal; max-width: 100%; }
.chip-wrap { white-space: normal; max-width: 100%; }

/* V1.16 排版（手机 375 宽量过）：大号状态标签（票页的“FBA 货件 … · 仓库 … · 6 箱”）、标了 chip-wrap 的长标签
   （设备页日文“V1.2 より古いハンディはありません…”）放不下时换行，不撑出横向滚动；
   提示条里的按钮（柜子页“整柜重新分析”）换到字的下面占满一行，字不被挤成一窄条 */
@media (max-width: 575.98px) {
  .chip-lg, .chip-wrap { white-space: normal; }
  /* 字长的大标签（FBA 货件 … · 仓库 … · 几箱）：一整段字自然换行（弹性布局会把“FBA 货件”、货件号、仓库切成三竖条） */
  .chip-lg:has(.mono) { display: inline-block; border-radius: 14px; }
  .chip-lg:has(.mono) > i { margin-right: .3rem; }
  .notice { flex-wrap: wrap; }
  .notice .grow { flex: 1 1 0; min-width: 0; }
  .notice > form { flex: 1 1 100%; }
  .notice > form .btn { width: 100%; }
}

/* 帮助页（V1.17，templates/accounts/help.html）：每个角色一页，图先用文字占位 */
.help-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.help-tabs .btn i { margin-right: .35rem; }
.help-intro { margin-bottom: 1rem; }
.help-role { font-size: var(--fs-head); font-weight: 700; margin: 0 0 .5rem; display: flex; align-items: center; gap: .5rem; }
.help-toc { margin: 0; padding-left: 1.4rem; columns: 2 16rem; }
.help-section { margin-bottom: 1rem; scroll-margin-top: 1rem; }
.help-no { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; margin-right: .6rem;
  border-radius: 999px; background: var(--m-primary-soft); color: var(--m-blue-text); font-weight: 700; }
.help-steps { padding-left: 1.4rem; margin-bottom: 1rem; }
.help-steps li { margin-bottom: .5rem; }
.help-figure { margin: 0; min-height: 11rem; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .6rem; padding: 1.2rem; text-align: center; border: 2px dashed var(--m-border-strong); border-radius: var(--m-radius-sm);
  background: var(--m-subtle); color: var(--m-muted); }
.help-figure > i { font-size: 2.2rem; color: var(--m-faint); }
.help-figure figcaption { max-width: 28rem; }
/* V1.18 截图：点开看大图（base.html 的 data-zoom 浮窗）；图下面写图说 */
.help-shots { display: flex; flex-direction: column; gap: 1rem; }
.help-shot { margin: 0; }
.help-shot a { display: block; border: 1px solid var(--m-border-strong); border-radius: var(--m-radius-sm); overflow: hidden;
  background: var(--m-subtle); cursor: zoom-in; }
.help-shot img { display: block; width: 100%; height: auto; }
.help-shot figcaption { margin-top: .4rem; font-size: var(--fs-sub); color: var(--m-muted); }
.help-shot figcaption i { margin-right: .3rem; }
@media (max-width: 575.98px) {
  .help-tabs .btn { flex: 1 1 calc(50% - .5rem); }
  .help-figure { min-height: 8rem; }
}

/* ---------- V1.22 换标签（确认页 imports/replace.html、问题页 _replace_item.html、改动记录 _replace_log.html、提醒框 _not_replace_warn.html） ---------- */
.rp-block.has-red { border-color: var(--m-bad); }
.rp-block .card-header, .rp-log .card-header, .rp-upd .card-header { flex-wrap: wrap; gap: .5rem; }
.rp-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.rp-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1rem; }
.rp-pick .lbl { font-weight: 600; color: var(--m-muted); }
/* 选项文字里另包了 <span class="text-nowrap">（“90 分”不拆行）：外层是 inline-flex 时一句话会被拆成三块并排（390 宽排成三栏，
   右边一栏每行两三个字，10-09 验证第 2 轮）。这里改成普通的一段文字（inline-block），图标和字之间用右边距 */
.rp-pick .seg > label > span { display: inline-block; white-space: normal; text-align: left; padding-top: .6rem; padding-bottom: .6rem; }
.rp-pick .seg > label > span > i { margin-right: .35rem; }
.rp-item .chip-wrap { display: inline-block; border-radius: 10px; }
.rp-item .chip-wrap > i { margin-right: .3rem; }
.rp-manual { margin: 0 0 1rem; max-width: 760px; }
.rp-table td.tc-main { font-weight: 600; width: 26%; }
.rp-table tr.rp-red td { background: var(--m-bad-soft); color: var(--m-bad-text); }
.rp-table td div + div { margin-top: .2rem; }
.rp-why, .rp-redlist { margin-top: 1rem; padding: .7rem 1rem; border-radius: var(--m-radius-sm); background: var(--m-note-soft); }
.rp-redlist { background: var(--m-bad-soft); color: var(--m-bad-text); }
.rp-why .lbl, .rp-redlist .lbl { font-weight: 700; margin-bottom: .3rem; }
.rp-why .lbl i, .rp-redlist .lbl i { margin-right: .35rem; }
.rp-why ul, .rp-redlist ul { margin: 0; padding-left: 1.2rem; }
.rp-cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.rp-side { border: 1px solid var(--m-border); border-radius: var(--m-radius-sm); padding: .75rem; min-width: 0; }
.rp-side .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.rp-side .tile .pic { height: 130px; }
.rp-side .tile .pic img { max-height: 115px; }
.rp-cap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.rp-printed { padding: .8rem 1rem; margin-bottom: 1rem; border: 1px solid var(--m-warn); border-radius: var(--m-radius-sm); background: var(--m-warn-soft); }
.rp-check { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem 1rem; border-radius: var(--m-radius-sm);
  background: var(--m-bad-soft); color: var(--m-bad-text); cursor: pointer; }
.rp-check input { flex: none; margin-top: .3rem; width: 1.3rem; height: 1.3rem; }
.rp-check .muted { color: var(--m-bad-text) !important; opacity: .85; }
.rp-item { margin-top: .5rem; padding: .6rem .8rem; border-left: 3px solid var(--m-primary); background: var(--m-primary-soft); border-radius: 0 8px 8px 0; }
.rp-item .rp-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; word-break: break-all; }
.rp-item .rp-line .lbl { font-weight: 600; color: var(--m-muted); }
.rp-reasons { margin: .3rem 0 0; padding-left: 1.2rem; font-size: var(--fs-sub); color: var(--m-muted); }
.rp-nested { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--m-border-strong); font-size: var(--fs-sub); }
.rp-nested .lbl { font-weight: 600; margin-bottom: .25rem; }
.rp-nested ul { margin: 0; padding-left: 1.1rem; }
.rp-nested li { margin-bottom: .2rem; word-break: break-all; }
.rp-warn-list { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .8rem; }
.rp-warn-list li { padding: .75rem 1rem; border-radius: var(--m-radius-sm); background: var(--m-warn-soft); color: var(--m-warn-text); }
/* 问题页“直接解决”的换标签按钮：号码摘要在窄屏另起一行，按钮上的字不被挤成一行一两个字的窄条（10-08 验证：390 宽日语） */
.btn.rp-lead { flex-wrap: wrap; column-gap: .4rem; row-gap: .15rem; }
.btn.rp-lead .rp-lbl { white-space: nowrap; }
.btn.rp-lead .rp-sum { word-break: break-all; text-align: left; }
@media (max-width: 767.98px) { .btn.rp-lead .rp-sum { flex: 1 1 100%; } }
/* 确认页表格里的标签（“不再用（留着可查）”这类）在窄屏能折行，不被截掉；小图卡里的“能扫出 / 読み取り OK”：390 宽日语比卡片宽，
   右边圆角被 .tile 的 overflow 切掉（验证第 1 轮）→ 能折行、不超出卡片 */
.rp-table .chip, .rp-side .tile .chip { white-space: normal; max-width: 100%; }
/* 上传页“开始上传”点了以后字变长（“正在上传，请不要关这个页面…”）：按钮能折行，390 宽不撑出屏幕（验证第 1 轮） */
.fstep #go:disabled { white-space: normal; max-width: 100%; }
@media (max-width: 767.98px) {
  .rp-cmp { grid-template-columns: minmax(0, 1fr); }
  .rp-side .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-side .tile .pic { height: 110px; }
  .rp-side .tile .pic img { max-height: 96px; }
  .rp-tags { margin-left: 0; }
  .rp-table td.tc-main { width: auto; }
}

/* 已处理的问题（inbound/_done.html）：“在哪里”一栏不再一个字一行（以前 break-all + 26%，390 宽时号码一个字占一行、
   表格比外框宽，右边“点错了，改回”被切掉一半；1280 宽号码最后一位单独换行，10-09 验证第 2 轮）。手机宽时三格上下排 */
.done-table td.done-where { width: 26%; min-width: 10rem; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .done-table, .done-table tbody, .done-table tr, .done-table td { display: block; width: auto !important; min-width: 0 !important; }
  .done-table tr { border-bottom: 1px solid var(--m-border); }
  .done-table tr:last-child { border-bottom: 0; }
  .done-table td { border: 0; }
  .done-table td.done-act { text-align: left !important; padding-top: 0; }
}

/* V2.1 第 6 块：作业照片、签收单（inbound/_media.html、cust/_media.html、media_shoot.html）。缩略图点开看大图（data-zoom） */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; max-height: 30rem; overflow-y: auto; }
.media-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.media-box { border: 1px solid var(--m-border); border-radius: var(--m-radius-sm); padding: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.media-item img { display: block; width: 100%; height: 150px; object-fit: contain; background: var(--m-subtle); border-radius: var(--m-radius-sm); }
.media-meta, .media-row { font-size: var(--fs-min); color: var(--m-muted); overflow-wrap: anywhere; }
.media-meta a { white-space: nowrap; }
.media-item form { margin-top: .25rem; }
.media-row[data-state="success"] { color: var(--m-ok-text); }
.media-row[data-state="error"] { color: var(--m-bad-text); }
.media-pick { position: relative; max-width: 100%; white-space: normal; }   /* 日文按钮字长：放不下就在按钮里折行，不伸出箱子 */
.media-album { position: relative; }
[data-media-n] { display: contents; }   /* 脚本会改的数字：不在标题、小标签的 flex 里另占一格（不然数字两边多出空隙） */
.media-detached { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .75rem 0; color: var(--m-warn-text); }
@media (max-width: 575.98px) {
  .media-boxes { grid-template-columns: minmax(0, 1fr); }
  .media-pick { width: 100%; min-height: 3rem; font-size: var(--fs-head); }   /* 手机上拍照按钮整行、大字：戴手套、年长同事也好点 */
  .media-album { display: flex; width: max-content; margin-top: 0; }
}
