/* CRMX-BRAND-PATCH v2 —— 稳定注入版（不依赖构建 hash）
   桌面：侧边栏品牌位显示大会理网 logo（隐藏「云微 / 平台管理中心」文字）
   手机：顶栏汉堡按钮右侧显示 logo；抽屉内品牌块隐藏，标题放大 */

/* 主内容区（右侧）底色提亮：主题层 .theme-classic-green 原为 #e4e7ea（偏深灰）
   → 纯白 #ffffff。卡片自带 1px #dfe3e8 描边 + 轻投影，去掉底色后仍能分层 */
html, body { background: #ffffff !important; }
.app.theme-classic-green { background: #ffffff !important; }
.main, .content { background: transparent; }
.brand.brand-patched > i,
.brand.brand-patched > div { display: none; }
.brand .brand-logo {
  display: block; width: auto; max-width: 172px; max-height: 40px;
  object-fit: contain; border-radius: 4px;
}
.topbar-logo { display: none; flex: none; width: auto; object-fit: contain; }
/* 侧边栏「平台空间」标签隐藏（切到租户空间仍显示租户名） */
.sidebar .space-label.space-label-hidden { display: none !important; }
.sidebar nav { padding-top: 16px; }
.topbar-title { font-size: 17px; font-weight: 700; color: #20343d; letter-spacing: .2px; }
.topbar-title .muted { font-size: 15px; font-weight: 600; }

@media (max-width: 760px) {
  /* 顶栏：汉堡 + logo + 主题下拉 + 导出/改密/退出 全部单行 */
  .topbar {
    flex-wrap: nowrap !important; height: 62px !important; min-height: 62px !important;
    gap: 6px !important; padding: 8px 10px !important;
  }
  .topbar-heading { flex: none !important; gap: 8px !important; min-width: 0; }
  /* 汉堡按钮外框收紧：42px → 33px（与「色调」下拉同高），三横线加粗 */
  .topbar .sidebar-toggle {
    width: 33px !important; height: 33px !important; padding: 0 !important;
    border-radius: 6px !important;
  }
  .topbar .sidebar-toggle svg { stroke-width: 2.8 !important; }
  .topbar .topbar-logo {
    display: block; max-width: min(237px, calc(100vw - 191px));
    max-height: 34px; height: auto; margin-left: 2px;
  }
  .topbar-title { display: none; }
  .sidebar .brand { display: none; }
  .top-actions { flex-wrap: nowrap !important; gap: 5px !important; margin-left: auto; }
  .top-actions .theme-switch { width: 48px; padding: 7px 1px; font-size: 11.5px; }
  .top-actions button { padding: 7px 8px; font-size: 12px; white-space: nowrap; }
  .top-actions .ghost { padding: 7px 4px; }
}

/* CRMX-BRAND-PATCH v4 —— 登录页图片 logo（透明 PNG 503x164，直接引用用户给的 OSS 绝对地址） */
.login-story .brand.brand-image-only > i,
.login-story .brand.brand-image-only > b { display: none !important; }
.login-story .brand .login-brand-logo {
  display: block; width: 250px; max-width: 100%; height: auto;
  object-fit: contain; background: transparent;
}
@media (max-width: 760px) {
  /* 手机端：品牌 logo 居中并缩小 */
  .login-story .brand { justify-content: center; }
  .login-story .brand .login-brand-logo { width: 160px; max-width: calc(100vw - 50px); }
}

/* CRMX-BRAND-PATCH v5 — 手机端登录页整块下移 100px（30px → 130px padding-top） */
@media (max-width: 760px) {
  .login { padding-top: 130px !important; }
}

/* CRMX-BRAND-PATCH v6 — 手机端「默认头像库」一行 4 个头像（桌面仍为 auto-fill） */
@media (max-width: 760px) {
  .ops-ava-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 12px 12px 16px !important;
  }
  .ops-ava-grid > :not(.ops-ava) { grid-column: 1 / -1 !important; }
  .ops-ava {
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 5px !important;
    min-width: 0 !important;
    border-radius: 9px !important;
    text-align: center !important;
  }
  .ops-ava > div { width: 100% !important; min-width: 0 !important; }
  .ops-ava img {
    width: 100% !important;
    max-width: 84px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 auto !important;
  }
  .ops-ava b {
    font-size: 11px !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  .ops-ava small {
    font-size: 9.5px !important;
    line-height: 1.35 !important;
    margin-top: 2px !important;
    overflow-wrap: anywhere !important;
  }
  .ops-ava-act { gap: 4px !important; width: 100% !important; }
  .ops-ava-act button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 4px 1px !important;
    font-size: 10.5px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
  }
}
/* CRMX-BRAND-PATCH v7 BEGIN */
/* 手机端「默认头像库」卡片内边距 25px → 0px（v8 由内层统一控制四边留白） */
@media (max-width: 760px) {
  .panel.ops-panel { padding: 0px !important; }
  /* 卡片变宽后固定表单换行，保持「两个文本框各一行 + 排序框与按钮同行」 */
  .ops-inline input:not([type="number"]) { flex: 1 1 100% !important; min-width: 0 !important; }
}
/* CRMX-BRAND-PATCH v7 END */
/* CRMX-BRAND-PATCH v8 BEGIN */
/* 手机端「默认头像库」白卡片边框到内容四边统一 10px：panel padding 0 + 1px 边框 + 内层 9px */
@media (max-width: 760px) {
  .panel.ops-panel .ops-head { padding: 9px 9px 12px !important; }
  .panel.ops-panel .ops-inline { padding: 9px 9px 4px !important; }
  .panel.ops-panel .ops-ava-grid { padding: 9px !important; }
}
/* CRMX-BRAND-PATCH v8 END */
