/* 左侧导航菜单样式 - 所有页面统一引用 */

/* 自定义滚动条 */
.custom-scrollbar::-webkit-scrollbar { width: 5px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* 左侧菜单容器 */
.left-menu {
  width: 200px;
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  padding-top: 8px;
}

/* 菜单项 */
.nav-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 18px;
  margin: 2px 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 14px;
  color: #374151;
  border-left: 3px solid transparent;
  border-radius: 8px;
  user-select: none;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  text-decoration: none;
}
.nav-menu-item:hover {
  background-color: #ecfdf5;
  color: #059669;
  box-shadow: 0 2px 8px rgba(16,185,129,0.13);
  transform: translateX(3px);
}
.nav-menu-item.active {
  border-left-color: #10b981;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #047857;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(16,185,129,0.22);
}
.nav-menu-item .menu-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  color: #6b7280;
  transition: color 0.2s ease;
}
.nav-menu-item:hover .menu-icon {
  color: #059669;
}
.nav-menu-item.active .menu-icon {
  color: #047857;
}
.nav-menu-item .menu-badge {
  font-size: 10px;
  background-color: #ef4444;
  color: white;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
  margin-left: auto;
  line-height: 1.4;
}
.nav-menu-item .menu-arrow {
  font-size: 10px;
  color: #9ca3af;
  margin-left: auto;
  transition: transform 0.2s ease;
}
.nav-menu-item .menu-arrow.open {
  transform: rotate(180deg);
}

/* 代理中心子菜单 */
.agent-submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.agent-submenu.open {
  max-height: 300px;
}
.agent-submenu-item {
  display: block;
  padding: 8px 16px 8px 52px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.1s ease;
  text-decoration: none;
}
.agent-submenu-item:hover {
  background-color: #f3f4f6;
  color: #374151;
}
.agent-submenu-item.active {
  color: #059669;
  font-weight: 500;
}

/* 响应式：小屏幕隐藏左侧菜单 */
@media (max-width: 1024px) {
  .left-menu { display: none !important; }
}

/* ==================== 头部菜单样式（新版：Logo | 站内信 | 头像 | 退出） ==================== */
.header-menu {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}
.header-inner {
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: #10b981;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #10b981;
}

/* 右侧操作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 图标按钮（站内信等） */
.header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
}
.header-icon-btn:hover {
  background: #f3f4f6;
  color: #10b981;
}
.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 用户头像 */
.header-avatar-wrap {
  position: relative;
}
.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  border: 2px solid #d1fae5;
  transition: all 0.2s;
}
.header-avatar:hover {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}
.header-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* 用户下拉菜单 */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  border: 1px solid #e5e7eb;
  padding: 8px 0;
  z-index: 2000;
}
.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.user-dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
}
.user-dropdown-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.user-dropdown-info {
  flex: 1;
  min-width: 0;
}
.user-dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.user-dropdown-item:hover {
  background: #f9fafb;
}
.user-dropdown-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 4px 0;
}
.user-dropdown-logout {
  color: #ef4444;
}
.user-dropdown-logout:hover {
  background: #fef2f2;
}

/* ==================== 底部菜单样式 ==================== */
.footer-menu {
  background: #111827;
  color: white;
  padding: 48px 0 24px;
  width: 100%;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 40px;
  height: 40px;
  background: #10b981;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.brand-text {
  font-size: 24px;
  font-weight: 700;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-link {
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-link:hover {
  color: #10b981;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copyright {
  color: #6b7280;
  font-size: 13px;
  margin: 0;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
}
.social-icon {
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s;
}
.social-icon:hover {
  color: white;
}

/* ==================== 后台管理左侧菜单样式 ==================== */
.admin-left-menu {
  width: 240px;
  background: #1e293b;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  padding-top: 0;
}
.admin-left-menu .nav-menu-item {
  color: #cbd5e1;
  border-left: 3px solid transparent;
  margin: 2px 8px;
  padding: 10px 14px 10px 18px;
  font-size: 14px;
  gap: 10px;
  border-radius: 8px;
}
.admin-left-menu .nav-menu-item:hover {
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  transform: translateX(0);
}
.admin-left-menu .nav-menu-item.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-left-color: #10b981;
  font-weight: 600;
}
.admin-left-menu .nav-menu-item .menu-icon {
  color: #94a3b8;
}
.admin-left-menu .nav-menu-item:hover .menu-icon {
  color: #10b981;
}
.admin-left-menu .nav-menu-item.active .menu-icon {
  color: #10b981;
}
.admin-left-menu .menu-group-title {
  padding: 16px 18px 6px;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
