/* =============================================
   布局样式文件
   ============================================= */

/* 主布局容器 */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-secondary);
}

/* 侧边栏样式 */
.sidebar {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform var(--transition-normal);
  z-index: var(--z-fixed);
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar.collapsed {
  width: -100%;
}

.sidebar-toggle-handle {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  height: 40px;
  background-color: #34495e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  margin: 0 10px;
  color: #fff;
  font-size: 18px;
  opacity: 0;
  transition: all 0.3s ease;
}
.sidebar.collapsed .sidebar-toggle-handle {
  opacity: 1;
}

.sidebar-toggle-handle:hover {
  background-color: #4a6283;
}
.sidebar-toggle-handle i {
  transition: transform 0.3s ease;
}
.sidebar.collapsed .sidebar-toggle-handle i {
  transform: rotate(180deg);
}

/* 侧边栏头部 */
.sidebar-header {
  display: flex;
  align-items: center;
  padding: var(--spacing-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-inverse);
  font-weight: 600;
  font-size: 1.125rem;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  margin-right: var(--spacing-sm);
  background: var(--primary-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-weight: bold;
}

.sidebar-toggle {
  margin-left: 2rem;
}
/* 侧边栏导航 */
.sidebar-nav {
    padding: var(--spacing-md) 0;
  flex: 1;
}

.nav-section {
  margin-bottom: var(--spacing-lg);
}

.nav-section-title {
  padding: 0 var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
}

.nav-item {
  margin-bottom: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-inverse);
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: var(--text-inverse);
  background-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--text-inverse);
}

.nav-icon {
  width: 20px;
  height: 20px;
  margin-right: var(--spacing-sm);
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  padding: 0.125rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
  background-color: var(--danger-color);
  color: var(--text-inverse);
  border-radius: var(--radius-xl);
}

/* 子菜单 */
.nav-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.nav-submenu.show {
  max-height: 500px;
}

.nav-submenu .nav-link {
  padding-left: calc(var(--spacing-lg) + 32px);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
}

.nav-submenu .nav-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav-submenu .nav-link.active {
  color: var(--text-inverse);
  background-color: rgba(37, 99, 235, 0.8);
}

/* 侧边栏底部 */
.sidebar-footer {
  /* position: absolute; */
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-user {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.sidebar-user:hover {
  color: var(--text-inverse);
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  margin-right: var(--spacing-sm);
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-inverse);
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 2px;
}

.sidebar-user-role {
  font-size: 0.75rem;
  opacity: 0.7;
  line-height: 1;
}

/* 主内容区域 */
.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-normal);
}

.main-content.sidebar-collapsed {
  margin-left: 0;
}

/* 顶部导航栏 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
  height: 64px;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.topbar-left {
  display: flex;
  align-items: center;
}

.topbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: var(--spacing-md);
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.topbar-toggle:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* 面包屑导航 */
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
  content: "/";
  margin: 0 var(--spacing-sm);
  color: var(--text-tertiary);
}

.breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
  color: var(--primary-color);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* 搜索框 */
.topbar-search {
  position: relative;
  width: 280px;
}

.search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
}

/* =============== 通知按钮 & 下拉菜单（新增美化）=============== */

.notification-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notification-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.notification-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background-color: var(--danger-color);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

/* 通知下拉菜单 */
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-secondary);
}

.notification-dropdown::-webkit-scrollbar {
  width: 6px;
}

.notification-dropdown::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

.notification-dropdown::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 4px;
}

.notification-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.mark-all-read {
  font-size: 0.8rem;
  color: var(--primary-color);
  background: none;
  border: none;
  cursor: pointer;
}

.notification-list {
  list-style: none;
}

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bg-tertiary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.notification-item:hover {
  background-color: var(--bg-tertiary);
}

.notification-item.unread {
  background-color: #f8faff;
  font-weight: 500;
  border-left: 3px solid var(--primary-color);
}

.notification-content p {
  margin: 0;
  color: var(--text-primary);
  word-break: break-word;
}

.notification-time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.notification-footer {
  padding: 0.75rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
}

.notification-footer a {
  color: var(--primary-color);
  font-size: 0.875rem;
  text-decoration: none;
}

.notification-footer a:hover {
  text-decoration: underline;
}

/* =============== 用户菜单 =============== */

.user-menu {
  position: relative;
}

.user-menu-toggle {
  display: flex;
  align-items: center;
  padding: 0.25rem;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.user-menu-toggle:hover {
  background-color: var(--bg-tertiary);
}

.user-avatar {
  width: 32px;
  height: 32px;
  margin-right: var(--spacing-sm);
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-inverse);
}

.user-info {
  text-align: left;
  margin-right: var(--spacing-sm);
  padding: 20px;
  display: flex;
  gap: 12px;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 2px;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1;
}

.user-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 200px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

.user-menu.show .user-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  text-decoration: none;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
  background-color: var(--bg-tertiary);
}

.dropdown-item:first-child {
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
}

.dropdown-item:last-child {
  border-bottom-left-radius: calc(var(--radius-lg) - 1px);
  border-bottom-right-radius: calc(var(--radius-lg) - 1px);
}

.dropdown-icon {
  width: 16px;
  height: 16px;
  margin-right: var(--spacing-sm);
  color: var(--text-secondary);
}

.dropdown-divider {
  height: 1px;
  margin: 0.5rem 0;
  background-color: var(--border-color);
}

/* 对话框 */
/* 弹出层背景遮罩 */
.modal-overlay {
  display: none; /* 默认隐藏 */
  position: fixed; /* 固定定位，覆盖整个视窗 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中 */
  z-index: 1040; /* 确保它在其他内容之上 */
}

/* 对话框容器 */
.modal-dialog {
  background-color: #fff; /* 白色背景 */
  border-radius: 8px; /* 圆角 */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* 阴影效果 */
  max-width: 90%; /* 最大宽度限制 */
  max-height: 80%; /* 最大高度限制 */
  overflow-y: auto; /* 如果内容超出最大高度则允许滚动 */
}

/* 对话框头部 */
.modal-header {
  padding: 15px;
  border-bottom: 1px solid #e9ecef; /* 边框底部 */
  background-color: #f7f7f7; /* 背景颜色 */
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem; /* 标题大小 */
  color: #333; /* 标题颜色 */
}

/* 对话框主体 */
.modal-body {
  padding: 20px;
  text-align: center; /* 文本居中 */
}

.modal-body p {
  margin: 0;
  font-size: 1rem; /* 正文大小 */
  color: #555; /* 正文颜色 */
}

/* 对话框脚部 */
.modal-footer {
  padding: 10px 15px;
  border-top: 1px solid #e9ecef; /* 边框顶部 */
  text-align: right; /* 右对齐 */
  background-color: #f7f7f7; /* 背景颜色 */
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.modal-footer .btn {
  margin-left: 10px; /* 按钮之间的间距 */
  margin-bottom: 6px; /* 按钮之间底部间距 */
  padding: 8px 16px; /* 内边距 */
  border: none; /* 无边框 */
  border-radius: 4px; /* 圆角 */
  cursor: pointer; /* 手型光标 */
  transition: all 0.3s ease; /* 过渡效果 */
}

.modal-footer .btn-secondary {
  background-color: #6c757d; /* 次要按钮背景颜色 */
  color: #fff; /* 文字颜色 */
}

.modal-footer .btn-secondary:hover {
  background-color: #5a6268; /* 悬停时的颜色 */
}

.modal-footer .btn-danger {
  background-color: #dc3545; /* 主要按钮背景颜色 */
  color: #fff; /* 文字颜色 */
}

.modal-footer .btn-danger:hover {
  background-color: #c82333; /* 悬停时的颜色 */
}

/* 页面内容区域 */
.page-content {
  flex: 1;
  padding: var(--spacing-lg);
  background-color: var(--bg-secondary);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* 内容卡片 */
.content-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.content-card-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
}

.content-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.content-card-body {
  padding: var(--spacing-lg);
}

.content-card-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
}

/* 响应式设计 */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    transition: all var(--transition-normal);
  }

  .main-content.with-sidebar {
    transform: translateX(260px);
  }

  .topbar-toggle {
    display: flex;
  }

  .topbar-search {
    width: 200px;
  }

  .user-info {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .topbar {
    padding: 0 var(--spacing-md);
  }

  .topbar-search {
    display: none;
  }

  .page-content {
    padding: var(--spacing-md);
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }

  .page-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .content-card-header,
  .content-card-body,
  .content-card-footer {
    padding: var(--spacing-md);
  }
}

@media (max-width: 575.98px) {
  .topbar {
    height: 56px;
    padding: 0 var(--spacing-sm);
  }

  .page-content {
    padding: var(--spacing-sm);
  }

  .page-title {
    font-size: 1.25rem;
  }

  .content-card-header,
  .content-card-body,
  .content-card-footer {
    padding: var(--spacing-sm);
  }
}

/* 侧边栏遮罩层（移动端） */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: calc(var(--z-fixed) - 1);
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* 加载状态 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl);
  text-align: center;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--spacing-lg);
  color: var(--text-tertiary);
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.empty-state-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  max-width: 400px;
}

/* 错误状态 */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl);
  text-align: center;
}

.error-state-icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--spacing-lg);
  color: var(--danger-color);
}

.error-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.error-state-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  max-width: 400px;
}

/*弹框*/
/* Toast 容器：控制位置和堆叠 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: max-content;
  max-width: 90%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

/* 显示时的类（JS 添加） */
.toast.show {
  opacity: 1;
  pointer-events: auto;
}

/* 内容区域：可带类型样式 */
.toast-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  line-height: 1.4;
  color: white;
  word-wrap: break-word;
  gap: 12px;
  animation: toast-slide-in 0.3s ease-out forwards;
}

/* 不同类型的颜色 */
.toast-info .toast-content {
  background-color: #1677ff; /* 蓝色 */
}

.toast-success .toast-content {
  background-color: #52c41a; /* 绿色 */
}

.toast-warning .toast-content {
  background-color: #faad14; /* 橙色 */
  color: #1f1f1f; /* 深色文字 */
}

.toast-error .toast-content,
.toast-danger .toast-content {
  background-color: #ff4d4f; /* 红色 */
}

/* 消息文本 */
.toast-message {
  flex: 1;
  text-align: left;
}

/* 关闭按钮 */
.toast-close,
.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  color: inherit;
}

.toast-close:hover,
.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 动画：滑入 */
@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 可选：淡出动画 */
.toast.fade-out {
  animation: toast-fade-out 0.3s forwards;
}

@keyframes toast-fade-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* 
 下拉框 
*/
.filter-group * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 筛选器容器 */
.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-family: "Segoe UI", "PingFang SC", sans-serif;
}

/* 直接选择按钮样式调整 */
.filter-group > .btn {
  padding: 0.5rem 1rem;
}

/* 标签样式 */
.filter-label {
  font-size: 14px;
  color: #555;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
}

/* 下拉框容器（添加伪元素美化） */
.filter-input-wrapper {
  position: relative;
  flex-grow: 1;
  max-width: 200px;
}

/* 下拉箭头（自定义替换默认箭头） */
.filter-input-wrapper::after {
  content: "▼";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 10px;
  color: #666;
  pointer-events: none;
  transition: all 0.3s ease;
}

/* 下拉框主体 */
.filter-input {
  width: 100%;
  padding: 8px 32px 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
  color: #333;
  font-size: 14px;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 交互状态 */
.filter-input:hover {
  border-color: #a777e3;
}

.filter-input:focus {
  border-color: #6e8efb;
  box-shadow: 0 0 0 2px rgba(110, 142, 251, 0.2);
}

.filter-input:focus + .filter-label {
  color: #6e8efb;
}

/* 下拉选项样式 */
.filter-input option {
  padding: 8px;
  background: white;
  color: #333;
}

.filter-input option:hover {
  background-color: #f5f5f5;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .filter-label {
    color: #bbb;
  }
  .filter-input {
    background-color: #333;
    border-color: #555;
    color: #eee;
  }
  .filter-input-wrapper::after {
    color: #aaa;
  }
  .filter-input option {
    background: #333;
    color: #eee;
  }
}
