/* ==========================================================================
   BOSS 权益管理 · 招聘后台集成样式
   全部规则限定在 .boss-ent-scope 下，避免影响招聘后台既有页面。
   ========================================================================== */

.boss-ent-scope {
  --be-bg: #F5F5F7;
  --be-surface: #FFFFFF;
  --be-text: #111111;
  --be-secondary: #3C3C43;
  --be-muted: #6E6E73;
  --be-line: #E5E5E5;
  --be-line-soft: #EFEFF2;
  --be-danger: #B42318;
  --be-danger-soft: #FDECEC;
  --be-warning: #B54708;
  --be-warning-soft: #FFF6E8;
  --be-info: #1D4E89;
  --be-info-soft: #E8F0FA;
  --be-radius: 8px;
}

.boss-ent-view {
  display: block;
  box-sizing: border-box;
  min-height: 100%;
  padding: 18px 22px 32px;
  background: var(--be-bg);
  color: var(--be-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.boss-ent-view *,
.boss-ent-view *::before,
.boss-ent-view *::after { box-sizing: border-box; }

/* hidden 属性必须压过模块内的 display 规则（后台全局样式没有兜底 [hidden]） */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) [hidden] { display: none !important; }

/* 图标 symbol 容器不参与布局（SVG 的 hidden 属性在部分内核下不生效） */
#bossEntitlementView > svg { display: none; }

/* 后台全局样式会给 button 设白色文字，这里显式收敛到模块配色 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi { color: var(--be-text); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi strong { color: var(--be-text); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi span,
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi em { color: var(--be-muted); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi.is-warn strong { color: var(--be-warning); }

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .icon {
  width: 16px; height: 16px; stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto;
}

/* ---------------------------------------------------------------- 模块头部 */
.boss-ent-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.boss-ent-heading h1 {
  margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25;
}
.boss-ent-heading p { margin: 4px 0 0; color: var(--be-muted); font-size: 12px; }
.boss-ent-head-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.boss-ent-env {
  height: 22px; display: inline-flex; align-items: center; padding: 0 8px;
  border-radius: 999px; background: #fff; color: var(--be-muted);
  font-size: 11px; box-shadow: inset 0 0 0 1px var(--be-line); white-space: nowrap;
}
.boss-ent-btn {
  height: 32px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--be-line); border-radius: 8px; background: var(--be-surface);
  color: var(--be-text); font-size: 13px; white-space: nowrap; cursor: pointer;
}
.boss-ent-btn:hover { background: #FAFAFA; }
.boss-ent-btn.is-primary { border-color: #111; background: #111; color: #fff; }
.boss-ent-btn.is-primary:hover { background: #000; }

/* ---------------------------------------------------------------- 模块内导航 */
.boss-ent-tabs {
  display: flex; align-items: center; gap: 2px; margin-bottom: 14px;
  border-bottom: 1px solid var(--be-line);
}
.boss-ent-tab {
  height: 34px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--be-muted); font-size: 13px; cursor: pointer;
  margin-bottom: -1px; white-space: nowrap;
}
.boss-ent-tab:hover { color: var(--be-text); }
.boss-ent-tab.is-on { color: var(--be-text); font-weight: 650; border-bottom-color: #111; }

.boss-ent-body { display: flex; flex-direction: column; gap: 12px; min-height: 200px; }

/* ---------------------------------------------------------------- 通用文本 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .context {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--be-muted); font-size: 12px; line-height: 16px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .context strong { color: var(--be-secondary); font-weight: 600; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .muted { color: var(--be-muted); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .mono { font-variant-numeric: tabular-nums; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .num { font-variant-numeric: tabular-nums; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .id-cell { color: var(--be-muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 统计卡片 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px;
  min-height: 62px; padding: 10px 12px; border: 1px solid var(--be-line);
  border-radius: var(--be-radius); background: var(--be-surface); text-align: left;
}
.boss-ent-scope button.kpi { width: 100%; cursor: pointer; }
.boss-ent-scope button.kpi:hover { box-shadow: inset 0 0 0 1px #D8D8DC; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi strong {
  font-size: 22px; line-height: 1.05; font-weight: 640; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi span { color: var(--be-muted); font-size: 12px; white-space: nowrap; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi em { font-style: normal; color: var(--be-muted); font-size: 11px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi.is-warn strong { color: var(--be-warning); }

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .type-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--be-line); border-radius: var(--be-radius);
  background: var(--be-surface);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .type-card .tc-left { display: flex; flex-direction: column; gap: 2px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .type-card .tc-left span { color: var(--be-muted); font-size: 11px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .type-card .tc-right { text-align: right; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .type-card .tc-right strong {
  font-size: 18px; font-weight: 640; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .type-card .tc-right span { display: block; color: var(--be-muted); font-size: 11px; }

/* ---------------------------------------------------------------- 提示条 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .notice {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid #F1D9B7; border-radius: var(--be-radius);
  background: var(--be-warning-soft); color: #6B3E06; font-size: 12px; line-height: 1.5;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .notice .icon { margin-top: 1px; color: var(--be-warning); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .readonly-banner {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid #D8DEE9; border-radius: var(--be-radius);
  background: var(--be-info-soft); color: var(--be-info); font-size: 12px;
}

/* ---------------------------------------------------------------- 面板 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .panel {
  border: 1px solid var(--be-line); border-radius: var(--be-radius);
  background: var(--be-surface); display: flex; flex-direction: column;
  min-height: 0; flex: 0 0 auto;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 8px 12px; border-bottom: 1px solid var(--be-line);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .panel-head h2 { margin: 0; font-size: 13px; font-weight: 650; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .panel-head .hint { color: var(--be-muted); font-size: 11px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .panel-body { padding: 12px; }

/* ---------------------------------------------------------------- 按钮 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--be-text);
  cursor: pointer; flex: 0 0 auto;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .icon-btn:hover { background: #F5F5F7; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn {
  height: 32px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--be-line); border-radius: 8px; background: var(--be-surface);
  color: var(--be-text); font-size: 13px; white-space: nowrap; cursor: pointer;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn:hover { background: #FAFAFA; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn:disabled { color: #A1A1A6; cursor: default; background: var(--be-surface); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-primary { border-color: #111; background: #111; color: #fff; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-primary:hover { background: #000; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-primary:disabled { background: #C7C7CC; border-color: #C7C7CC; color: #fff; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-danger { border-color: #E7B4B0; color: var(--be-danger); background: #fff; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-danger:hover { background: #FDF6F6; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-quiet { border-color: transparent; background: transparent; color: var(--be-secondary); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-quiet:hover { background: #F5F5F7; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-sm { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }

/* 后台全局 button 带 44px min-height；在 BOSS 作用域收回到组件自身高度。
   日期触发按钮已有独立 26×26 修复，不在本组；KPI 保持自身 66px 设计。 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot)
  :is(.btn, .boss-ent-btn, .boss-ent-tab, .chip, .icon-btn, .name-btn, .tl-edit) {
  min-height: 0;
}

/* BOSS 按钮统一键盘焦点；日期组件已有自己的 focus-visible 规则。 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot)
  :is(.btn, .boss-ent-btn, .boss-ent-tab, .chip, .icon-btn, .name-btn, .tl-edit, .kpi):focus-visible {
  outline: 2px solid #111;
  outline-offset: 1px;
}

/* ---------------------------------------------------------------- 筛选 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filters {
  padding: 10px 12px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%;
  border: 1px solid var(--be-line); border-radius: var(--be-radius); background: var(--be-surface);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filter-row { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap; width: 100%; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .chips { display: flex; flex-wrap: wrap; gap: 2px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .chip {
  height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent;
  color: var(--be-secondary); display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; font-size: 12px; cursor: pointer;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .chip small { color: var(--be-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .chip:hover { background: #F5F5F7; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .chip.is-on { background: #111; color: #fff; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .chip.is-on small { color: rgba(255, 255, 255, 0.78); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filter-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px; align-items: end; justify-items: stretch; width: 100%;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .field { display: flex; flex-direction: column; gap: 4px; color: var(--be-muted); font-size: 11px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .control {
  height: 32px; width: 100%; padding: 0 10px; border: 1px solid var(--be-line);
  border-radius: 8px; background: #fff; color: var(--be-text); outline: none; font-size: 13px;
  font-family: inherit;
}
.boss-ent-scope textarea.control { height: auto; padding: 8px 10px; resize: vertical; min-height: 62px; line-height: 1.5; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .control:focus { border-color: #111; box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .control:disabled { background: #FAFAFA; color: var(--be-muted); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filter-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 表格 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .table-panel {
  border: 1px solid var(--be-line); border-radius: var(--be-radius);
  background: var(--be-surface); overflow: hidden; display: flex; flex-direction: column;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 46px; padding: 8px 12px; border-bottom: 1px solid var(--be-line); flex-wrap: wrap;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .toolbar-left,
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .toolbar-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .selected-count { color: var(--be-muted); font-size: 12px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .table-scroll { overflow: auto; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid {
  display: table; width: 100%; table-layout: fixed;
  border-collapse: separate; border-spacing: 0;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(1) { width: 46px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(2) { width: 112px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(3) { width: 224px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(4) { width: 86px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(5) { width: 82px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(6) { width: 108px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(7) { width: 96px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(8) { width: 88px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(9) { width: 96px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(10) { width: 112px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid th,
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid td {
  height: 38px; padding: 0 10px; border-bottom: 1px solid var(--be-line-soft);
  text-align: left; vertical-align: middle; white-space: nowrap; font-size: 12px; background: #fff;
  overflow: hidden; text-overflow: ellipsis;
}

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc th:nth-child(1) { width: 38px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc th:nth-child(2) { width: 100px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc th:nth-child(3) { width: 150px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc th:nth-child(4) { width: 160px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc th:nth-child(5) { width: 100px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc th:nth-child(6) { width: 180px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc th:nth-child(7) { width: 76px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc th:nth-child(8) { width: 76px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc th:nth-child(9) { width: 76px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc th:nth-child(10) { width: 148px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid td:last-child { padding-right: 12px; }

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid th {
  position: sticky; top: 0; z-index: 2; height: 34px; background: #FAFAFA;
  color: var(--be-muted); font-size: 11px; font-weight: 600;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid tbody tr:hover td { background: #FAFAFA; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid tbody tr.is-selected td { background: #F5F5F7; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid .check-col { width: 38px; padding: 0 0 0 12px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .check { width: 14px; height: 14px; accent-color: #111; vertical-align: middle; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .name-btn {
  max-width: 260px; padding: 0; border: 0; background: transparent; font-weight: 600;
  color: var(--be-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: left; cursor: pointer; font-size: 12px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .name-btn:hover { text-decoration: underline; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .empty { height: 140px; text-align: center; color: var(--be-muted); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .row-actions { display: flex; gap: 4px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .pager {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 46px; padding: 8px 12px; border-top: 1px solid var(--be-line);
  color: var(--be-secondary); flex-wrap: wrap;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .pager-btns { display: flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- 徽标 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-unassigned { background: #F5F5F7; color: #3C3C43; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-assigned { background: #111; color: #fff; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-expiring { background: var(--be-warning-soft); color: var(--be-warning); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-expired { background: var(--be-danger-soft); color: var(--be-danger); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-voided { background: #EFEFF2; color: #8A8A8E; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-plain { background: #F5F5F7; color: var(--be-secondary); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-outline { background: #fff; color: var(--be-secondary); box-shadow: inset 0 0 0 1px var(--be-line); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-premium { background: #111; color: #fff; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-standard { background: #fff; color: var(--be-secondary); box-shadow: inset 0 0 0 1px #D8D8DC; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-warn { background: var(--be-warning-soft); color: var(--be-warning); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-info { background: var(--be-info-soft); color: var(--be-info); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag.is-review { background: var(--be-danger-soft); color: var(--be-danger); }

/* ---------------------------------------------------------------- 抽屉 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .overlay { position: fixed; inset: 0; background: rgba(17, 17, 17, 0.28); z-index: 40; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .drawer {
  position: fixed; top: 0; right: 0; width: 520px; max-width: 100%; height: 100%;
  display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--be-line);
  z-index: 41; animation: be-slide-in .18s ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px; line-height: 1.4; color: var(--be-text); text-align: left;
}
@keyframes be-slide-in { from { transform: translateX(24px); } to { transform: translateX(0); } }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--be-line); min-height: 76px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .drawer-kicker { color: var(--be-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .drawer-head h2 { margin: 2px 0 0; font-size: 19px; letter-spacing: -0.03em; font-weight: 650; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .drawer-sub { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .drawer-body { flex: 1; overflow: auto; padding: 0 20px 16px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .drawer-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 12px 20px; border-top: 1px solid var(--be-line); flex-wrap: wrap;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .block { padding: 14px 0; border-bottom: 1px solid var(--be-line); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .block:last-child { border-bottom: 0; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .block h3 {
  margin: 0 0 10px; font-size: 12px; font-weight: 650; color: var(--be-secondary);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .block h3 .hint { color: var(--be-muted); font-weight: 400; font-size: 11px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .facts div { min-width: 0; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .facts dt { color: var(--be-muted); font-size: 11px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .facts dd { margin: 2px 0 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .facts .wide { grid-column: 1 / -1; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .facts .wide dd { white-space: normal; }

/* ---------------------------------------------------------------- 时间线 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .timeline { display: flex; flex-direction: column; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-item {
  position: relative; padding: 0 0 14px 18px; border-left: 1px solid var(--be-line); margin-left: 4px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-item:last-child { border-left-color: transparent; padding-bottom: 2px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-item::before {
  content: ""; position: absolute; left: -4px; top: 3px; width: 7px; height: 7px;
  border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px #B8B8BE;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-item.is-open::before { background: #111; box-shadow: none; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-item.is-review::before { background: var(--be-danger); box-shadow: none; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-person { font-weight: 650; font-size: 13px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-note { color: var(--be-muted); font-size: 11px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-range { color: var(--be-secondary); font-size: 12px; margin-top: 3px; font-variant-numeric: tabular-nums; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; align-items: center; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-edit {
  border: 0; background: transparent; color: var(--be-muted); font-size: 11px;
  text-decoration: underline; padding: 0; cursor: pointer;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tl-edit:hover { color: var(--be-text); }

/* ---------------------------------------------------------------- 审计 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .audit-item {
  display: flex; flex-direction: column; gap: 3px; padding: 9px 0;
  border-bottom: 1px solid var(--be-line-soft);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .audit-item:last-child { border-bottom: 0; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .audit-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .audit-action { font-size: 12px; font-weight: 650; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .audit-time { color: var(--be-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .audit-reason { color: var(--be-secondary); font-size: 12px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .audit-diff { color: var(--be-muted); font-size: 11px; word-break: break-all; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .audit-diff b { color: var(--be-secondary); font-weight: 600; }

/* ---------------------------------------------------------------- 弹窗 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  padding: 20px; background: rgba(17, 17, 17, 0.36);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal-card {
  /* 默认 min-width:auto 会被内部表格撑到视口外；改为 0 后窄屏由表格容器自身横向滚动 */
  min-width: 0;
  width: min(520px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  border-radius: 12px; background: #fff; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.16);
  animation: be-pop .16s ease; text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px; line-height: 1.4; color: var(--be-text);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal-card.is-wide { width: min(680px, 100%); }
@keyframes be-pop { from { transform: translateY(6px) scale(.99); } to { transform: none; } }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal-head { padding: 18px 20px 0; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal-head h2 { margin: 0; font-size: 17px; letter-spacing: -0.02em; font-weight: 650; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal-head p { margin: 4px 0 0; color: var(--be-muted); font-size: 12px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal-body { padding: 16px 20px 4px; overflow: auto; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 14px 20px 18px; flex-wrap: wrap;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .form-grid .span2 { grid-column: 1 / -1; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .radio-card {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  border: 1px solid var(--be-line); border-radius: 8px; cursor: pointer; background: #fff;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .radio-card input { position: absolute; opacity: 0; pointer-events: none; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .radio-card b { font-size: 13px; font-weight: 650; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .radio-card span { color: var(--be-muted); font-size: 11px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .radio-card.is-on { border-color: #111; box-shadow: inset 0 0 0 1px #111; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .confirm-dl { margin: 4px 0 0; border-top: 1px solid var(--be-line); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .confirm-dl div {
  display: flex; justify-content: space-between; gap: 16px; padding: 9px 0;
  border-bottom: 1px solid var(--be-line); font-size: 12px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .confirm-dl dt { color: var(--be-muted); }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .confirm-dl dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal-copy { color: var(--be-secondary); font-size: 13px; line-height: 1.55; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal-rule { margin-top: 8px; color: var(--be-muted); font-size: 11px; line-height: 1.5; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--be-line);
  border-radius: 6px;
  background: #FAFAFA;
  font-size: 12px;
  color: var(--be-secondary);
  cursor: pointer;
  user-select: none;
  margin: 0;
  transition: border-color .15s ease, background .15s ease;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .checkline:hover {
  border-color: #C0C0C0;
  background: #F5F5F5;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .checkline input[type="checkbox"],
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .checkline input {
  width: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  height: 15px !important;
  min-height: 15px !important;
  max-height: 15px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 15px !important;
  accent-color: #111;
  cursor: pointer;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .checkline span {
  line-height: 1.3;
}

/* ---------------------------------------------------------------- BOSS 账号搜索下拉选择器 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-combobox {
  position: relative;
  width: 100%;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-search-input {
  width: 100%;
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--be-line);
  border-radius: 8px;
  background: #fff;
  color: var(--be-text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-search-input:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  color: var(--be-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-clear-btn:hover {
  color: var(--be-text);
  background: rgba(0, 0, 0, 0.06) !important;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--be-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  padding: 4px;
  box-sizing: border-box;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--be-text);
  gap: 8px;
  user-select: none;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-option:hover,
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-option.is-focused {
  background: #F4F4F5;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-option.is-selected {
  background: #ECECF0;
  font-weight: 600;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-option-name {
  font-weight: 600;
  color: var(--be-text);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-option-id {
  font-size: 11px;
  color: var(--be-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-acc-empty {
  padding: 12px 10px;
  text-align: center;
  color: var(--be-muted);
  font-size: 12px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .err { color: var(--be-danger); font-size: 12px; margin-top: 8px; }

/* ---------------------------------------------------------------- 浮层提示 */
#bossEntToastRoot.toast-root {
  position: fixed; bottom: 24px; right: 24px; z-index: 60;
  display: flex; flex-direction: column; gap: 8px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .toast {
  max-width: 340px; padding: 10px 12px; border: 1px solid var(--be-line); border-radius: 8px;
  background: #111; color: #fff; font-size: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  animation: be-toast-in .16s ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .toast.is-err { background: var(--be-danger); border-color: var(--be-danger); }
@keyframes be-toast-in { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- 空状态 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .denied { display: grid; place-items: center; padding: 40px 24px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .denied-card { max-width: 420px; text-align: center; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .denied-card h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .denied-card p { margin-top: 8px; color: var(--be-muted); font-size: 13px; line-height: 1.6; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .skeleton {
  height: 14px; border-radius: 4px;
  background: linear-gradient(90deg, #F2F2F5 25%, #FAFAFB 50%, #F2F2F5 75%);
  background-size: 200% 100%; animation: be-shimmer 1.2s infinite;
}
@keyframes be-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) :focus-visible { outline: 2px solid #111; outline-offset: 2px; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1100px) {
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filter-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .boss-ent-view { padding: 12px 12px 24px; }
  .boss-ent-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .boss-ent-head-actions { justify-content: space-between; }
  .boss-ent-heading h1 { font-size: 18px; }
  .boss-ent-tabs { overflow-x: auto; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi { min-height: 56px; padding: 8px 10px; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi strong { font-size: 18px; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi span { font-size: 11px; white-space: normal; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .type-row { grid-template-columns: 1fr; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filter-grid { grid-template-columns: 1fr 1fr; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .control { height: 38px; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid:not(.grid-group) th:nth-child(2),
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid:not(.grid-group) td:nth-child(2) { display: none; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .drawer { width: 100%; border-left: 0; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .facts { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .form-grid { grid-template-columns: 1fr; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .radio-cards { grid-template-columns: 1fr; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal { padding: 10px; }
  #bossEntToastRoot.toast-root { left: 12px; right: 12px; }
  :is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .toast { max-width: none; }
}

/* 侧栏图标：与后台其它导航项使用同一套 ::before 字形 */
#bossEntitlementNav::before { content: "◈" !important; margin-right: 7px; }

/* ==========================================================================
   对齐 2026-10 生产 Apple × X 外壳：页面底 #EEF2F6、卡片 14px 圆角 + 柔和投影
   仅在模块作用域内生效，不改动后台既有规则。
   ========================================================================== */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) {
  --be-line: #E8EEF5;
  --be-line-soft: #EFF3F8;
  --be-radius: 14px;
  --be-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.boss-ent-view {
  padding: 2px 0 10px;
  background: transparent;
  font-size: 13.5px;
}

.boss-ent-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid #E8EEF5;
  flex-wrap: wrap;
}
.boss-ent-tabs { margin-bottom: 0; border-bottom: 0; gap: 4px; }
.boss-ent-tab { height: 30px; padding: 0 10px; font-size: 13.5px; border-radius: 8px; margin-bottom: 0; }
.boss-ent-tab.is-on { border-bottom-color: transparent; background: #F5F5F7; }
.boss-ent-head-actions { display: flex; align-items: center; gap: 8px; }

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-ent-btn {
  height: 32px;
  border-radius: 10px;
  font-size: 13px;
}

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi,
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .type-card,
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .panel,
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .table-panel,
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filters {
  border: 1px solid #E8EEF5;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi { min-height: 66px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .kpi strong { font-size: 23px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .panel-head { border-bottom-color: #E8EEF5; }

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn {
  border-radius: 10px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .control {
  border-radius: 10px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .chip.is-on { background: #111; }

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid th,
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid td { font-size: 12.5px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid th {
  background: #FAFBFC;
  border-bottom-color: #E8EEF5;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(2) { width: 124px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent th:nth-child(3) { width: 218px; }

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .tag { font-weight: 600; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .drawer { border-radius: 14px 0 0 14px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .modal-card { border-radius: 16px; }

/* 只有权益列表 / 账号表使用固定列宽；总览里的「即将到期」表按内容自适应 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid { table-layout: auto; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-ent,
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-acc { table-layout: fixed; }

/* 新外壳底色偏浅，按钮/输入框边框加深一档，保证可辨识 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn { border-color: #DCE3EC; }
/* 只给中性按钮使用浅色 hover；主/危险/quiet 保留各自既有 hover，disabled 不参与 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot)
  .btn:not(.btn-primary):not(.btn-danger):not(.btn-quiet):not(:disabled):hover { background: #F7F9FC; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-primary { border-color: #111; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-danger { border-color: #E7B4B0; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .boss-ent-btn { border-color: #DCE3EC; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .control { border-color: #DCE3EC; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filters { padding: 12px 14px; gap: 8px; }

/* 筛选区压成一行：左侧状态胶囊，右侧「更多筛选 / 清空」，高级筛选整行展开 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filters {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  row-gap: 8px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filters > .filter-row:nth-child(2) { flex: 0 0 auto; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filters > .filter-grid { flex: 1 1 100%; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filters > .filter-row { width: auto; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filters > .filter-row:first-child { flex: 1 1 auto; min-width: 0; }

/* ==========================================================================
   统一日期/时间选择器（Apple × X）
   面板挂 body，固定定位，不受弹窗 overflow / 遮罩裁切。
   ========================================================================== */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .be-dp {
  position: relative;
  display: block;
  width: 100%;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .be-dp .be-dp-text {
  padding-right: 34px;
  cursor: pointer;
  background: #fff;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .be-dp .be-dp-text:disabled {
  background: #FAFAFA;
  cursor: default;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .be-dp-trigger {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  line-height: 1;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6E6E73;
  cursor: pointer;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .be-dp-trigger:hover { background: #F5F5F7; color: #111; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .be-dp-trigger:focus-visible { outline: 2px solid #111; outline-offset: 1px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .be-dp-trigger:disabled { color: #C7C7CC; cursor: default; background: transparent; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .be-dp-trigger svg {
  width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .be-dp.is-open .be-dp-text {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

#beDatePanel {
  position: fixed;
  z-index: 120;
  width: 292px;
  padding: 12px;
  border: 1px solid #E8EEF5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  color: #111;
  user-select: none;
}
#beDatePanel[hidden] { display: none !important; }

#beDatePanel .be-dp-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
#beDatePanel .be-dp-selects { display: flex; gap: 6px; flex: 1; min-width: 0; }
#beDatePanel .be-dp-selects select {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 6px;
  border: 1px solid #DCE3EC;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 12.5px;
  font-family: inherit;
}
#beDatePanel .be-dp-nav {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid #DCE3EC;
  border-radius: 8px;
  background: #fff;
  color: #3C3C43;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 30px;
}
#beDatePanel .be-dp-nav:hover { background: #F5F5F7; color: #111; }

#beDatePanel .be-dp-week,
#beDatePanel .be-dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
#beDatePanel .be-dp-week span {
  height: 24px;
  display: grid;
  place-items: center;
  color: #8A8A8E;
  font-size: 11px;
}
#beDatePanel .be-dp-day {
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #111;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
#beDatePanel .be-dp-day:hover { background: #F5F5F7; }
#beDatePanel .be-dp-day.is-outside { color: #C7C7CC; }
#beDatePanel .be-dp-day.is-today { box-shadow: inset 0 0 0 1px #C7C7CC; }
#beDatePanel .be-dp-day.is-selected,
#beDatePanel .be-dp-day.is-selected:hover {
  background: #111;
  color: #fff;
  box-shadow: none;
  font-weight: 600;
}
#beDatePanel .be-dp-day:focus-visible { outline: 2px solid #111; outline-offset: 1px; }

#beDatePanel .be-dp-time {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #EFF3F8;
}
#beDatePanel .be-dp-time[hidden] { display: none !important; }
#beDatePanel .be-dp-time-label { color: #6E6E73; font-size: 11px; margin-right: 2px; }
#beDatePanel .be-dp-time i { color: #8A8A8E; font-style: normal; }
#beDatePanel .be-dp-t {
  width: 46px;
  height: 28px;
  padding: 0 4px;
  border: 1px solid #DCE3EC;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  font-family: inherit;
}
#beDatePanel .be-dp-t::-webkit-outer-spin-button,
#beDatePanel .be-dp-t::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

#beDatePanel .be-dp-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #EFF3F8;
}
#beDatePanel .be-dp-foot-spacer { flex: 1; }
#beDatePanel .be-dp-link {
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #111;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
#beDatePanel .be-dp-link:hover { background: #F5F5F7; }
#beDatePanel .be-dp-link.is-muted { color: #6E6E73; }
#beDatePanel .be-dp-link.is-strong { background: #111; color: #fff; }
#beDatePanel .be-dp-link.is-strong:hover { background: #000; }

/* 面板内按钮不受后台全局 button 规则影响（padding/min-height/display） */
#beDatePanel button {
  padding: 0;
  min-height: 0;
  min-width: 0;
  font-family: inherit;
  box-shadow: none;
  border: 0;
  background: transparent;
}
#beDatePanel [hidden] { display: none !important; }
#beDatePanel .be-dp-grid { grid-auto-rows: 32px; }
#beDatePanel .be-dp-day {
  display: grid;
  place-items: center;
  width: 100%;
  height: 32px;
  padding: 0;
  border-radius: 9px;
}
#beDatePanel .be-dp-nav {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #DCE3EC;
  border-radius: 8px;
  background: #fff;
}
#beDatePanel .be-dp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 7px;
}
#beDatePanel .be-dp-link.is-strong { background: #111; color: #fff; }
#beDatePanel .be-dp-link.is-muted { background: transparent; color: #6E6E73; }
#beDatePanel :focus-visible,
#beDatePanel .be-dp-t:focus {
  outline: 2px solid #111;
  outline-offset: 1px;
  border-color: #111;
}
#beDatePanel select:focus-visible { outline: 2px solid #111; outline-offset: 1px; }


/* admin 外壳存在 :has(#manageUsersBtn:not(.hidden)) .filters button 的高特异性规则，
   会在 admin 下把 BOSS 高级筛选按钮放大到 40px 并改成蓝色 focus。这里仅在 BOSS 作用域恢复组件设计值。 */
body.admin-visual:has(#adminApp:not(.hidden) #manageUsersBtn:not(.hidden))
  :is(#bossEntitlementView, #bossEntOverlayRoot) .filters button:not(.filter-clear) {
  min-height: 0;
  height: 32px;
  border-color: #DCE3EC;
  border-radius: 10px;
  font-size: 13px;
}
body.admin-visual:has(#adminApp:not(.hidden) #manageUsersBtn:not(.hidden))
  :is(#bossEntitlementView, #bossEntOverlayRoot) .filters button.btn-primary:not(.filter-clear) {
  border-color: #111;
}
body.admin-visual:has(#adminApp:not(.hidden) #manageUsersBtn:not(.hidden))
  :is(#bossEntitlementView, #bossEntOverlayRoot) .filters button.btn-danger:not(.filter-clear) {
  border-color: #E7B4B0;
}
body.admin-visual:has(#adminApp:not(.hidden) #manageUsersBtn:not(.hidden))
  :is(#bossEntitlementView, #bossEntOverlayRoot) .filters button.btn-sm:not(.filter-clear) {
  height: 26px;
  border-radius: 6px;
  font-size: 12px;
}
body.admin-visual:has(#adminApp:not(.hidden) #manageUsersBtn:not(.hidden))
  :is(#bossEntitlementView, #bossEntOverlayRoot) .filters button.chip:not(.filter-clear) {
  height: 28px;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
}
body.admin-visual:has(#adminApp:not(.hidden) #manageUsersBtn:not(.hidden))
  :is(#bossEntitlementView, #bossEntOverlayRoot) .filters button:is(.btn, .chip):focus-visible:not(.filter-clear) {
  outline: 2px solid #111;
  outline-offset: 1px;
  box-shadow: none;
}

/* disabled 仍保持明确的浅灰不可用视觉，只提高文字可辨认度；不恢复为可用主按钮。 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn:disabled { color: #6E6E73; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .btn-primary:disabled { color: #3C3C43; }

/* ---------------------------------------------------------------- BOSS 账号归属分组样式 */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .account-group-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 150px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .account-group-cat {
  display: inline-block;
  padding: 1px 5px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  background: var(--be-line-soft);
  color: var(--be-secondary);
  flex-shrink: 0;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .account-group-name {
  font-weight: 500;
  color: var(--be-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .account-group-filter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .filter-label {
  /* 覆盖外壳全局 label{display:grid;gap:8px;margin-bottom:16px}：否则标签被抬高 8px、整组高度变成 33px */
  display: flex;
  align-items: center;
  align-self: stretch;
  margin: 0;
  line-height: normal;
  color: var(--be-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .group-manage-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--be-line);
  margin-bottom: 14px;
  padding-bottom: 0;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .group-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--be-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .group-tab:hover {
  color: var(--be-text);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .group-tab.is-active {
  color: var(--be-text);
  border-bottom-color: var(--be-text);
  font-weight: 600;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .group-tab-count {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--be-line-soft);
  color: var(--be-secondary);
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .group-create-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .group-create-bar input {
  flex: 1;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .group-list-wrap {
  max-height: 380px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--be-line);
  border-radius: 6px;
}

:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-group {
  /* 固定布局会把操作列压到 133px，导致「重命名」左侧被裁切；auto 让操作列按按钮实际宽度伸展 */
  table-layout: auto;
  width: 100%;
  min-width: 580px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-group th:nth-child(1) { width: 95px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-group th:nth-child(2) { width: 175px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-group th:nth-child(3) { width: 95px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-group th:nth-child(4) { width: 80px; }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .grid-group th:nth-child(5) { width: 135px; }

/* 嵌套确认弹窗组件（用于停用/删除空分组安全二次确认，不覆盖/销毁底层分组管理弹窗） */
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 17, 17, 0.45);
  animation: be-fade-in .12s ease;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .confirm-card {
  width: min(440px, 100%);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
  animation: be-pop .16s ease;
  overflow: hidden;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--be-text);
}
@keyframes be-fade-in { from { opacity: 0; } to { opacity: 1; } }
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .confirm-card .modal-head {
  padding: 18px 20px 0;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .confirm-card .modal-body {
  padding: 14px 20px;
}
:is(#bossEntitlementView, #bossEntOverlayRoot, #bossEntToastRoot) .confirm-card .modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  background: #FAFBFC;
  border-top: 1px solid var(--be-line-soft);
  flex-wrap: wrap;
}

