/* ============================================================
   日报系统 · B端管理后台样式 —— UI 改版 v2（2026-09-26）
   ============================================================
   设计依据：artifacts/B端UI改版设计稿_2026-09-26.html
   核心原则：与小程序 syz/app.wxss 共用同一份语义令牌（名称/值/语义一字不差）。
            改品牌色只需改两处，再跑 verify_web_styles.py 校验。

   ⚠ 27 个语义令牌必须与 syz/app.wxss 的 page{} 完全一致 ——
      verify_web_styles.py 会解析两端令牌块逐项比对，漂移即失败。
   ⚠ --sh-1 / --sh-2 / --overlay 是**颜色值**（不是完整 box-shadow），
      与小程序保持一致；用的时候自己拼 box-shadow: 0 8px 24px var(--sh-1)。
   ⚠ 禁止再出现硬编码品牌色。中性透明度 rgba(255,255,255,.x) / rgba(0,0,0,.x)
      是允许的（见脚本白名单），有色彩倾向的 hex 一律走令牌。

   收敛口径：字号 10 档 → 8 档（11/12/14/16/18/20/24/30）
            圆角 5 档 → 4 档（6/8/12/999）
            令牌 13 个 → 27 语义 + 3 桌面布局

   v3「暖桃草绿」(2026-09-27)：主色 松青 → 草绿 #506e55；墨阶/面/线整体转暖；
             新增 --brand-accent 蜜桃粉 —— 参考图「绿底桃字」的原始手法，
             ⚠ 只用于**深底上的品牌强调**；与 --warn 色相仅差 5°，绝不作状态色。
   v4「墨绿商务」(2026-09-29)：主色 草绿 → 高饱和墨绿 #097144（S 15.8%→85.2%）；
             墨阶/面/线转中性（去暖黄）；accent 蜜桃粉 → 浅绿 #bfe3cf；
             --ok 改青推 #097163。选色依据见 开发变更日志.md §78。
   v5「商务蓝棕」(2026-09-29)：业主参考图 —— 深海藏青 #2c3e50 / 浅砂杏 #e6b388 /
             柔和米白 #f8f5f0。主色 → #2c3e50（白字 10.98:1）；面/线跟米白；
             accent → 参考图杏色 #e6b388；--ok 青推回**正绿** #0e7048（主色已离绿区）。
             选色依据见 开发变更日志.md §79。
   ⚠ --brand 白字 10.98:1 / 白72% 6.59 / 白60% 5.13 —— 可作大面底色（v4 限制已解除）。
   ============================================================ */

:root {
  /* ── 墨阶：结构色，承担全部文字层次 ── */
  --ink:          #182633;
  --ink-2:        #45566a;
  --ink-3:        #5b6874;
  --ink-x:        #9aa6b2;
  /* ── 面与线 ── */
  --paper:        #f7efe8;
  --surface:      #fffdfb;
  --surface-2:    #efe4da;
  --rule:         #e7dcd2;
  --rule-2:       #d5c9be;
  /* ── 品牌 ── */
  --brand:        #47709b;
  --brand-ink:    #33516f;
  --brand-strong: #2c4a6b;
  --brand-tint:   #dce7f1;
  --brand-line:   #afc8da;
  --brand-accent: #d9a05b;
  /* ── 语义 ── */
  --ok:           #0e7048;
  --ok-bg:        #e3f1ea;
  --warn:         #b03a0a;
  --warn-bg:      #fbebde;
  --danger:       #c4322a;
  --danger-bg:    #fce8e6;
  --info:         #1b5bc4;
  --info-bg:      #e4eef7;
  /* ── 投影 ── */
  --sh-1:         rgba(24,38,51,0.07);
  --sh-2:         rgba(71,112,155,0.40);
  --overlay:      rgba(20,32,44,0.48);
  /* ── 数字字体栈（等宽表数） ── */
  --font-num:     'DIN Alternate','SF Mono',ui-monospace,'Roboto Mono',Menlo,Consolas,monospace;

  /* ── 桌面布局令牌（B端专属，不属语义层，不进两端比对） ── */
  --sidebar-w:    252px;
  --topbar-h:     60px;
  --row-h:        46px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
b, strong { color: var(--ink); font-weight: 600; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 等宽数字（表格 / KPI / 时间）：右对齐由 .num 承担 */
.num, .mono {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}
.num { text-align: right; }

/* 键盘可达的焦点环（不动 input/select/textarea，它们有自己的聚焦样式） */
.btn:focus-visible,
.nav-item:focus-visible,
.modal-close:focus-visible,
.tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* 侧栏改成深底后，深蓝焦点环压在墨蓝上等于没有（对比 1.1:1）。
   键盘用户的焦点必须始终可见 —— 这里换杏色（对墨蓝 6.4:1）。 */
.nav-item:focus-visible { outline-color: var(--brand-accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   登录页（2026-11-03 重做）——「深空舞台 + 玻璃卡」
   ============================================================
   登录页是整个后台的门面，用与大屏（screen.html）同一套深色基调 ——
   --brand-ink 作舞台底，--brand-accent 作唯一的亮色强调；
   表单卡是半透明玻璃，浮在纯 CSS 造的地平线光弧之上（不依赖任何图片）。

   ⚠ 只用语义令牌 + 中性 rgba(255,255,255,.x)：本文件被 verify_web_styles 逐行
     扫描硬编码色值，写死任何带色相的 hex 都会让守卫失败。
   ⚠ --brand-ink 在 dark / dark-mint 两套主题里被改写成「卡片面」（≈#1a1a1e），
     依旧是深色 ⇒ 这里的白色系文字六套主题下都成立。
   ⚠ 主按钮用 --brand-accent 作底：--ink 在浅色主题是深墨（6.4:1），
     深色主题里却是近白 —— 必须反转为 --paper，否则白字压铜金只剩 1.9:1。
   ⚠ 弱字最低用 rgba(255,255,255,.62)：压在 --brand-ink 上约 4.6:1，
     .5 只有 3.8:1，小字不合格。装饰性色块才允许用 .4 以下。
   ============================================================ */
.login-wrap {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  min-height: 100vh; padding: 0 64px; background: var(--brand-ink); color: #fff;
}

/* ---------- 舞台背景 ----------
   ⚠ 底色的两段中性黑是**必要的**：--brand-ink（#33516f）本身是中调藏青，
     直接铺满会发灰发脏（第一版就是这个毛病）。压一层 rgba(0,0,0,.42→.24)
     之后才有"深空"，且不引入任何新的品牌色。 */
.lg-sky {
  position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.46) 0%, rgba(0,0,0,.30) 46%, rgba(0,0,0,.20) 100%);
}
/* 细网格：只留中间一团，四周用遮罩化开，避免变成"作业本" */
.lg-sky::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 50% 32%, #000 0%, transparent 78%);
          mask-image: radial-gradient(ellipse 72% 62% at 50% 32%, #000 0%, transparent 78%);
}
/* 页脚压条：地平线的暖光正好扫在页脚文字上，不压一层暗，11.5px 的小字会被吃掉 */
.lg-sky::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 92px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.62));
}
.lg-glow { position: absolute; border-radius: 50%; filter: blur(80px); }
.lg-glow-a {
  width: 520px; height: 520px; left: -150px; top: -220px;
  background: var(--brand); opacity: .17; animation: lgDrift 18s ease-in-out infinite alternate;
}
.lg-glow-b {
  width: 460px; height: 460px; right: -140px; top: -160px;
  background: var(--brand-accent); opacity: .10; animation: lgDrift 24s ease-in-out infinite alternate-reverse;
}
/* 地平线：贴着弧顶的一条暖光雾（大气层），只在与弧顶齐平的一段存在 */
.lg-horizon {
  position: absolute; left: -10%; right: -10%; bottom: 9%; height: 20%;
  background: radial-gradient(ellipse 58% 100% at 50% 100%, var(--brand-accent) 0%, transparent 62%);
  opacity: .26; filter: blur(20px);
}
/* 弧顶：一个巨大的圆，只露出顶部 1px 的亮边 —— 这就是"地平线"。
   bottom 的取值决定弧顶高度：弧顶 = (210vw + bottom) 距底部。
   -198vw ⇒ 弧顶约在 12vw 处（1600×900 下 ≈ 画面底部往上 190px），
   正好压在卡片下沿，**不穿过文案区**（第一版 -188vw 直接切过数字行）。 */
.lg-rim {
  position: absolute; left: 50%; bottom: -198vw; width: 210vw; height: 210vw;
  transform: translateX(-50%); border-radius: 50%;
  border-top: 1px solid rgba(255,255,255,.30);
  box-shadow: 0 -22px 70px -14px var(--brand-accent);
}
/* 弧线以下是"球体本身"：压暗而不是提亮，才有实体感 */
.lg-planet {
  position: absolute; left: 50%; bottom: -200vw; width: 210vw; height: 210vw;
  transform: translateX(-50%); border-radius: 50%; background: rgba(0,0,0,.30);
}

/* ---------- 顶栏 ---------- */
.lg-top {
  position: relative; z-index: 2; flex: none; display: flex; align-items: center;
  justify-content: space-between; padding-top: 26px;
}
.lg-lock { display: flex; align-items: center; gap: 12px; }
.lg-mark {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
  background: var(--surface) url('../logo-mark.png') center/78% no-repeat;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.lg-name { font-size: 15px; font-weight: 600; letter-spacing: .3px; color: #fff; line-height: 1.3; }
.lg-kind { font-size: 9.5px; letter-spacing: 2.6px; color: rgba(255,255,255,.5); margin-top: 2px; }
.lg-status {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.13); border-radius: 999px;
  background: rgba(255,255,255,.05); font-size: 11.5px; color: rgba(255,255,255,.72);
  letter-spacing: .6px;
}
.lg-status i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(255,255,255,.10); animation: lgPulse 2.4s ease-in-out infinite;
}

/* ---------- 主区 ---------- */
.lg-main {
  position: relative; z-index: 2; flex: 1; width: 100%; max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 424px; align-items: center; gap: 80px;
  padding: 36px 0;
}
.lg-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px;
  letter-spacing: 2.4px; color: rgba(255,255,255,.72);
}
.lg-eyebrow i { width: 26px; height: 1px; background: var(--brand-accent); }
.lg-copy h1 {
  margin: 22px 0 0; font-size: 46px; line-height: 1.3; font-weight: 600;
  letter-spacing: .5px; color: #fff;
}
.lg-copy p {
  margin: 20px 0 0; max-width: 448px; font-size: 14px; line-height: 1.9;
  color: rgba(255,255,255,.72);
}
.lg-facts { display: flex; gap: 46px; margin: 40px 0 0; padding: 0; list-style: none; }
.lg-facts b {
  display: block; font-family: var(--font-num); font-size: 30px; font-weight: 600;
  color: var(--brand-accent); line-height: 1.2;
}
.lg-facts span { display: block; margin-top: 6px; font-size: 12px; color: rgba(255,255,255,.62); }

/* ---------- 玻璃表单卡 ---------- */
.lg-card {
  width: 424px; max-width: 100%; padding: 34px 32px 30px; border-radius: 16px;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.13);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
          backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 34px 90px -34px rgba(0,0,0,.8);
  animation: lgRise .62s cubic-bezier(.22,.68,.36,1) both;
}
.lg-card-head h2 { font-size: 21px; font-weight: 600; color: #fff; letter-spacing: .4px; }
.lg-card-head p { margin-top: 8px; font-size: 12.5px; color: rgba(255,255,255,.72); }

.lg-field { display: block; margin-top: 20px; }
.lg-lb { display: block; margin-bottom: 8px; font-size: 12px; color: rgba(255,255,255,.72); letter-spacing: .4px; }
.lg-input {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 10px;
  background: rgba(255,255,255,.05);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.lg-input:focus-within {
  border-color: var(--brand-accent); background: rgba(255,255,255,.085);
  box-shadow: 0 0 0 3px rgba(255,255,255,.07);
}
.lg-input svg {
  width: 16px; height: 16px; flex: none; fill: none; stroke: rgba(255,255,255,.55);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.lg-input:focus-within svg { stroke: var(--brand-accent); }
.lg-input input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none;
  color: #fff; font-size: 14px; font-family: inherit; caret-color: #fff;
}
.lg-input input::placeholder { color: rgba(255,255,255,.42); }
/* 浏览器自动填充会刷成浅黄底 + 黑字 —— 用内阴影盖掉，保住深色卡面 */
.lg-input input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: inset 0 0 0 100px var(--brand-ink);
}
.lg-eye {
  flex: none; padding: 4px 2px; border: 0; background: none; cursor: pointer;
  font-size: 12px; font-family: inherit; color: rgba(255,255,255,.62);
  transition: color .16s;
}
.lg-eye:hover { color: #fff; }
.lg-eye[aria-pressed="true"] { color: rgba(255,255,255,.92); }

.lg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 22px; }
.lg-check {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 12.5px; color: rgba(255,255,255,.72);
}
.lg-check input { width: 14px; height: 14px; accent-color: var(--brand-accent); cursor: pointer; }
.lg-help { font-size: 11.5px; color: rgba(255,255,255,.62); }

.lg-btn {
  width: 100%; height: 48px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--brand-accent); color: var(--ink);
  font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: 4px;
  box-shadow: 0 14px 34px -16px var(--brand-accent);
  transition: transform .16s, filter .16s, box-shadow .16s;
}
.lg-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.lg-btn:active:not(:disabled) { transform: translateY(0); filter: brightness(.97); }
.lg-btn:disabled { cursor: progress; opacity: .78; }
.lg-btn:focus-visible { outline: 2px solid rgba(255,255,255,.75); outline-offset: 3px; }

/* 错误条：浅底深字（深色卡面上唯一读得清的红） */
.lg-err {
  font-size: 12.5px; line-height: 1.6; color: var(--danger);
  border-radius: 8px; transition: margin .2s, padding .2s;
}
.lg-err:not(:empty) {
  margin-top: 14px; padding: 9px 12px;
  background: var(--danger-bg); border: 1px solid rgba(255,255,255,.10);
}

/* ---------- 页脚 ---------- */
.lg-foot {
  position: relative; z-index: 2; flex: none; display: flex; justify-content: space-between;
  gap: 16px; padding-bottom: 22px; font-size: 11.5px; letter-spacing: .6px;
  color: rgba(255,255,255,.72);
}

@keyframes lgRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes lgDrift { from { transform: translate3d(0,0,0); } to { transform: translate3d(46px,32px,0); } }
@keyframes lgPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,.10); }
  50% { box-shadow: 0 0 0 6px rgba(255,255,255,.04); }
}

/* 矮屏（1366×768 / 1280×720）：压缩文案区，别让卡片被挤出首屏 */
@media (max-height: 780px) {
  .lg-copy h1 { font-size: 36px; }
  .lg-facts { margin-top: 26px; }
  .lg-copy p { margin-top: 14px; }
  .lg-main { padding: 20px 0; }
}
@media (max-width: 1080px) {
  .login-wrap { padding: 0 28px; }
  .lg-main { grid-template-columns: 1fr; justify-items: center; gap: 34px; padding: 30px 0; }
  .lg-copy { text-align: center; }
  .lg-copy p { margin-left: auto; margin-right: auto; }
  .lg-facts { justify-content: center; gap: 32px; }
  .lg-copy h1 { font-size: 32px; }
}
@media (max-width: 640px) {
  .lg-copy { display: none; }
  .lg-top { padding-top: 18px; }
  .lg-foot { flex-direction: column; gap: 4px; text-align: center; }
}

/* ============================================================
   布局：侧栏（白底墨字）+ 顶栏 + 内容
   ============================================================ */
.app-layout { display: flex; height: 100vh; }

.sidebar {
  width: var(--sidebar-w); background: var(--brand-ink);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.brand {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 11px; padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
/* 品牌瓷砖：深底上的一枚白瓷砖。var(--surface) 作底色兜底 ——
   图片加载失败时仍是一块白瓷砖，不会「塌成空白」。 */
.brand-mark {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px;
  background: var(--surface) url('../logo-mark.png') center/80% no-repeat;
  box-shadow: 0 2px 8px var(--sh-2);
}
.brand-lock { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.brand-name {
  font-size: 15px; font-weight: 600; color: #fff; letter-spacing: .3px; line-height: 1.2;
}
.brand-sub {
  /* ⚠ 不能用 --brand-accent：六套主题里 accent 压沉浸底只有 3.4~4.4（浅色四套全破 AA）。
     accent 只留给"装饰性"用途（导航选中条），文字一律用白 72%（各主题实测 ≥5:1）。 */
  font-size: 11px; color: rgba(255,255,255,.72);
  letter-spacing: .1em; line-height: 1.2; margin-top: 2px;
}
.nav { flex: 1; overflow-y: auto; padding: 10px 12px 12px; }

/* ---------- 导航分组（2026-11-02）----------
   10 条入口平铺时，找东西全靠记位置；分组后靠「小标题」定位：
   「我要管人」→ 直接跳到「组织与权限」那一块，不用逐条辨认。

   ⚠ 组标题的颜色是 rgba(255,255,255,.70) 而不是更淡的 .45：
     六套主题的侧栏底色实测（2026-11-02）——
       .45 → 2.97~4.47（五套破 AA）  .60 → 4.02~6.92（绿/玫瑰/蓝仍破）
       .70 → 4.85~8.98（全部 ≥4.5 ✅）
     11px 属正常字号，必须过 4.5:1，不能拿"看起来淡一点"当层级。
     层级靠**字号 + 字距 + 字重**做，不靠压低对比度。 */
.nav-group + .nav-group { margin-top: 16px; }
.nav-group-label {
  padding: 0 12px; margin-bottom: 4px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .14em; line-height: 1.9;
  color: rgba(255,255,255,.70);
  user-select: none;
}

.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 12px; margin-bottom: 2px; border-radius: 9px;
  color: rgba(255,255,255,.72); font-size: 14px; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-item:hover, .nav-item:focus {
  background: rgba(255,255,255,.06); color: #fff; text-decoration: none;
}
.nav-item.active {
  background: rgba(255,255,255,.10); color: #fff; font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 11px; bottom: 11px;
  width: 3px; border-radius: 0 2px 2px 0; background: var(--brand-accent);
}
.nav-ico {
  width: 17px; height: 17px; flex-shrink: 0;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 6px; background: var(--danger); color: #fff;
  font-family: var(--font-num); font-size: 11px; font-weight: 600;
  line-height: 18px; text-align: center;
}
.sidebar-foot {
  flex-shrink: 0; margin: 12px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07);
  /* 白 60% 在 --brand-ink 上只有 4.13（六套主题实测都不过）；72% 起才达标 */
  font-size: 12px; color: rgba(255,255,255,.72);
  line-height: 1.5; display: flex; align-items: center; gap: 10px;
}
.sidebar-user-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-link {
  flex-shrink: 0; border: 0; background: transparent; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; color: var(--brand-accent); line-height: 1.5;
}
.sidebar-user-link:hover { text-decoration: underline; }
.sidebar-user-link:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  background: var(--surface); border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
}
.topbar-title { font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -.1px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-user { color: var(--ink-3); font-size: 12px; }
.content { flex: 1; overflow-y: auto; padding: 26px 28px 32px; }

/* ============================================================
   面板与卡片 —— 描边替投影（与小程序卡片同源）
   ============================================================ */
.panel {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px;
  padding: 18px 22px 22px; margin-bottom: 18px;
  box-shadow: 0 1px 2px var(--sh-1);
}
.panel:last-child { margin-bottom: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.panel-note { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin-bottom: 14px; }
.panel-note b { color: var(--ink-2); }
/* gap 由 8px 提到 14px：用户管理工具条现在同时有「显示已删除」和「强制首次改密」
   两个 checkbox，8px 下复选框会和下一个标签的文字贴在一起，看着像一个控件。 */
.panel-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ============================================================
   角色管理（只读说明页）—— 说明横幅 / 角色卡 / 权限矩阵
   ============================================================ */
.panel-body { padding: 14px 16px; }

.notice-box {
  padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid var(--rule); border-left: 3px solid var(--brand);
  border-radius: 6px; background: var(--surface-2);
  font-size: 13px; line-height: 1.75; color: var(--ink-2);
}
.notice-box b { color: var(--ink); }

.role-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
}
.role-card {
  border: 1px solid var(--rule); border-radius: 8px;
  background: var(--surface); padding: 12px 14px;
}
.rc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.rc-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.rc-sum { font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.rc-note {
  margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--ink-3);
  padding-left: 8px; border-left: 2px solid var(--rule);
}
.rc-perms { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.perm-tag {
  font-size: 11px; line-height: 1.5; padding: 1px 7px; border-radius: 10px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--rule);
  white-space: nowrap;
}
.perm-tag.perm-more { color: var(--ink-3); }
.rc-foot {
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: wrap;
}

/* 权限勾选区（角色新建/编辑弹窗） */
.perm-picker {
  border: 1px solid var(--rule); border-radius: 6px;
  max-height: 320px; overflow-y: auto; overflow-x: hidden;
  background: var(--surface);
}
.perm-group { padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.perm-group:last-child { border-bottom: none; }
.perm-group-title {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  margin-bottom: 5px; letter-spacing: .04em;
}
/* ⚠ 用 grid 而不是 flex：`.switch-check` 自带 `white-space: nowrap`，
   flex 布局下长描述文本会把复选框和名称挤到两列（真机/窄屏尤其明显）。
   grid 固定三列：勾选框 | 名称 | 说明，说明列可换行、不会横向溢出。 */
.perm-item {
  display: grid !important;
  grid-template-columns: 16px max-content 1fr;
  align-items: start;
  gap: 8px;
  padding: 4px 0;
  white-space: normal !important;
  cursor: pointer;
}
.perm-item input {
  width: 15px; height: 15px; margin: 2px 0 0; padding: 0;
  cursor: pointer; accent-color: var(--brand); flex: none;
}
.perm-item > span:nth-of-type(1) {
  font-size: 13px; color: var(--ink); line-height: 1.5; white-space: normal;
}
.perm-desc {
  font-size: 12px; color: var(--ink-3) !important;
  line-height: 1.5; white-space: normal;
}

/* 权限矩阵：自定义角色的单元格可勾选 */
/* 权限矩阵：角色多了会横向放不下 —— 首列（能力）与表头固定，容器可横向+纵向滚动 */
.matrix-wrap {
  overflow: auto;
  max-height: 66vh;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
}
table.matrix {
  font-size: 13px;
  /* sticky 定位需要 separate（collapse 下边框会跟着一起滚） */
  border-collapse: separate;
  border-spacing: 0;
  min-width: max-content;   /* 列不被压扁，横向滚动由容器接管 */
}
table.matrix thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2);
  height: 44px; vertical-align: bottom;
}
table.matrix th.cap-col, table.matrix td.cap-col {
  text-align: left; min-width: 260px; max-width: 340px;
  color: var(--ink); font-weight: 500;
  /* 首列固定：横向滚动时始终看得见「这一行是什么能力」 */
  position: sticky; left: 0; z-index: 3;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--rule);
}
table.matrix thead th.cap-col { z-index: 4; background: var(--surface-2); }
table.matrix td { background: var(--surface); }
table.matrix tbody tr:hover td { background: var(--surface-2); }
table.matrix tbody tr:hover td.cap-col { background: var(--surface-2); }
table.matrix tr.mx-dirty td { background: var(--brand-tint); }
table.matrix tr.mx-dirty td.cap-col { background: var(--brand-tint); }
table.matrix td.mx-cell { text-align: center; min-width: 96px; }
table.matrix input.mx-perm {
  width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--brand);
}
table.matrix input.mx-perm:disabled { cursor: not-allowed; opacity: .55; }
table.matrix .mx-locked { color: var(--ink-3); }
table.matrix .mx-role-sub {
  display: block; font-size: 11px; font-weight: 400; color: var(--ink-3); letter-spacing: 0;
}
table.matrix .mx-empty { padding: 24px; text-align: center; color: var(--ink-3); }

/* 工具条里的小号输入框 / 下拉（回收站筛选用） */
.input-sm {
  height: 30px; padding: 0 8px; font-size: 13px;
  border: 1px solid var(--rule); border-radius: 6px;
  background: var(--surface); color: var(--ink);
  min-width: 120px;
}
.input-sm:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* 页头：标题 + 说明 + 主动作（全站 CRUD 统一模式） */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .ph-text { min-width: 0; }

/* ============================================================
   统计卡 —— 有主次的看板：需要行动的最大最靠左
   ============================================================ */
.stat-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.stat-card {
  flex: 1 1 150px; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 14px; padding: 16px 20px 18px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.stat-card:hover {
  border-color: var(--brand-line); background: var(--brand-tint);
  box-shadow: 0 6px 18px var(--sh-1); transform: translateY(-1px);
}
.stat-card .kk { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; letter-spacing: .3px; }
.stat-card .kv {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 32px; font-weight: 700; color: var(--ink); line-height: 1.1; letter-spacing: -.02em;
}
/* ⚠ ink-3 只在白底/页底达标（4.92 / 4.59）；一旦底色变浅品牌色 tint 即掉到 4.34，
   所以 hover 时把标签升到 brand-strong（在 tint 上 5.50）。 */
.stat-card:hover .kk { color: var(--brand-strong); }
/* 待处理项：更大、红底红描边（不靠红字单打独斗） */
.stat-card.hot { flex: 1.5 1 220px; border-color: var(--danger); background: var(--danger-bg); }
.stat-card.hot .kk { color: var(--danger); font-weight: 600; }
.stat-card.hot .kv { color: var(--danger); }
.stat-card.hot:hover { border-color: var(--danger); background: var(--danger-bg); }
.stat-card.idle .kv { color: var(--ink-3); }

/* ============================================================
   按钮 —— 3 变体 × 2 尺寸
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 9px;
  font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
a.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--rule-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .88; }
/* 次要但危险（如「驳回」）：描边 + 危险文字，悬停才上红底 */
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-sm { height: 28px; padding: 0 11px; font-size: 12px; border-radius: 7px; gap: 4px; }
.btn-block { width: 100%; }

/* ============================================================
   表格 —— B端最重要的组件
   ============================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 0 12px; text-align: left; border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
th {
  height: 42px; background: transparent; color: var(--ink-3);
  border-bottom: 1px solid var(--rule-2);
  font-size: 12px; font-weight: 600; letter-spacing: .6px; white-space: nowrap;
}
td { height: var(--row-h); font-size: 14px; color: var(--ink-2); }
td > b, td > strong { color: var(--ink); }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
/* 可点击行（爬取状态页等）：整行可点，悬停给指针；选中态用品牌强调底色 */
tbody tr.clickable { cursor: pointer; }
tbody tr.row-active td { background: var(--info-bg); }
.num-ok { color: var(--ok); }
.num-bad { color: var(--danger); }
.num-info { color: var(--info); }
.table-wrap table { font-size: 14px; }
/* 首/末列去掉内距：文字与面板标题左对齐，视觉上"挂"在同一条线上。
   ⚠ 只动 padding，td 的盒子仍占满列宽，行悬停底色不受影响。 */
table th:first-child, table td:first-child { padding-left: 0; }
table th:last-child, table td:last-child { padding-right: 0; }

/* 行内次要信息（如门店的展示名） */
.cell-sub { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }
.cell-clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
/* 表格行内的按钮不加边框，悬停才显形 —— 一列 13 行全是描边框会显得吵 */
.row-actions .btn-sm { border-color: transparent; background: transparent; color: var(--ink-2); }
.row-actions .btn-sm:hover { background: var(--surface-2); border-color: var(--rule-2); color: var(--ink); }
.row-actions .btn-sm.danger { color: var(--danger); }
.row-actions .btn-sm.danger:hover { background: var(--danger-bg); border-color: var(--danger); }

/* 已软删除的用户行：整行灰化，操作列只留「彻底清除」。
   软删的行仍占着 id，靠这个视觉区分避免误认为「删除没生效」。 */
tbody tr.row-deleted td { color: var(--ink-3); background: var(--surface-2); }
tbody tr.row-deleted td b { font-weight: 500; }
tbody tr.row-deleted:hover td { background: var(--surface-2); }

/* 「显示已删除」开关（面板标题右侧，与新增按钮并排） */
.switch-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; white-space: nowrap;
}
.switch-check input {
  width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--brand);
}

/* ============================================================
   徽章 —— 5 语义，全部 ≥4.5:1
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 6px; font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: .2px;
  white-space: nowrap;
}
.badge-ok     { background: var(--ok-bg);        color: var(--ok); }
.badge-warn   { background: var(--warn-bg);      color: var(--warn); }
.badge-danger { background: var(--danger-bg);    color: var(--danger); }
.badge-info   { background: var(--info-bg);   color: var(--info); }
.badge-gray   { background: var(--surface-2);    color: var(--ink-2); }

/* ============================================================
   徽章组（门店的平台标签）
   ============================================================ */
.badge-group { display: inline-flex; gap: 4px; flex-wrap: wrap; }

/* ============================================================
   表单
   ============================================================ */
.form-row { margin-bottom: 16px; }
.form-row:last-child { margin-bottom: 0; }
.form-row label { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; margin-bottom: 6px; }
.form-row label.required::after { content: ' *'; color: var(--danger); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--rule-2); border-radius: 9px;
  font-family: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-row textarea { height: auto; min-height: 80px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.form-row select { cursor: pointer; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint);
}
/* 占位符用 ink-3（4.97:1 达标）——ink-x 太浅，作为「文字」不满足 AA */
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--ink-3); }
/* 禁用态文字用 ink-x：WCAG 1.4.3 对「非活动控件」豁免，这是 ink-x 的正当用途 */
.form-row input:disabled, .form-row select:disabled {
  background: var(--surface-2); color: var(--ink-x); cursor: not-allowed;
}
.form-help { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.7; }
.form-help b { color: var(--ink-2); }

/* 工具条里的裸控件（日期选择 / 筛选下拉），与 .form-row 内的输入框同款 */
.control {
  height: 36px; padding: 0 12px;
  border: 1px solid var(--rule-2); border-radius: 9px;
  font-family: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
select.control { cursor: pointer; }

/* 内联勾选（表格/表单内的复选框）：必须压过上面的 .form-row label / input 规则 */
.form-row .plat-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.form-row .plat-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 400; color: var(--ink-2);
  margin-bottom: 0; cursor: pointer;
}
.form-row .plat-check input,
.form-row .inline-check input {
  width: auto; height: auto; padding: 0; border: none; margin: 0; border-radius: 0;
  accent-color: var(--brand); cursor: pointer;
}
.form-row .plat-check input:focus, .form-row .inline-check input:focus { box-shadow: none; }
.inline-check {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-3); cursor: pointer;
}

/* ============================================================
   弹窗
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; background: var(--overlay);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100;
}
.modal {
  width: 480px; max-width: 100%; max-height: 100%;
  background: var(--surface); border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 64px var(--overlay);
}
.modal.modal-wide { width: 820px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--rule); flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.modal-close {
  width: 32px; height: 32px; flex-shrink: 0; border: none; border-radius: 6px;
  background: none; color: var(--ink-3); font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--surface-2); color: var(--ink); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--rule); flex-shrink: 0;
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ============================================================
   抽屉（右侧滑出）—— 门店「平台身份」「从平台同步」的容器
   ============================================================ */
.drawer-mask {
  position: fixed; inset: 0; background: var(--overlay); z-index: 110;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 720px; max-width: 94vw;
  background: var(--surface); z-index: 111;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .24s cubic-bezier(.22,.61,.36,1);
  box-shadow: -8px 0 32px var(--overlay);
}
.drawer.show { transform: translateX(0); }
.drawer.drawer-wide { width: 880px; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--rule); flex-shrink: 0;
}
.drawer-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.drawer-sub { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-top: 3px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-foot {
  padding: 14px 20px; border-top: 1px solid var(--rule); flex-shrink: 0;
  display: flex; justify-content: flex-end; gap: 10px;
}
@media (max-width: 1320px) { .drawer, .drawer.drawer-wide { width: 640px; } }

/* ============================================================
   分段控件（绑定申请的 待审核/已通过/已驳回/全部）
   ============================================================ */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 8px; }
.tab {
  height: 28px; padding: 0 12px; border: none; border-radius: 6px;
  background: transparent; color: var(--ink-2);
  font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--surface); color: var(--brand-strong); font-weight: 600; box-shadow: 0 1px 2px var(--sh-1); }

/* ============================================================
   门店 × 平台身份（抽屉内）
   ============================================================ */
.sect-title {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  letter-spacing: .3px; margin: 4px 0 10px; padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.sect-title:first-child { padding-top: 0; border-top: none; }
.map-list { margin-bottom: 16px; }
.map-list table { table-layout: fixed; }
.map-list td, .map-list th { vertical-align: top; word-break: break-word; }
/* 固定几列宽度，否则「备注」一长就把平台徽章挤成竖排 */
.map-list th:nth-child(1), .map-list td:nth-child(1) { width: 96px; }
.map-list th:nth-child(2), .map-list td:nth-child(2) { width: 24%; }
.map-list th:nth-child(3), .map-list td:nth-child(3) { width: 118px; }
.map-list th:nth-child(4), .map-list td:nth-child(4) { width: 116px; }
.map-list th:nth-child(6), .map-list td:nth-child(6) { width: 132px; }
.map-list .badge { white-space: nowrap; }
.map-list .row-actions { flex-wrap: nowrap; white-space: nowrap; }
.map-list .btn-sm { white-space: nowrap; }
.map-list td { height: auto; padding-top: 10px; padding-bottom: 10px; }
.map-empty { color: var(--ink-3); font-size: 12px; padding: 10px 0; }

/* 同步预览：一行一个平台门店 */
.sync-sum { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; color: var(--ink-3); }
.sync-sum b { font-family: var(--font-num); color: var(--ink); font-weight: 600; }
.sync-row { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.sync-row:last-child { border-bottom: none; }
.sync-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sync-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.sync-pid { color: var(--ink-3); font-size: 12px; font-family: var(--font-num); }
.sync-pick { display: flex; align-items: center; gap: 8px; }
.sync-pick select { flex: 1; min-width: 160px; }

/* 绑定自检结果 */
.verify-box {
  margin-top: 14px; padding: 12px 14px; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--rule); border-radius: 8px;
}
.verify-box .vp { display: flex; gap: 8px; padding: 3px 0; line-height: 1.7; }
.verify-box .vp b { min-width: 84px; flex-shrink: 0; font-weight: 600; color: var(--ink); }
.warn-line { color: var(--warn); font-size: 12px; padding: 3px 0; line-height: 1.7; }

/* 自检汇总条（页头常驻位） */
.verify-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 16px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--rule); font-size: 12px; color: var(--ink-3);
}
.verify-bar.has-issue { border-color: var(--warn); background: var(--warn-bg); color: var(--warn); }
.verify-bar b { font-family: var(--font-num); font-weight: 600; }
.verify-bar .vb-sp { flex: 1; }

/* 自检明细项 */
.verify-item { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.verify-item:last-child { border-bottom: none; }
.verify-item > b { display: block; font-size: 14px; margin-bottom: 2px; }

/* 分步流程指示器（从平台同步） */
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.step .sn {
  width: 18px; height: 18px; border-radius: 999px; flex-shrink: 0;
  background: var(--surface-2); color: var(--ink-3);
  font-family: var(--font-num); font-size: 11px; line-height: 18px; text-align: center;
}
.step.on { color: var(--ink); font-weight: 600; }
.step.on .sn { background: var(--brand); color: #fff; }
.step.done { color: var(--ink-2); }
.step.done .sn { background: var(--ok); color: #fff; }
.step-sep { width: 16px; height: 1px; background: var(--rule-2); flex-shrink: 0; }

/* ============================================================
   空态 / 加载 / 提示
   ============================================================ */
.empty { text-align: center; color: var(--ink-3); padding: 48px 20px; font-size: 14px; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.empty-hint { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; line-height: 1.7; }
.muted { color: var(--ink-3); font-size: 12px; }
/* 已删除行状态列的第二行（删除时间 · 操作人）：比 .muted 再小一号且不断行 */
.tiny { font-size: 11px; line-height: 1.35; margin-top: 2px; white-space: nowrap; }

/* 表单里的补充说明（放在字段下方，解释这个选项会影响什么） */
.form-hint {
  margin-top: 6px; font-size: 12px; line-height: 1.6;
  color: var(--ink-3);
}
.form-hint b { color: var(--ink-2); }

/* 长按确认按钮（ui.js::confirmWithHold）：按住时从左往右填充，松手即回弹 */
.btn-hold {
  position: relative; overflow: hidden;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.btn-hold::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255, 255, 255, .32);
  transform: scaleX(0); transform-origin: left center;
  pointer-events: none;
}
.btn-hold.holding::after { animation: holdfill var(--hold-ms, 1500ms) linear forwards; }
@keyframes holdfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hold-tip {
  min-height: 18px; margin-top: 10px;
  color: var(--danger); font-size: 12px; line-height: 1.6;
}
.hold-tip:empty { min-height: 0; margin-top: 0; }
.hint-danger { color: var(--danger); font-size: 12px; line-height: 1.6; }

/* 加载骨架 */
.skeleton { height: 12px; border-radius: 6px; background: var(--surface-2); animation: sk-pulse 1.4s ease-in-out infinite; }
.skeleton + .skeleton { margin-top: 12px; }
.skeleton.w40 { width: 40%; }
.skeleton.w70 { width: 70%; }
@keyframes sk-pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.loading-box { padding: 8px 0; }

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 14px;
  max-width: 80vw; box-shadow: 0 8px 24px var(--sh-1);
  opacity: 0; pointer-events: none; z-index: 300;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--ok); }

/* ============================================================
   细滚动条 —— 默认的 17px 系统滚动条会把「精工感」直接打回 2010 年
   ============================================================ */
.content::-webkit-scrollbar,
.nav::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar { width: 10px; height: 10px; }

.content::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track { background: transparent; }

.content::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
  background: var(--rule-2); border-radius: 999px;
  border: 3px solid transparent; background-clip: content-box;
}
.content::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.drawer-body::-webkit-scrollbar-thumb:hover {
  background: var(--ink-x); background-clip: content-box;
}

/* 深色侧栏里的滚动条要用浅色，否则在深底上是一块脏灰 */
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.16); border-radius: 999px;
  border: 3px solid transparent; background-clip: content-box;
}
.nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28); background-clip: content-box; }

/* ============================================================
   交互层 v6（2026-10-31）—— 让界面"活"起来
   ============================================================
   原则：
   1. 只动 opacity / transform / 颜色，绝不动 width/height/top，避免重排
   2. 入场 220~260ms，反馈 150ms —— 慢过 300ms 会显迟钝，快过 120ms 会看不见
   3. 全部靠 class 触发，不依赖 JS 动画库
   4. prefers-reduced-motion 由文件顶部的全局规则统一降级（duration → .01ms）
   ============================================================ */

@keyframes viewIn   { from { opacity: 0; transform: translateY(6px); }  to { opacity: 1; transform: none; } }
@keyframes titleIn  { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes maskIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn  { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes barGrow  { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* 页面切换：内容淡入上移，标题轻微下落 —— 转场有方向感，不像硬刷新 */
.view-enter  { animation: viewIn 260ms cubic-bezier(.22,.61,.36,1) both; }
.title-enter { animation: titleIn 220ms cubic-bezier(.22,.61,.36,1) both; }

/* 弹窗：遮罩淡入 + 面板从下方 10px 浮起（display 由 none 切 flex 时自动触发） */
.modal-mask { animation: maskIn 160ms ease both; }
.modal-mask .modal { animation: modalIn 220ms cubic-bezier(.22,.61,.36,1) both; }

/* 顶栏：内容滚动后才浮起投影，静止时保持"贴合" */
.topbar { transition: box-shadow .2s ease; }
.topbar.scrolled { box-shadow: 0 6px 16px var(--sh-1); }

/* 按钮：按下有 1px 的实体反馈（比改背景色更"有触感"） */
.btn { transition: background .15s, border-color .15s, color .15s, opacity .15s, transform .08s; }
.btn:active:not(:disabled) { transform: translateY(1px); }

/* 统计卡：按下回弹 + 键盘焦点环（卡片本身 tabindex=0，必须有可见焦点） */
.stat-card:active { transform: translateY(0) scale(.995); }
.stat-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 导航：悬停时图标右移 1px，选中条从中间"长出来" */
.nav-ico { transition: transform .15s ease; }
.nav-item:hover .nav-ico { transform: translateX(1px); }
.nav-item.active::before { animation: barGrow 220ms cubic-bezier(.22,.61,.36,1) both; transform-origin: center; }

/* 行内操作：靠"颜色分层"提亮，不靠透明度。
   ⚠ 实测（2026-10-31）：opacity .78 会把 --ink-2 的对比度从 7.66:1 压到 **4.34:1**、
     --danger 从 5.47 压到 **3.82**，两者都跌破 AA。12px 文字属正常字号，必须 ≥4.5:1。
   ⇒ 静止用 --ink-2（7.66:1），整行悬停/键盘聚焦时升到 --ink（15:1）。 */
.row-actions .btn-sm { transition: background .15s, border-color .15s, color .15s; }
tbody tr:hover .row-actions .btn-sm:not(.danger),
.row-actions .btn-sm:focus-visible { color: var(--ink); }

/* 输入类控件：悬停描边预亮，聚焦才是品牌色 —— 两级反馈，不一上来就抢眼 */
.form-row input, .form-row select, .form-row textarea, .control {
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-row input:hover:not(:disabled), .form-row select:hover:not(:disabled),
.form-row textarea:hover:not(:disabled), .control:hover { border-color: var(--brand-line); }

/* ============================================================
   配色 —— 与小程序 6 套主题同源（2026-10-31）
   ============================================================
   驱动方式：<html data-theme="...">；**没有该属性 = 浅色·蓝（:root 即默认值）**。
   主题清单与 syz/utils/theme.js 的 THEMES 一一对应，改一处要两端同步。

   ⚠ 本区是**调色板定义**，不是规则里散落的色值 ——
     verify_web_styles.py 的硬编码色扫描会整块跳过（与小程序 .theme-* 同规则）。
   ⚠ B 端把 --brand-ink 当「沉浸深底」（登录左栏 / 侧栏底色）；
     小程序里它是「深底上的品牌文字色」，深色主题下会变成浅粉/浅青 ——
     所以 dark / dark-mint 两套必须把它改写成卡片面，否则侧栏会翻成亮色。
   ⚠ 深色主题的主色本身是**浅色**，压在上面的字必须反过来用 --paper；
     见本节末尾的 [data-theme="dark"] .btn-primary 等规则。
   ============================================================ */

/* 浅色 · 绿 */
[data-theme="light-green"] {
  --ink: #17251d;
  --ink-2: #455a4e;
  --ink-3: #566c60;
  --ink-x: #9aada2;
  --paper: #f7efe8;
  --surface: #fffdfb;
  --surface-2: #efe4da;
  --rule: #e7dcd2;
  --rule-2: #d5c9be;
  --brand: #3f7a5e;
  --brand-ink: #2a5a45;
  --brand-strong: #244d3b;
  --brand-tint: #dceae2;
  --brand-line: #a8c9b8;
  --brand-accent: #d9a05b;
  --ok: #0e7048;
  --ok-bg: #e3f1ea;
  --warn: #b03a0a;
  --warn-bg: #fbebde;
  --danger: #c4322a;
  --danger-bg: #fce8e6;
  --info: #1b5bc4;
  --info-bg: #e4eef7;
  --sh-1: rgba(23,37,29,0.07);
  --sh-2: rgba(63,122,94,0.40);
  --overlay: rgba(20,32,26,0.48);
}

/* 浅色 · 藏青金 */
[data-theme="light-navy"] {
  --ink: #1b2540;
  --ink-2: #4a5468;
  --ink-3: #5f6778;
  --ink-x: #a3a9b5;
  --paper: #f7efe8;
  --surface: #fffdfb;
  --surface-2: #efe4da;
  --rule: #e7dcd2;
  --rule-2: #d5c9be;
  --brand: #1f2a44;
  --brand-ink: #16203a;
  --brand-strong: #121b31;
  --brand-tint: #e9e4d4;
  --brand-line: #c6a75e;
  --brand-accent: #c6a75e;
  --ok: #2f6b4f;
  --ok-bg: #e2efe6;
  --warn: #94400f;
  --warn-bg: #f7e9d2;
  --danger: #a8412c;
  --danger-bg: #f8e3dd;
  --info: #2c5a8a;
  --info-bg: #e3ecf5;
  --sh-1: rgba(31,42,68,0.08);
  --sh-2: rgba(31,42,68,0.36);
  --overlay: rgba(20,28,45,0.52);
}

/* 浅色 · 玫瑰 */
[data-theme="light-rose"] {
  --ink: #3a2222;
  --ink-2: #6b4a48;
  --ink-3: #795b58;
  --ink-x: #b39b96;
  --paper: #f7efe8;
  --surface: #fffdfb;
  --surface-2: #efe4da;
  --rule: #e7dcd2;
  --rule-2: #d5c9be;
  --brand: #984343;
  --brand-ink: #7a3232;
  --brand-strong: #662a2a;
  --brand-tint: #f2dfd9;
  --brand-line: #d79b95;
  --brand-accent: #91bdc2;
  --ok: #2f6b4f;
  --ok-bg: #e6efe8;
  --warn: #9a5a18;
  --warn-bg: #f8e8d4;
  --danger: #a8412c;
  --danger-bg: #f8e3dd;
  --info: #3a6f74;
  --info-bg: #e2eef0;
  --sh-1: rgba(58,34,34,0.07);
  --sh-2: rgba(152,67,67,0.36);
  --overlay: rgba(40,24,24,0.50);
}

/* 深色 · 黑 */
[data-theme="dark"] {
  --ink: #f2f4f7;
  --ink-2: #b9c0c8;
  --ink-3: #8a929b;
  --ink-x: #5c636b;
  --paper: #0d0d0f;
  --surface: #1a1a1e;
  --surface-2: #242429;
  --rule: rgba(255,255,255,0.10);
  --rule-2: rgba(255,255,255,0.18);
  --brand: #f2a8c2;
  --brand-ink: #1a1a1e;
  --brand-strong: #ffd6e4;
  --brand-tint: rgba(242,168,194,0.14);
  --brand-line: rgba(242,168,194,0.30);
  --brand-accent: #e8a05c;
  --ok: #4fd1a0;
  --ok-bg: rgba(79,209,160,0.14);
  --warn: #f0995c;
  --warn-bg: rgba(240,153,92,0.14);
  --danger: #ff8c84;
  --danger-bg: rgba(255,140,132,0.14);
  --info: #7db4e8;
  --info-bg: rgba(125,180,232,0.14);
  --sh-1: rgba(0,0,0,0.5);
  --sh-2: rgba(242,168,194,0.30);
  --overlay: rgba(0,0,0,0.62);
}

/* 深色 · 藏青薄荷 */
[data-theme="dark-mint"] {
  --ink: #f4f6fb;
  --ink-2: #b8c0cc;
  --ink-3: #8a94a3;
  --ink-x: #565e6b;
  --paper: #0e121f;
  --surface: #151c2a;
  --surface-2: #1e2636;
  --rule: rgba(244,246,251,0.10);
  --rule-2: rgba(244,246,251,0.18);
  --brand: #94d5e0;
  --brand-ink: #151c2a;
  --brand-strong: #dff4f8;
  --brand-tint: rgba(148,213,224,0.14);
  --brand-line: rgba(148,213,224,0.30);
  --brand-accent: #e8a05c;
  --ok: #4fd1a0;
  --ok-bg: rgba(79,209,160,0.14);
  --warn: #f0995c;
  --warn-bg: rgba(240,153,92,0.14);
  --danger: #ff8c84;
  --danger-bg: rgba(255,140,132,0.14);
  --info: #7db4e8;
  --info-bg: rgba(125,180,232,0.14);
  --sh-1: rgba(0,0,0,0.5);
  --sh-2: rgba(148,213,224,0.28);
  --overlay: rgba(0,0,0,0.62);
}

/* 深色主题：主色/危险色本身是浅色，白字压上去只有 1.6~2.2 ⇒ 必须反过来用深字 */
/* ⚠ 只对**实底**按钮/角标生效。徽章（badge-*）的底是 14% 淡染，文字本就该保持亮色 ——
   把它一起改深会让「已绑定」掉到 1.1:1（实测踩过）。 */
[data-theme="dark"] .btn-primary, [data-theme="dark-mint"] .btn-primary,
[data-theme="dark"] .btn-danger,  [data-theme="dark-mint"] .btn-danger,
[data-theme="dark"] .nav-badge,   [data-theme="dark-mint"] .nav-badge { color: var(--paper); }

/* Toast 默认是"墨底白字"，深色主题下 --ink 变浅，底和字会一起变白 */
[data-theme="dark"] .toast, [data-theme="dark-mint"] .toast {
  background: var(--surface-2); color: var(--ink);
}

/* 配色选择弹层里的色卡探针：不参与布局，只用来读各主题的 --brand */
.theme-probe { position: fixed; left: -9999px; top: -9999px; width: 0; height: 0; }

/* ============================================================
   配色入口（顶栏）
   ============================================================ */
.topbar { position: relative; }
.theme-btn { gap: 8px; }
.theme-dot {
  width: 12px; height: 12px; border-radius: 999px; flex-shrink: 0;
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--rule-2);
}

.theme-pop {
  /* 顶栏下沿再留 6px，别让弹层压住顶栏那条分隔线 */
  position: absolute; right: 28px; top: calc(var(--topbar-h) + 6px); z-index: 120;
  width: 320px; padding: 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--rule);
  box-shadow: 0 18px 44px var(--overlay);
  animation: modalIn 180ms cubic-bezier(.22,.61,.36,1) both;
}
.theme-pop[hidden] { display: none; }
.tp-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.tp-group + .tp-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.tp-label { font-size: 11px; color: var(--ink-3); letter-spacing: .08em; margin-bottom: 8px; }
.tp-row { display: flex; flex-wrap: wrap; gap: 6px; }

.tp-chip {
  display: inline-flex; align-items: center; gap: 7px;
  width: calc(50% - 3px); padding: 7px 9px; border-radius: 9px;
  border: 1px solid var(--rule-2); background: var(--surface);
  color: var(--ink-2); font-family: inherit; font-size: 12px; cursor: pointer;
  text-align: left; transition: border-color .15s, background .15s, color .15s;
}
.tp-chip:hover { border-color: var(--brand-line); color: var(--ink); }
.tp-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tp-chip.on {
  border-color: var(--brand); background: var(--brand-tint);
  color: var(--brand-strong); font-weight: 600;
}
.tp-swatch {
  width: 14px; height: 14px; border-radius: 999px; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14);
}

/* ============================================================
   数据大屏 —— 整页模式（2026-11-01）
   大屏是固定 1920×1080 的独立舞台，塞进后台外壳会既占不满又抢滚动条。
   进 /screen 时隐藏侧栏与顶栏，内容区交给 iframe 铺满。
   ============================================================ */
body.is-screen .sidebar,
body.is-screen .topbar { display: none; }
body.is-screen .content { padding: 0; overflow: hidden; }
body.is-screen .main { background: var(--paper); }

.screen-shell {
  display: flex; flex-direction: column;
  width: 100%; height: 100%;
}
.screen-frame {
  flex: 1; min-height: 0; width: 100%;
  border: 0; display: block;
  background: var(--paper);
}
/* 2026-11-03：返回/退出并进大屏自己的标题栏（见 screen.html），
   外壳不再渲染顶部工具条 —— 否则工具条 + 大屏标题叠成两行，
   还把 iframe 高度吃掉 40px、逼出左右黑边。 */

/* ============================================================
   重置密码 / 强制改密开关（2026-11-01）
   ============================================================ */

/* 开关打开时整条变警示色 —— 这是个会拦住所有人的开关，
   必须一眼看出"现在是开着的"，不能和「显示已删除」长得一样。 */
.switch-check.is-warn { color: var(--warn); font-weight: 600; }
.switch-check.is-warn input { accent-color: var(--warn); }

/* 新密码展示：等宽字体 + 字距，避免 l/1、O/0 看起来一样；
   即便我们已经把易混字符从生成集里剔除了，人工输入的密码仍可能撞上。 */
.pwd-result { padding: 2px; }
.pwd-value {
  margin: 8px 0 12px; padding: 12px 16px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--rule-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px; font-weight: 700; letter-spacing: .12em; color: var(--ink);
  user-select: all; word-break: break-all;
}
.pwd-note {
  margin-top: 16px; font-size: 13px; color: var(--ink-2); line-height: 1.8;
}

/* ============================================================
   日报页（2026-11-09 美化）
   ─ 顶部四张概览卡：累计 / 本月已出 / 本月缺口 / 最近更新
   ─ 左侧 3px 竖条表示状态：默认中性，ok 绿、warn 橙、danger 红
   ⚠ 行尾收口必须写成 `; }`（分号后留空格）——守卫会把 `}` 前的最后一段
     当成「声明后游离文本」，`margin-bottom:14px}` 会被判红。
   ============================================================ */
.rp-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px; margin-bottom: 14px; }
.rp-card { position: relative; padding: 14px 16px 13px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--rule);
  box-shadow: 0 1px 2px var(--sh-1); overflow: hidden; }
.rp-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--rule-2); }
.rp-card.ok::before { background: var(--ok); }
.rp-card.warn::before { background: var(--warn); }
.rp-card.danger::before { background: var(--danger); }
.rp-card u { display: block; text-decoration: none; font-size: 12px;
  color: var(--ink-3); letter-spacing: .3px; }
.rp-card b { display: inline-block; font-family: var(--font-num); font-size: 30px;
  line-height: 1.15; color: var(--ink); margin-top: 5px; letter-spacing: -.5px; }
.rp-card b.rp-small { font-size: 20px; letter-spacing: 0; }
.rp-card i { font-style: normal; font-size: 12.5px; color: var(--ink-3); margin-left: 6px; }
.rp-card .rp-sub { display: block; margin-top: 6px; font-size: 11.5px; color: var(--ink-x);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-count { margin-left: 8px; font-size: 12px; color: var(--ink-3); font-weight: 400; }
.rp-table td.rp-wd { color: var(--ink-3); font-size: 12.5px; }
.rp-table .rp-date { font-weight: 600; }
.rp-table td.rp-act { text-align: right; }
.rp-pager { display: flex; justify-content: flex-end; align-items: center;
  gap: 10px; margin-top: 14px; }
@media (max-width: 1100px) {
  .rp-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 分页条 / 文本链接（2026-11-11：操作审计、任务管理页）----------
   分页只用「上一页 / 下一页 + 第几页」，不做页码列表：
   这两个页面的数据是按时间倒序翻的，跳页没有实际意义。 */
.pager {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px 2px;
}
.pager .muted { font-size: 13px; }
.link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link:hover { opacity: 0.75; }