/* ══════════════════════════════════════════════════════════════════════════
   v180 · 页签选中指示：文字宽下划线 → 整格宽指示条
   ──────────────────────────────────────────────────────────────────────────
   用户原话（2026-11-01）：「图上的页签栏按照之前统一的标准优化一下」
   截图是管理后台的 模块/价格/部门/大模型/系统。像素比对后确认它本来就是
   v166 那一套（12px / 500 / 选中 2px 文字宽下划线 / 五等分），所以真正要改的
   不是「让它跟别处一样」，而是**统一标准里选中指示的形态**：用户选了
   「选中改成整格宽下划线」（选项原话：更接近原生 App 的 Tab Bar）。

   所以本文件是 v166 `tabs-unified.css` 的**升级补丁**，挂在它后面：
     · 保留 v166 的字号 / 字重 / 行高 / 内边距 / 配色 / 上下留白 / 吸顶；
     · 只把「选中指示」从 text-decoration（文字宽，2px）换成 ::after（整格宽，3px）。

   为什么用 ::after 绝对定位而不是 border-bottom / box-shadow：
     · border-bottom 会让每个页签栏高 +3px ⇒ 破坏 v167 定死的「上方 12 / 下方 8」，
       且 7 处页签栏的 top 会集体下移，v169 的吸顶位 48 也要跟着改；
     · ::after + position:absolute **完全不占布局**（实测页签栏高仍 20、下方内容 top 仍 80）；
     · 位置定在按钮底边（bottom:0），不侵入下方 8px 留白，指示条与下方卡片保持 8px。

   为什么要显式 text-decoration:none：
     v166 的选中规则里写着 `text-decoration: underline`，不清掉就是「两条线」
     —— 文字宽那条 + 整格宽那条。深色模式那段特异性更高（html.dark + 4 个类），
     所以必须单独再清一次。

   特异性说明：
     · ①② React/公告 的按钮靠 4 个 Tailwind 类锁定，与本文件同级，写在后面即胜；
     · ③ `.se-dash-tab-selected`、④ `.se-pj-tab-on` 的底色是**运行时注入的 <style>**
       （晚于所有 link），所以它们的规则要带 `body` 前缀提一级特异性才压得住 —— 与 v166 一致。
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. 定位上下文：::after 要靠它贴住按钮左右边缘 ─────────────────────── */
button:where(.flex-1.py-0\.5.text-xs.font-medium),
button:where(.se-dash-tab),
body .se-pj-tab {
  position: relative;
}

/* ── 2. 清掉旧指示（v166 的文字宽下划线）──────────────────────────────── */
button:where(.flex-1.py-0\.5.text-xs.font-medium),
button:where(.se-dash-tab),
body .se-pj-tab {
  text-decoration: none;
}

button.flex-1.py-0\.5.text-xs.bg-white,
button.se-dash-tab-selected,
body .se-pj-tab.se-pj-tab-on {
  text-decoration: none;
}

/* 深色那段的特异性更高（html.dark + 同类名），必须同权重再清一次 */
html.dark button.flex-1.py-0\.5.text-xs.bg-white,
html.dark button.se-dash-tab-selected,
html.dark body .se-pj-tab.se-pj-tab-on {
  text-decoration: none;
}

/* ── 3. 选中指示：**文字宽**短杆（v203 改回），两端 2px 圆角 ────────────── */
/* 颜色用 currentColor：浅色跟选中文字 #2563eb，深色自动跟 #60a5fa，不必各写一遍。
 *
 * ★ v203（2026-11-04）把 v180 的「整格宽」改回「文字宽」。
 *   v180 写的是 left:0 + right:0 ⇒ 杆恒等于整个按钮宽。实测 447 视口：
 *     /clients 我的  按钮 108px、文字 24px、杆 107.75px（长 4.5 倍）
 *     /sales   新建  按钮  72px、文字 24px、杆  71.83px
 *     /admin   模块  按钮  86px、文字 24px、杆  86.20px
 *   用户要的是截图里那种「略宽于文字」的短杆。
 *
 *   为什么不用 left:50%+translateX(-50%) 配死宽度：四个页签文案长度不一
 *     （我的 24px / 成交客户 48px / 大模型 36px），固定 px 必然对不齐；
 *   为什么不用 text-decoration（v166 老方案）：它是直角，还原不了截图的圆角；
 *   为什么不用 `width: fit-content` 或 `::after{content:attr(...)}`：
 *     ::after 是空 content，CSS 层面**拿不到**文字宽度。
 *   ⇒ 由 `tab-line.js` 实测文字宽写进 `--se-tab-line-w`，这里只负责居中和描边。
 *     变量缺失时（脚本未加载 / 首帧）回退 2.2em ≈ 两个 12px 字宽，只是个临时兜底，
 *     宁可短一点也不能像 v180 那样一条横贯整格。 */
button.flex-1.py-0\.5.text-xs.bg-white::after,
button.se-dash-tab-selected::after,
body .se-pj-tab.se-pj-tab-on::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: var(--se-tab-line-w, 2.2em);
  max-width: 100%;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
  pointer-events: none;
}

/* 督导看板接管时 React 那个被压灰的页签（.se-tab-muted）绝不能长指示条 ——
   否则同时高亮两个。v166 清的是 text-decoration，这里清 ::after。 */
button.flex-1.py-0\.5.text-xs.se-tab-muted::after {
  content: none;
}
html.dark button.flex-1.py-0\.5.text-xs.se-tab-muted::after {
  content: none;
}
