/* ============================================================
 * 统一顶栏样式（全站共享）—— 白色调
 * 所有类名以 .uix- 前缀隔离，避免与各站样式冲突
 * 设计基准：白色顶栏 + 品牌蓝 #2563eb 点缀
 * ============================================================ */

:root {
  --uix-primary: #2563eb;
  --uix-primary-dark: #1d4ed8;
  --uix-nav-h: 48px;
}

/* ---- 顶栏容器（白色） ---- */
.uix-nav {
  position: sticky;
  top: 0;
  z-index: 9000;
  height: var(--uix-nav-h);
  background: #ffffff;
  border-bottom: 1px solid #e8ecf2;
  box-shadow: 0 1px 8px rgba(16, 24, 40, 0.06);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  user-select: none;
}
.uix-nav-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---- 品牌 ---- */
.uix-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f2937;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.uix-brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--uix-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ---- 首页入口 ---- */
.uix-home {
  display: flex;
  align-items: center;
  gap: 5px;
  height: var(--uix-nav-h);
  padding: 0 12px;
  color: #4b5563;
  text-decoration: none;
  font-size: 13.5px;
  white-space: nowrap;
  transition: color 0.15s;
}
.uix-home:hover { color: var(--uix-primary); }
.uix-home.current {
  color: var(--uix-primary);
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--uix-primary);
}

/* ---- 分组菜单（桌面） ---- */
.uix-menus {
  display: flex;
  align-items: stretch;
  height: 100%;
  margin-left: 8px;
  flex: 1;
  min-width: 0;
}
.uix-group {
  position: relative;
  display: flex;
  align-items: center;
}
.uix-group-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: var(--uix-nav-h);
  padding: 0 13px;
  background: none;
  border: 0;
  color: #4b5563;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.uix-group-btn:hover,
.uix-group.open .uix-group-btn {
  background: #f1f5f9;
  color: #1f2937;
}
.uix-group.current .uix-group-btn {
  color: var(--uix-primary);
  font-weight: 600;
}
.uix-group.current .uix-group-btn::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--uix-primary);
}
.uix-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  transition: transform 0.18s;
}
.uix-group.open .uix-caret { transform: rotate(180deg); }

/* ---- 下拉面板 ---- */
.uix-dropdown {
  position: absolute;
  top: calc(var(--uix-nav-h) - 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 172px;
  background: #fff;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 32px -8px rgba(16, 24, 40, 0.18);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.uix-group.open .uix-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.uix-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 7px;
  color: #1f2937;
  text-decoration: none;
  font-size: 13.5px;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.uix-dropdown a:hover {
  background: #eef4ff;
  color: var(--uix-primary-dark);
}
.uix-dropdown a.current {
  background: var(--uix-primary);
  color: #fff;
  font-weight: 600;
}
.uix-dropdown a.current::before {
  content: "•";
  margin-left: -4px;
}

/* ---- 移动端汉堡 ---- */
.uix-burger {
  display: none;
  margin-left: auto;
  width: 38px;
  height: 38px;
  border: 1px solid #e8ecf2;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.uix-burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #374151;
  transition: transform 0.2s, opacity 0.2s;
}
.uix-nav.open .uix-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.uix-nav.open .uix-burger span:nth-child(2) { opacity: 0; }
.uix-nav.open .uix-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.uix-mobile-panel {
  display: none;
  position: absolute;
  top: var(--uix-nav-h);
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--uix-nav-h));
  overflow-y: auto;
  background: #fff;
  border-bottom: 1px solid #e8ecf2;
  box-shadow: 0 12px 24px -10px rgba(16, 24, 40, 0.18);
  padding: 8px 12px 14px;
}
.uix-nav.open .uix-mobile-panel { display: block; }
.uix-mobile-group-title {
  margin: 10px 4px 4px;
  font-size: 12px;
  color: #909399;
  letter-spacing: 1px;
}
.uix-mobile-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  color: #1f2937;
  text-decoration: none;
  font-size: 14px;
}
.uix-mobile-panel a:hover { background: #eef4ff; color: var(--uix-primary-dark); }
.uix-mobile-panel a.current { background: var(--uix-primary); color: #fff; font-weight: 600; }

@media (max-width: 760px) {
  .uix-menus, .uix-home { display: none; }
  .uix-burger { display: flex; }
}

/* ---- 全站风格轻量统一（白色调） ---- */
/* 统一页面背景为白色 */
body { background: #ffffff; }
/* layui 系站点：标题装饰图标统一为品牌蓝 */
.tool-header h1 .layui-icon { color: var(--uix-primary); }
