.ai-maintain-banner {
  width: 100%;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.ai-maintain-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  gap: 0.25rem;
}

.ai-maintain-banner #ai_maintain_banner_text {
  word-break: break-word;
}

@media (max-width: 576px) {
  .ai-maintain-banner {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
  }
}

.bi-brightness-high:hover {
  background-color: #ffc107 !important;
  opacity: 75%;
}

.bi-moon:hover {
  background-color: #0d6efd !important;
  opacity: 75%;
}

.bi-type-h5:hover {
  background-color: #6c757d !important;
  opacity: 75%;
}

.bi-type-h6:hover {
  background-color: #6c757d !important;
  opacity: 75%;
}


.btn-close:hover {
  background-color: #e9ecef;
  --bs-text-opacity: 50%;
}

.dropdown-toggle {
  outline: 0;
}

/* 头像下拉需盖过横向二级菜单（#div_horizontal_menu z-index:1040） */
.header-profile-dropdown {
  position: relative;
  z-index: 1060;
}

.header-profile-dropdown .dropdown-menu {
  z-index: 1060;
}

/* 快捷菜单打开时，遮罩需盖住二级菜单/头像下拉，避免仍可点击 */
.offcanvas-backdrop {
  z-index: 1090;
}

.offcanvas {
  z-index: 1100;
}

.btn-toggle {
  padding: .25rem .5rem;
  font-weight: 600;
  color: var(--bs-emphasis-color);
  background-color: transparent;
}

.btn-toggle:hover,
.btn-toggle:focus {
  color: rgba(var(--bs-emphasis-color-rgb), .85);
  background-color: var(--bs-tertiary-bg);
}

.btn-toggle::before {
  width: 1.25em;
  line-height: 0;
  content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
  transition: transform .35s ease;
  transform-origin: .5em 50%;
}

[data-bs-theme="dark"] .btn-toggle::before {
  content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255,255,255,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
}

.btn-toggle[aria-expanded="true"] {
  color: rgba(var(--bs-emphasis-color-rgb), .85);
}

.btn-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}

.btn-toggle-nav a {
  padding: .1875rem .5rem;
  margin-top: .125rem;
  margin-left: 1.25rem;
}

.btn-toggle-nav a:hover,
.btn-toggle-nav a:focus {
  background-color: var(--bs-tertiary-bg);
}

.scrollarea {
  overflow-y: auto;
}

/*sub menu*/

.nav-scroller {
  position: relative;
  z-index: 1030;
}

.nav-scroller .nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  padding-bottom: 0.25rem;
  margin-top: -1px;
  text-align: center;
  white-space: nowrap;
}

.nav-scroller .nav>.nav-item,
.nav-scroller .nav>.nav-link {
  flex: 0 0 auto;
}

/* 移动端横向菜单：手势拖动位移，不用 overflow:auto，避免裁切下拉 */
#div_horizontal_menu {
  position: relative;
  z-index: 1040;
  /* clip 只裁切横向溢出，纵向 visible 可保留下拉（不同于 overflow:auto） */
  overflow-x: clip;
  overflow-y: visible;
}

#div_horizontal_menu .nav-drag-viewport {
  position: relative;
  width: 100%;
  min-height: 2.75rem;
  overflow: visible;
  touch-action: pan-y;
  cursor: grab;
}

#div_horizontal_menu .nav-drag-viewport:active {
  cursor: grabbing;
}

#div_horizontal_menu .nav-drag-viewport > .nav {
  position: absolute;
  left: 0;
  top: 0;
  width: max-content;
  max-width: none;
  overflow: visible;
}

#div_horizontal_menu .dropdown-menu {
  z-index: 1055;
}

.nav-scroller .nav-link {
  padding-top: .75rem;
  padding-bottom: .75rem;
  font-size: .875rem;
  color: #6c757d;
}

.nav-scroller .nav-link:hover {
  color: #007bff;
}

.nav-scroller .active {
  font-weight: 500;
  color: #343a40;
}

.bg-purple {
  background-color: #7952B3;
}

.bg-purple.bg-opacity-10 {
  background-color: rgba(121, 82, 179, 0.1);
}

.text-purple {
  color: #7952B3;
}

.border-purple {
  border-color: #5a3d85;
}

.btn-outline-purple {
  color: #7952B3;
  border-color: #7952B3;
}

.btn-outline-purple:hover {
  color: #fff;
  background-color: #7952B3;
  border-color: #7952B3;
}