:root {
  --primary: #1664ff;
  --primary-dark: #0958d9;
  --secondary: #00a4ff;
  --line: #e5ecf7;
  --text: #1f2a3d;
  --ease: cubic-bezier(.22,.61,.36,1);
}
* {
  box-sizing: border-box;
}
.is-hidden {
  display: none !important;
}
a {
  text-decoration: none;
  color: inherit;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
/* 顶部 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(229,236,247,.95);
  backdrop-filter: blur(12px);
}
.topbar-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo img {
  height: 34px;
  max-width: 220px;
  object-fit: contain;
  display: block;
}
/* nav */
.nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: #223b66;
  font-size: 15px;
  font-weight: 600;
}
.nav > a,.nav-item > a {
  position: relative;
  padding: 26px 0;
  transition: color .22s var(--ease);
}
.nav > a::after,.nav-item > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 17px;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg,var(--primary),var(--secondary));
  transform: translateX(-50%);
  transition: width .22s var(--ease);
}
.nav > a:hover,.nav-item > a:hover {
  color: var(--primary);
}
.nav > a:hover::after,.nav-item:hover > a::after {
  width: 22px;
}
.nav-item {
  position: relative;
}
/* 下拉菜单 */
.has-dropdown:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%,0);
}
.mega-menu {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translate(-50%,10px);
  background: #fff;
  border: 1px solid #dce8ff;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(16,47,96,.14);
  opacity: 0;
  visibility: hidden;
  transition: .22s var(--ease);
  width: max-content;
  min-width: 320px;
  max-width: 88vw;
  overflow: hidden;
  z-index: 130;
}
.mega-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,var(--primary),var(--secondary));
}
.mega-inner {
  display: flex;
  align-items: stretch;
}
.mega-col {
  width: 280px;
  padding: 12px;
  border-right: 1px solid #eef3fa;
}
.mega-col:last-child {
  border-right: none;
}
/* 子项：图标+文字同行 */
.mega-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  transition: .18s;
}
.mega-link:hover {
  background: #f5f9ff;
}
/* 只有有图标时才显示图标框 */
.mega-icon-wrap.has-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: none;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mega-icon-wrap.has-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
/* 文本区 */
.mega-text-wrap {
  min-width: 0;
  flex: 1;
}
.mega-text-wrap strong {
  display: block;
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: #1f3f69;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mega-text-wrap span {
  display: block;
  font-size: 12px;
  color: #738199;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* actions */
.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 290px;
}
.header-action {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfdcf2;
  background: linear-gradient(180deg,#fff,#f7fbff);
  color: #1f3f69;
  font-size: 14px;
  font-weight: 700;
  transition: .2s var(--ease);
}
.header-action:hover {
  color: var(--primary);
  border-color: #9ec0ff;
  background: #f5f9ff;
}
.header-action.primary {
  color: #fff;
  border-color: var(--primary);
  background: linear-gradient(135deg,#1664ff 0%,#2f7bff 55%,#00a4ff 100%);
}
/* user */
.user-wrap {
  position: relative;
  display: none;
  padding-bottom: 10px;
  margin-bottom: -10px;
}
.user-trigger {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border: 1px solid #cfdcf2;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg,var(--primary),var(--secondary));
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.uname {
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 700;
}
.user-menu {
  position: absolute;
  right: 0;
  top: 44px;
  min-width: 190px;
  background: #fff;
  border: 1px solid #e3ecfa;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(15,49,103,.16);
  display: none;
  overflow: hidden;
}
.user-menu.show,.user-wrap:hover .user-menu {
  display: block;
}
.user-menu a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #eef3fa;
  font-size: 14px;
  color: #334e73;
}
.user-menu a:last-child {
  border-bottom: none;
}
.user-menu a:hover {
  background: #f4f8ff;
  color: var(--primary);
}
/* mobile */
.menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid #cddaf0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.menu-btn span,.menu-btn span:before,.menu-btn span:after {
  content: "";
  display: block;
  width: 16px;
  height: 2px;
  background: #24456f;
  position: relative;
  margin: auto;
}
.menu-btn span:before {
  position: absolute;
  top: -5px;
}
.menu-btn span:after {
  position: absolute;
  top: 5px;
}
.mobile-mask {
  position: fixed;
  inset: 0;
  background: rgba(9,32,72,.42);
  opacity: 0;
  visibility: hidden;
  transition: .22s;
  z-index: 120;
}
.mobile-mask.show {
  opacity: 1;
  visibility: visible;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 290px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line);
  transition: .25s var(--ease);
  z-index: 121;
  overflow: auto;
}
.mobile-drawer.show {
  right: 0;
}
.drawer-head {
  height: 60px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.drawer-head img {
  height: 24px;
}
.drawer-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: #edf4ff;
  cursor: pointer;
}
.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #eef3fa;
  color: #24456f;
  font-size: 14px;
}
/* ===== 移动端抽屉菜单完整样式 ===== */
.mobile-mask {
  position: fixed;
  inset: 0;
  background: rgba(9,32,72,.42);
  opacity: 0;
  visibility: hidden;
  transition: .22s;
  z-index: 120;
}
.mobile-mask.show {
  opacity: 1;
  visibility: visible;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -310px;
  width: 300px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line);
  z-index: 121;
  transition: .28s cubic-bezier(.22,.61,.36,1);
  overflow: auto;
}
.mobile-drawer.show {
  right: 0;
}
.drawer-head {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}
.drawer-head img {
  height: 28px;
  max-width: 170px;
  object-fit: contain;
}
.drawer-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: #edf4ff;
  color: #1d4ed8;
  font-size: 18px;
  cursor: pointer;
}
.mobile-nav a {
  display: block;
  padding: 13px 16px;
  color: #24456f;
  border-bottom: 1px solid #eef3fa;
  font-size: 15px;
  font-weight: 600;
  transition: .18s;
}
.mobile-nav a:hover {
  background: #f5f9ff;
  color: var(--primary);
}
/* 多级分组 */
.mobile-group {
  border-bottom: 1px solid #eef3fa;
}
.mobile-group summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #24456f;
  font-size: 15px;
  font-weight: 600;
  user-select: none;
}
.mobile-group summary::-webkit-details-marker {
  display: none;
}
.mobile-group .arrow {
  font-style: normal;
  color: #8aa0c5;
  transition: transform .2s ease;
}
.mobile-group[open] .arrow {
  transform: rotate(180deg);
}
/* 子菜单容器 */
.mobile-submenu {
  padding: 4px 0 10px;
  background: #f8fbff;
}
/* 子菜单项：图标 + 文案同一行 */
.mobile-sub-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 10px 16px 10px 24px !important;
  border-bottom: none !important;
  white-space: nowrap !important;
}
.mobile-sub-item img {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  object-fit: contain !important;
  border-radius: 4px !important;
  margin: 0 !important;
  display: block !important;
}
.mobile-sub-text {
  display: block !important;
  min-width: 0 !important;
  flex: 1 !important;
}
.mobile-sub-text .title {
  display: block !important;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: #35507c !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.mobile-sub-text .desc {
  margin-top: 2px;
  font-size: 12px;
  color: #7f91aa;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 无图标时不要空占位 */
.mobile-sub-item:not(:has(img)) .mobile-sub-text {
  margin-left: 0 !important;
}
/* 响应式开关 */
@media (max-width:960px) {
  .nav,.pc-only,.mega-menu {
    display: none !important;
  }
  .menu-btn {
    display: flex !important;
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }
  .topbar-inner {
    height: 64px;
    padding: 0 12px;
    gap: 8px;
  }
  .logo {
    min-width: auto;
    max-width: 58%;
  }
  .logo img {
    height: 26px;
    max-width: 100%;
  }
  .actions {
    min-width: auto;
    gap: 6px;
    margin-left: auto;
  }
}
@media (max-width:420px) {
  .mobile-drawer {
    width: 88vw;
    right: -88vw;
  }
  .mobile-sub-item {
    padding-left: 18px !important;
  }
}
/* 页脚 */
.footer {
  margin-top: 30px;
  padding: 30px 0;
  border-top: 1px solid #e1e8f5;
  background: #f8fbff;
  color: #6b7c93;
  font-size: 13px;
}
.footer a:hover {
  color: var(--primary);
}
.footer-meta {
  margin-top: 8px;
}
.footer-telecom {
  margin-left: 8px;
}
