/* 手机端：主功能底部 Tab，顶栏不再挤导航 */
.app-tabbar {
  display: none;
}

@media (max-width: 767px) {
  .user-bar .nav-links,
  .top-bar .nav-links {
    display: none !important;
  }

  .user-bar,
  .top-bar {
    justify-content: flex-end;
    margin-bottom: 8px;
    padding-top: 12px;
  }

  .user-bar-actions,
  .top-bar-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  body.has-tabbar {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .app-tabbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    pointer-events: none;
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(0, 33, 71, 0.08);
    box-shadow: 0 -8px 32px rgba(0, 33, 71, 0.08);
  }

  .app-tabbar a {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    padding: 4px 6px;
    border-radius: 14px;
    text-decoration: none;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.15;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .app-tabbar a .tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: #64748b;
    transition: background 0.15s, color 0.15s;
  }

  .app-tabbar a .tab-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .app-tabbar a.active {
    color: #002147;
  }

  .app-tabbar a.active .tab-icon {
    background: #e8f1f8;
    color: #002147;
  }

  .app-tabbar a:active:not(.active) {
    background: rgba(0, 33, 71, 0.04);
  }
}

@media (min-width: 768px) {
  .app-tabbar {
    display: none !important;
  }
}
