/*!
 * head.css
 * 来源：resources/views/web/shared/_head.blade.php 的内联 <style>
 * 说明：仅为把样式从 HTML 里挪出来（避免慢网速下的样式错位 / FOUC），CSS 内容与原内联一致。
 */

.navigation-menu {
  height: 72px;
  top: 0;
  z-index: 1000;
  overflow: visible;
}

.nav-list {
  display: flex;
  justify-content: center;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 100%;
  height: 72px;
}

/* 项宽由内容决定，间距用 gap 统一控制，避免 flex:1 把空隙撑大 */
.nav-item {
    text-align: center;
    flex: 0 0 auto;
    min-width: 0;
    margin: 0!important;
}
/* 常态：文字 #1d2939（白底 15.3:1），图标 #344054（10.5:1）。
   不用纯黑 #000：小字在浅底上纯黑会因抗锯齿发糙；且常态一旦到顶，
   选中态文字就没法再"更重"，只能在颜色相和形状上做文章，层级会被拉平。
   图标仍比文字浅一档，细线字形才不会和文字糊成一团。 */
.nav-item a {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #1d2939;
  border-radius: 12px;
  transition: color .18s ease, background-color .18s ease;
  padding: 6px 11px;
  height: 72px;
  box-sizing: border-box;
}

.nav-item i {
  font-size: 18px;
  margin-bottom: 4px;
  width: auto;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #344054;
  transition: color .18s ease, transform .2s ease;
}

.nav-item span {
  font-size: 13.5px;
  line-height: 1.4;
  white-space: nowrap;
}

/* 选中指示条：3px 品牌青渐变，左右内缩 8px 带上圆角。
   比原来的 2px 通栏黑线更像「当前页」标记，也不会把头部底边压暗。 */
.nav-item a::after {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #0a8f88, #067069);
  content: '';
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity .2s ease, transform .2s ease;
}

/* 悬停：中性灰底表示「可点」，颜色转品牌青。
   刻意不用浅青底 —— 否则和选中态只差一点亮度，悬停时会被误读成已选中。
   同时去掉原来的 translateY(-2px)，位移会让下方指示条跟着跳。 */
.nav-item a:hover {
  color: #087e78;
  background-color: #f2f5f8;
}

.nav-item a:hover i {
  color: #0a8f88;
  transform: scale(1.06);
}

/* 选中：四重信号叠加 —— 深青字 + 加粗 + 青绿渐变底 + 青绿指示条。
   常态已经推到 #1d2939（14.7:1），选中文字若还用 #067069 会"比常态浅"，
   所以这里同步加深到 #04514d（在青底上 7.8:1），保住「选中最重」的层级。
   底色用竖向渐变（上浅下深），与底部指示条衔接，读起来像一个「页签」。 */
.nav-item.active a {
  color: #04514d;
  font-weight: 600;
  background: linear-gradient(180deg, #edf8f6, #dbf0eb);
}

.nav-item.active a:hover {
  background: linear-gradient(180deg, #e6f5f2, #d3ebe5);
}

.nav-item.active i {
  color: #067069;
  transform: scale(1.1);
}

.nav-item.active a::after {
  opacity: 1;
  transform: scaleX(1);
}

/* base.css 有 *{outline:none}，键盘聚焦时会完全没有焦点提示，这里补回来 */
.nav-item a:focus-visible {
  outline: 2px solid #087e78;
  outline-offset: -6px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navigation-menu {
    height: auto;
    padding: 10px 0;
  }
  
  .nav-list {
    flex-wrap: wrap;
    max-width: 100%;
    height: auto;
    padding: 0 20px;
  }
  
  .nav-item {
    flex: 0 0 33.333%;
    padding: 5px 0;
    margin: 5px 0;
  }
  
  .nav-item a {
    height: auto;
    padding: 15px 5px;
  }
  
  .nav-item i {
    font-size: 24px;
    width: 40px;
    height: 40px;
  }
  
  .nav-item span {
    font-size: 12px;
  }
}

.user_box_avatar{
    width: 35px;
    height: 35px;
    border: 1px solid #d1d1d1;
    border-radius: 35px;
    margin-right: 5px;
}


/* 导航列表样式 */
.right_nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 10px;
}

.nav-item-right {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0px 5px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #0066ff;
}

.nav-link i {
  margin-right: 8px;
  font-size: 16px;
}

/* 下拉菜单样式（头像昵称的账号下拉；消息中心菜单在 style.css 里单独覆写）
   8px 的 top 间隙靠 ::before 桥接 —— 桥是 .dropdown-menu 的子元素，
   鼠标从触发器滑向菜单时 :hover 不会在空隙上断掉 */
.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #e9eef3;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(16, 24, 40, .12);
  min-width: 168px;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

/* 鼠标悬浮展开；键盘 Tab 到触发器/菜单项时同样展开（否则 visibility:hidden 的项无法聚焦） */
.nav-item-right:hover .dropdown-menu,
.nav-item-right:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  margin: 0 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #1d2939;
  font-size: 13px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
  background: #f2fbf9;
  color: #087e78;
}

.dropdown-item i {
  width: 20px;
  margin-right: 12px;
  font-size: 14px;
  color: #667085;
  transition: color 0.15s ease;
}

.dropdown-item:hover i { color: #0a8f88; }

/* 管理后台入口：金色描边 + 金色图标，和普通菜单项区分开 */
.dropdown-item.is-admin {
  color: #8a641f;
  background: #fdf8ee;
}
.dropdown-item.is-admin i {
  color: #b8873b;
}
.dropdown-item.is-admin:hover {
  background: #fbf1dc;
  color: #6f4f13;
}
.dropdown-item.is-admin:hover i { color: #8a641f; }

.dropdown-divider {
  height: 1px;
  background: #eee;
  margin: 8px 0;
}

/* 用户头像样式 */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  border: 1px solid #eee;
}

.user-name {
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-arrow {
  margin-left: 8px;
  font-size: 12px;
  transition: transform 0.3s;
}

.nav-item-right:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* 通知徽章 */
.notification-badge {
  position: absolute;
  top: 0px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
}

/* 登录注册按钮 */
.auth-buttons {
  display: flex;
  gap: 10px;
}

.login-btn {
      vertical-align: middle;
    text-align: center;
    margin-top: 5px;
    padding: 0 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
}

.login-btn-outline {
  border: 1px solid #ddd;
  color: #333;
}

.login-btn-outline:hover {
  border-color: #2B6CB0;
  color: ##2B6CB0;
}

.login-btn-primary {
  background: #000000;
    color: white !important;
    border: none;
}

.login-btn-primary:hover {
  background: #0052cc;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .right_nav {
    gap: 8px;
  }
  
  .nav-link {
    padding: 8px 10px;
    font-size: 12px;
  }
  
  .dropdown-menu {
    min-width: 160px;
  }
  
  .auth-buttons .btn {
    padding: 6px 12px;
  }
}


/* ==================== 顶部窄业务条 ==================== */
.topbar {
  height: 34px;
  background: #f6f8fa;
  border-bottom: 1px solid #eef2f5;
  color: #5c6b77;
  font-size: 12px;
  line-height: 34px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: min(1450px, calc(100% - 40px));
  height: 34px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar-nav,
.topbar-side {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar-nav > li,
.topbar-side > li {
  position: relative;
  float: none;
  padding: 0;
}

.topbar-nav > li > a,
.topbar-side > li > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  color: #475467;
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
  transition: color .15s ease;
}

.topbar-nav > li > a:hover,
.topbar-side > li > a:hover {
  background: transparent;
  color: #087e78;
}

/* 分隔竖线 */
.topbar-nav > li + li::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 11px;
  background: #e3e9ee;
  content: '';
  transform: translateY(-50%);
}

.topbar-home > a {
  padding-left: 0;
  color: #344054;
  font-weight: 600;
}

.topbar-nav > li:first-child > a { padding-left: 0; }

/* 顶部窄条图标：原 #98a2b3 在白底只有 2.8:1，细线字形几乎看不见，加深到 #667085 */
.topbar-nav i,
.topbar-side i {
  color: #667085;
  font-size: 11px;
  transition: color .15s ease;
}

.topbar-nav > li > a:hover i,
.topbar-side > li > a:hover i { color: #0a8f88; }

.topbar-more > a i { font-size: 9px; }

.topbar-side > li > a {
  padding: 0 10px;
  color: #475467;
}

.topbar-cta > a {
  padding-right: 0;
  color: #087e78;
  font-weight: 600;
}

.topbar-cta i { color: #0a8f88; }

/* 次要入口（找企业 / 商学院 / 帮助中心）：字色压一档，避免与主业务抢注意力 */
.topbar-secondary > a { color: #667085; }

/* 「我的激励」：金色只用于收益类入口，已签到转常态色 */
.topbar-reward > a {
  color: #8a641f;
  font-weight: 600;
}

.topbar-reward > a i { color: #b8873b; }

.topbar-reward > a:hover,
.topbar-reward > a:hover i { color: #087e78; }

.topbar-reward > a.is-done {
  color: #667085;
  font-weight: 400;
}

.topbar-reward > a.is-done i { color: #0f9d76; }

/* 下拉面板 */
.topbar-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1200;
  display: flex;
  visibility: hidden;
  gap: 26px;
  padding: 16px 20px;
  border: 1px solid #e9eef3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(16, 24, 40, .13);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

/* 透明桥接，避免鼠标移动时丢失 hover */
.topbar-panel::before {
  position: absolute;
  top: -8px;
  right: 0;
  left: 0;
  height: 8px;
  content: '';
}

.topbar-more:hover > .topbar-panel,
.topbar-kf:hover > .topbar-panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.topbar-panel-col {
  display: flex;
  flex-direction: column;
  min-width: 132px;
}

.topbar-panel-col strong {
  margin-bottom: 6px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
}

.topbar-panel-col a {
  margin-left: -8px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #475467;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}

.topbar-panel-col a:hover {
  background: #f2fbf9;
  color: #087e78;
}

/* 客服面板 */
.topbar-panel-kf {
  right: 0;
  left: auto;
  flex-direction: column;
  gap: 5px;
  min-width: 216px;
  padding: 14px 16px;
}

.topbar-kf-title {
  margin-bottom: 4px;
  color: #98a2b3;
  font-size: 11px;
  line-height: 1.4;
}

.topbar-kf-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 12.5px;
  line-height: 1.8;
}

.topbar-kf-row i {
  width: 14px;
  color: #9fb0be;
  text-align: center;
}

.topbar-kf-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: #475467;
  font-size: 12.5px;
  line-height: 1.6;
  transition: background-color .15s ease, color .15s ease;
}

.topbar-kf-link:hover {
  background: #f2fbf9;
  color: #087e78;
}

.topbar-kf-link i {
  width: 14px;
  color: #9fb0be;
  text-align: center;
}

.topbar-kf-link:hover i { color: #0a8f88; }

.topbar-kf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  margin-top: 6px;
  border: 1px solid #d9e6e3;
  border-radius: 7px;
  background: #f6fcfb;
  color: #087e78;
  font-size: 12px;
  transition: background-color .15s ease, border-color .15s ease;
}

.topbar-kf-btn:hover {
  border-color: #b9ded9;
  background: #eef9f7;
  color: #066a65;
}

@media (max-width: 1100px) {
  /* 次要项先收，主业务 + 更多服务 + 右侧激励保持可见 */
  .topbar-secondary { display: none; }
}

@media (max-width: 900px) {
  .topbar { display: none; }
}
