/* ═══════════════════════════════════════════════════════════════════════════
   【给谁】★★★ 给执行 AI（不要整份复制给别的 AI）★★★
          给伟：侧栏品牌区修复的样式覆盖层，配套 03-zhc-brand-fix.js。
   ═══════════════════════════════════════════════════════════════════════════

   zhc-brand-fix.css — 侧栏品牌区：居中 + 徽标化

   解决三件事：
     1. 贴左    → justify-content:center（原来只写了 display:flex，没写对齐）
     2. 过大/糊  → 不再缩放"整幅图"，改为按像素坐标从原图里取出图形做 32×32 徽标
     3. 文字不可读 → 中文交给 HTML 渲染 14px，不再依赖图片里被缩到 5px 的小字

   两种模式（由 03-*.js 给 .admin-logo 挂 class 决定）：
     .zhc-bf-full  整幅模式（兜底：算不出图形边界时，整幅图等比居中，绝不裁坏）
     .zhc-bf-ico   徽标模式（算出边界时：32×32 徽标 + HTML 两行文字）

   尺寸：品牌区 58px / 徽标 48×48（2026-10-28 21:20 由 42px/32px 上调，与平台后台 40px 档拉开层级）
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── ① 容器：居中（这一行就是"不居中"的根因修复）──────────────────────── */
.admin-logo {
  height: 58px !important;
  min-height: 58px !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  overflow: hidden !important;
}

.admin-logo > img {
  display: block !important;
  flex: 0 0 auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* ── ② 整幅模式（兜底）────────────────────────────────────────────────── */
.admin-logo.zhc-bf-full > img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 40px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ── ③ 徽标模式 ──────────────────────────────────────────────────────── */
/* 原 <img> 隐藏，改由 .zhc-bf-badge 用 background 精确取图形区 */
.admin-logo.zhc-bf-ico > img {
  display: none !important;
}

/* 降级态的方块图标与文字（🛍 + 商户后台）在徽标模式下必须让位，否则并排出现两个 */
.admin-logo.zhc-bf-on > .logo-mark,
.admin-logo.zhc-bf-on > span:not(.zhc-bf-badge),
.admin-logo.zhc-bf-on > b,
.admin-logo.zhc-bf-on > i:not(.zhc-bf-badge),
.admin-logo.zhc-bf-on > div:not(.zhc-bf-tx) {
  display: none !important;
}

.zhc-bf-badge {
  display: block !important;
  flex: 0 0 48px !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 13px !important;
  background-color: #fff !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .10), 0 2px 6px rgba(15, 23, 42, .08);
  overflow: hidden !important;
}

/* 深色主题：白底徽标给一点柔和描边，不再是一整块生硬的白 */
html[data-theme="m"] .zhc-bf-badge,
html[data-theme="n"] .zhc-bf-badge,
html[data-theme="dark"] .zhc-bf-badge {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 2px 8px rgba(0, 0, 0, .35);
}

/* 文字块 */
.zhc-bf-tx {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 3px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
.zhc-bf-tx b {
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: .4px !important;
  color: var(--text, #16181C) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-family: inherit !important;
}
.zhc-bf-tx span {
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 1.8px !important;
  color: var(--text-3, #9CA3AF) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-family: inherit !important;
}
.zhc-bf-tx.zhc-bf-1line {
  gap: 0 !important;
}
