/**
 * 后台全局自定义样式（内容 iframe 也会加载）
 * 主题观感（胶囊按钮/苹果侧栏）在 backend-theme-apple.css，由皮肤切换加载
 * 此处仅保留与主题无关的修复 + 顶栏皮肤下拉（与 jxc 图示一致）
 */

/* ========== 顶栏皮肤切换下拉（官方/苹果）——浅底蓝字+右侧勾 ========== */
#ui-theme-switch > a {
  color: #333 !important;
}
#ui-theme-menu.dropdown-menu {
  min-width: 118px;
  padding: 4px 0;
  margin-top: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  background: #fff;
}
#ui-theme-menu > li > a {
  position: relative;
  padding: 8px 36px 8px 16px !important;
  color: #333 !important;
  background: transparent !important;
  background-image: none !important;
  font-size: 13px;
  line-height: 1.4;
}
#ui-theme-menu > li > a:hover,
#ui-theme-menu > li > a:focus {
  color: #333 !important;
  background: #f5f7fa !important;
  background-image: none !important;
}
#ui-theme-menu > li.active > a,
#ui-theme-menu > li.active > a:hover,
#ui-theme-menu > li.active > a:focus,
#ui-theme-menu > li.active > a:active {
  color: #3c8dbc !important;
  background: #e8f4fc !important;
  background-image: none !important;
  font-weight: 500;
}
#ui-theme-menu > li.active > a::after {
  content: "\f00c";
  font-family: FontAwesome;
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: -7px;
  font-size: 13px;
  color: #3c8dbc;
  font-weight: normal;
}

/* ========== 全站列表视口锁定（搜索/工具栏/分页固定，仅表体滚动） ========== */
/* 锁死外层滚动；含 fa-list / myitems / rfq / purchase 等变体 */
html.fa-list-html-lock,
html.fa-list-html-lock body,
body.fa-list-sticky-body.fa-list-viewport-lock,
body.myitems-sticky-body.myitems-viewport-lock,
body.rfq-itemlist-sticky-body.rfq-itemlist-viewport-lock,
body.purchase-sticky-body.fa-list-viewport-lock {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100% !important;
  overscroll-behavior: none;
  scrollbar-width: none;
}
body.fa-list-sticky-body.fa-list-viewport-lock #main,
body.fa-list-sticky-body.fa-list-viewport-lock .tab-content.tab-addtabs,
body.fa-list-sticky-body.fa-list-viewport-lock #content,
body.fa-list-sticky-body.fa-list-viewport-lock .row,
body.fa-list-sticky-body.fa-list-viewport-lock [class*="col-"],
body.fa-list-sticky-body.fa-list-viewport-lock .widget-body,
body.fa-list-sticky-body.fa-list-viewport-lock .bootstrap-table,
body.myitems-sticky-body.myitems-viewport-lock #main,
body.rfq-itemlist-sticky-body.rfq-itemlist-viewport-lock #main {
  overflow: hidden !important;
  max-height: 100%;
}
body.fa-list-sticky-body .content,
body.myitems-sticky-body .content,
body.rfq-itemlist-sticky-body .content,
body.purchase-sticky-body .content,
.content:has(.fa-list-sticky-page),
.content:has(.myitems-sticky-page),
.content:has(.rfq-itemlist-sticky-page),
.content:has(.purchase-sticky-page) {
  padding: 0 !important;
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100% !important;
}
/* 隐藏页面级纵向滚动条 */
html.fa-list-html-lock::-webkit-scrollbar,
body.fa-list-sticky-body.fa-list-viewport-lock::-webkit-scrollbar,
body.myitems-sticky-body.myitems-viewport-lock::-webkit-scrollbar,
body.rfq-itemlist-sticky-body.rfq-itemlist-viewport-lock::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/*
 * 关键因：主表 .fixed-table-body 与右侧固定列 .fixed-columns-right .fixed-table-body
 * 各有一条纵向滚动条。固定列只同步滚动，不显示自己的滚动条。
 */
.bootstrap-table .fixed-columns .fixed-table-body,
.bootstrap-table .fixed-columns-right .fixed-table-body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge legacy */
}
.bootstrap-table .fixed-columns .fixed-table-body::-webkit-scrollbar,
.bootstrap-table .fixed-columns-right .fixed-table-body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}
.panel.fa-list-sticky-page,
.panel-intro.fa-list-sticky-page {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
}
.panel.fa-list-sticky-page > .panel-heading,
.panel-intro.fa-list-sticky-page > .panel-heading {
  flex: 0 0 auto;
  position: relative;
  z-index: 40;
  margin: 0 !important;
  border-radius: 0 !important;
  background: #f5f5f5;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
.panel.fa-list-sticky-page > .panel-body,
.panel-intro.fa-list-sticky-page > .panel-body,
.panel.fa-list-sticky-page .tab-content,
.panel-intro.fa-list-sticky-page .tab-content,
.panel.fa-list-sticky-page .tab-pane.active,
.panel-intro.fa-list-sticky-page .tab-pane.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden !important;
}
.panel.fa-list-sticky-page > .panel-body,
.panel-intro.fa-list-sticky-page > .panel-body {
  padding: 8px 10px 4px !important;
}
.fa-list-table-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden !important;
}
.fa-list-table-wrap > .bootstrap-table {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.fa-list-table-wrap .commonsearch-table,
.fa-list-table-wrap .fixed-table-toolbar,
.fa-list-table-wrap .fixed-table-pagination {
  flex: 0 0 auto;
}
.fa-list-table-wrap .commonsearch-table {
  margin-top: 2px;
  margin-bottom: 8px;
  padding: 12px 12px 6px;
  border: 1px solid #e8ecef;
  border-radius: 4px;
  background: #fafbfc;
}
.fa-list-table-wrap .commonsearch-table.hidden {
  display: none !important;
}
.fa-list-table-wrap .fixed-table-toolbar {
  margin-top: 0 !important;
  margin-bottom: 4px !important;
  background: #fff;
}
.fa-list-table-wrap .fixed-table-container {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  padding-bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.fa-list-table-wrap .fixed-table-header {
  flex: 0 0 auto !important;
}
.fa-list-table-wrap .fixed-table-body {
  flex: 1 1 auto !important;
  min-height: 120px !important;
  overflow: auto !important;
  scrollbar-width: auto !important;
}
.fa-list-table-wrap .fixed-table-body::-webkit-scrollbar {
  width: 14px !important;
  height: 14px !important;
}
.fa-list-table-wrap .fixed-table-body::-webkit-scrollbar-thumb {
  background: #b0b0b0;
  border-radius: 6px;
  border: 2px solid #f0f0f0;
}
.fa-list-table-wrap .fixed-table-body::-webkit-scrollbar-track {
  background: #f0f0f0;
}
/* 表体内滚动时表头吸顶 */
.fa-list-table-wrap .fixed-table-body > table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #f5f5f5 !important;
}
.fa-list-table-wrap .fixed-table-pagination {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 6px 8px !important;
  margin: 0 !important;
  z-index: 5;
}

/* ========== 侧栏：站点名去底线 + Admin/在线强制提亮（不依赖皮肤/主题） ========== */
.main-header .logo,
.main-header .logo:hover,
.main-header .logo:focus,
.main-header .logo:active {
  text-decoration: none !important;
  border-bottom: 0 none !important;
  box-shadow: none !important;
  outline: none !important;
}
.main-header .logo .logo-lg,
.main-header .logo .logo-mini {
  text-decoration: none !important;
  border: 0 none !important;
  box-shadow: none !important;
}
.main-sidebar .user-panel.user-panel-simple {
  margin: 8px 10px 14px;
  padding: 0;
  overflow: visible;
  background: transparent;
}
.main-sidebar .user-panel.user-panel-simple .user-panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px 8px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.main-sidebar .user-panel.user-panel-simple .user-panel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.main-sidebar .user-panel.user-panel-simple .user-panel-avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}
.main-sidebar .user-panel.user-panel-simple .user-panel-name {
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main-sidebar .user-panel.user-panel-simple .user-panel-online {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(48, 209, 88, 0.14);
  border: 1px solid rgba(48, 209, 88, 0.28);
  color: #86efac !important;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.main-sidebar .user-panel.user-panel-simple .user-panel-online em {
  font-style: normal;
}
.main-sidebar .user-panel.user-panel-simple .user-panel-online .fa-circle,
.main-sidebar .user-panel.user-panel-simple .user-panel-online .text-success {
  color: #30d158 !important;
  font-size: 8px;
  text-shadow: 0 0 6px rgba(48, 209, 88, 0.55);
}
