/* 门户 tab 栏(打卡 / 卡片管理 / 以后更多)
   样式刻意做成和顶栏的 theme-switch 一致的胶囊控件 */

/* 任何显式 display 规则都会盖掉 [hidden] 自带的 display:none(UA 样式优先级最低),
   所以这里统一兜一层 —— 否则 .topbar-link{display:inline-flex} 之类的规则
   会让 hidden 元素照样显示。 */
[hidden] {
  display: none !important;
}

.portal-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 24px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #eef2f8;
}

body.dark .portal-tabs {
  background: var(--soft);
}

.portal-tab {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 20px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.portal-tab:hover {
  color: var(--text);
}

.portal-tab.is-active {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(36, 87, 255, 0.22);
}

@media (max-width: 640px) {
  .portal-tabs {
    width: 100%;
    margin-bottom: 18px;
  }

  .portal-tab {
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
  }
}
