/* +----------------------------------------------------------------------
/* | Static Plugin for ThinkAdmin
/* +----------------------------------------------------------------------
/* | 官方网站: https://thinkadmin.top
/* +----------------------------------------------------------------------
/* | 版权所有 2014~2025 ThinkAdmin [ thinkadmin.top ]
/* +----------------------------------------------------------------------
/* | 开源协议 ( https://mit-license.org )
/* | 免责声明 ( https://thinkadmin.top/disclaimer )
/* +----------------------------------------------------------------------
/* | gitee 代码仓库：https://gitee.com/zoujingli/think-plugs-static
/* | github 代码仓库：https://github.com/zoujingli/think-plugs-static
/* +----------------------------------------------------------------------
/* | 自定义后台扩展样式，需要在加载 console.css 后载入
/* | 使用 composer require zoujingli/think-plugs-static 时不会更新此文件
/* +---------------------------------------------------------------------- */

/* 暗夜红主题（可选，仅在选定 darkred-1/darkred-2 时激活） */
@import url('./dark-theme.css');

/* 系统管理 & 组织架构模块 · 暗夜红统一主题 */
@import url('./system-theme.css');

/* 客户管理模块 · V2.0 最终 UI 主题（容器级自足深色，任意主题下生效） */
@import url('./crm-client.css?v=20261016.1');

/* 通用组件库 · 表格/下拉选择框（单选、多选）组件样式（依赖 crm-client.css 变量） */
@import url('./crm-components.css?v=20261024.1');

/* 订单管理模块 · V2.0 最终 UI 主题（依赖 crm-client.css 变量与组件） */
@import url('./crm-order.css?v=20260802.1');

/* 服务管理模块 · V2.0 最终 UI 主题（依赖 crm-client.css 变量与组件） */
@import url('./crm-service.css?v=20260804.1');

/* 财务服务模块 · V2.0 最终 UI 主题（依赖 crm-client.css 变量与组件） */
@import url('./crm-finance.css?v=20260804.1');

/* 财务管理模块 · V2.0 最终 UI 主题（依赖 crm-client.css 变量与组件） */
@import url('./crm-finance-manage.css?v=20260807.1');

/* 行政管理模块 · V2.0 最终 UI 主题（依赖 crm-client.css 变量与组件） */
@import url('./crm-admin.css?v=20260805.1');

/* ThinkAdmin 标准页内容区深色兜底（app/admin 系统配置/任务/日志/菜单等框架页，模板不可改只能全局覆盖） */
@import url('./standard-page-dark.css?v=20260829.4');

/* 后台框架 · V2.0 布局覆盖（侧栏一级菜单 + 展开二级 + 深色顶栏，必须最后加载） */
@import url('./crm-frame.css?v=20261009.1');

/* ═══════════════════════════════════════════════════════
/* 深色模块分页条统一（V2.0 深色容器族）
/* 1. 隐藏「上一页/下一页」按钮（layui 默认 layout 含 prev/next，深色分页条下冗余）
/* 2. 每页条数下拉深色化（layui 原生 select 白底，与深色主题冲突）
/* ═══════════════════════════════════════════════════════ */
.order-page-container .layui-laypage .layui-laypage-prev,
.order-page-container .layui-laypage .layui-laypage-next,
.client-page-container .layui-laypage .layui-laypage-prev,
.client-page-container .layui-laypage .layui-laypage-next,
.finance-page-container .layui-laypage .layui-laypage-prev,
.finance-page-container .layui-laypage .layui-laypage-next,
.service-page-container .layui-laypage .layui-laypage-prev,
.service-page-container .layui-laypage .layui-laypage-next,
.recruit-page-container .layui-laypage .layui-laypage-prev,
.recruit-page-container .layui-laypage .layui-laypage-next,
.admin-page-container .layui-laypage .layui-laypage-prev,
.admin-page-container .layui-laypage .layui-laypage-next { display: none; }

.order-page-container .layui-laypage .layui-laypage-limits select,
.client-page-container .layui-laypage .layui-laypage-limits select,
.finance-page-container .layui-laypage .layui-laypage-limits select,
.service-page-container .layui-laypage .layui-laypage-limits select,
.recruit-page-container .layui-laypage .layui-laypage-limits select,
.admin-page-container .layui-laypage .layui-laypage-limits select {
  background: var(--bg-secondary, #161618) !important;
  border: 1px solid var(--border, #2a2a2d) !important;
  color: var(--text-primary, #e4e4e7) !important;
  color-scheme: dark;
}

/* zTree 树节点链接文字 → 纯白。
   standard-page-dark.css 的 :is(.layui-layer) a:not(.btn):not(.layui-btn) 会把弹窗内链接统一染红（优先级 0,4,1），
   原 ul.ztree li a（0,1,3）压不过，这里用表单 id 选择器（1,0,1）反超；同时保留通用规则覆盖动态注入的 zTreeStyle.css color:#333 */
ul.ztree li a,
#zTree a { color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════
 * 全局商户切换器（超级管理员数据范围切换）
 * 详见 docs/第二期相关文档/12-全局商户切换器-超级管理员数据范围.md
 *
 * 配色策略：与 ThinkAdmin 默认深色布局协调
 *   - 面板: #1a1a1d（深炭黑，与主体 #161618 区分但同色系）
 *   - 文字: #d4d4d8 主, #a1a1aa 辅
 *   - 高亮: 左侧 3px 蓝色 accent + 微亮背景（避免亮绿色抢戏）
 *   - 类型标签: 饱和度适中的深色底 + 亮色文字（深色面板内辨识度高）
 *     · 加盟商   → 紫色  #7c3aed
 *     · 直营分部 → 青色  #06b6d4
 *     · 合作商户 → 翠绿  #10b981
 * ═══════════════════════════════════════════════════════════════════════ */

/* 顶部切换按钮（嵌入 layui-nav-item 内） */
.think-merchant-switch > a {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.think-merchant-switch .tms-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
  font-size: 13px;
  color: #fff;
}
.think-merchant-switch .tms-name--all {
  color: #60a5fa;
  font-weight: 600;
}
.think-merchant-switch .tms-caret {
  font-size: 12px !important;
  transition: transform .2s;
}
.think-merchant-switch.open .tms-caret { transform: rotate(180deg); }
.think-merchant-switch.loading > a { opacity: .55; pointer-events: none; }

/* 下拉面板（深色，与后台布局一致） */
.think-merchant-switch .tms-panel {
  display: none;
  position: absolute;
  top: 60px;
  right: 0;
  width: 360px;
  background: #1f1f23;
  border: 1px solid #2e2e33;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02);
  z-index: 9999;
  overflow: hidden;
}
.think-merchant-switch.open .tms-panel { display: block; }

/* 搜索框区 */
.think-merchant-switch .tms-search-wrap {
  padding: 10px 12px;
  border-bottom: 1px solid #2e2e33;
  background: #18181b;
}
.think-merchant-switch .tms-search {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  background: #0f0f11;
  border: 1px solid #2e2e33;
  border-radius: 6px;
  font-size: 13px;
  color: #e4e4e7;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.think-merchant-switch .tms-search::placeholder { color: #71717a; }
.think-merchant-switch .tms-search:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .15);
}

/* 列表区 */
.think-merchant-switch .tms-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 4px 0;
}
.think-merchant-switch .tms-list::-webkit-scrollbar { width: 6px; }
.think-merchant-switch .tms-list::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }
.think-merchant-switch .tms-list::-webkit-scrollbar-track { background: transparent; }

/* 分组标题 */
.think-merchant-switch .tms-group-title {
  padding: 10px 14px 4px;
  font-size: 11px;
  color: #71717a;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* 列表项（核心：左侧色条 + 高亮克制） */
.think-merchant-switch .tms-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px 9px 12px;
  margin: 1px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #d4d4d8;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.think-merchant-switch .tms-item:hover {
  background: rgba(255, 255, 255, .04);
  color: #fff;
}
.think-merchant-switch .tms-item.active {
  background: rgba(59, 130, 246, .12);
  color: #fff;
  font-weight: 600;
  border-left-color: #3b82f6;
}
.think-merchant-switch .tms-item.active .ti-count { color: #93c5fd; }

/* 全部商户（特殊行：顶部 + 分割线 + 蓝色 accent） */
.think-merchant-switch .tms-item--all {
  margin: 6px 6px 4px;
  border-left: 3px solid transparent;
}
.think-merchant-switch .tms-item--all:hover {
  background: rgba(96, 165, 250, .08);
  border-left-color: #60a5fa;
}
.think-merchant-switch .tms-item--all.active {
  background: rgba(96, 165, 250, .12);
  border-left-color: #60a5fa;
}

/* 文字 */
.think-merchant-switch .ti-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.think-merchant-switch .ti-count {
  flex-shrink: 0;
  font-size: 11px;
  color: #71717a;
  font-weight: 400;
}

/* 类型标签（核心：饱和度适中的实心色块） */
.think-merchant-switch .ti-type {
  flex-shrink: 0;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1.4;
}
.think-merchant-switch .ti-type--1 {
  background: rgba(124, 58, 237, .18);
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, .35);
}
.think-merchant-switch .ti-type--2 {
  background: rgba(6, 182, 212, .18);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, .35);
}
.think-merchant-switch .ti-type--3 {
  background: rgba(16, 185, 129, .18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, .35);
}

/* 空态 */
.think-merchant-switch .tms-empty {
  padding: 30px 12px;
  text-align: center;
  font-size: 12px;
  color: #71717a;
}
.think-merchant-switch .tms-empty strong { color: #d4d4d8; }

/* 底部提示 */
.think-merchant-switch .tms-foot {
  padding: 8px 14px;
  font-size: 11px;
  color: #71717a;
  border-top: 1px solid #2e2e33;
  background: #18181b;
}

/* 数据范围提示条（深色主题适配版本） */
.think-scope-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 12px 0;
  padding: 9px 14px;
  background: linear-gradient(90deg, rgba(59, 130, 246, .14) 0%, rgba(59, 130, 246, .02) 70%);
  border: 1px solid rgba(59, 130, 246, .35);
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  font-size: 13px;
  color: #d4d4d8;
  flex-wrap: wrap;
}
.think-scope-banner .layui-icon { color: #60a5fa; font-size: 14px; }
.think-scope-banner .tsb-label { color: #a1a1aa; }
.think-scope-banner .tsb-name { font-size: 14px; color: #fff; font-weight: 600; }
.think-scope-banner .tsb-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(59, 130, 246, .25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, .45);
  font-weight: 600;
  letter-spacing: .3px;
}
.think-scope-banner--all {
  background: linear-gradient(90deg, rgba(255, 255, 255, .04) 0%, rgba(255, 255, 255, .01) 70%);
  border-color: #2e2e33;
  border-left-color: #52525b;
  color: #a1a1aa;
}
.think-scope-banner--all .layui-icon,
.think-scope-banner--all .tsb-name { color: #d4d4d8; }
.think-scope-banner--all .tsb-tag {
  background: rgba(255, 255, 255, .08);
  color: #d4d4d8;
  border-color: #3f3f46;
}
.think-scope-banner .tsb-hint {
  margin-left: auto;
  font-size: 11px;
  color: #71717a;
}
.think-scope-banner .tsb-clear {
  font-size: 11px;
  color: #93c5fd;
  text-decoration: none;
  margin-left: 6px;
}
.think-scope-banner .tsb-clear:hover { text-decoration: underline; color: #fff; }
