/* 四端入口 ICON 切換（高對比，適用深色／淺色頂欄） */
.portal-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.portal-switcher .portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 42px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #ffffff;
  color: #163d2a !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}

.portal-switcher .portal-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

.portal-switcher .portal-btn:hover {
  transform: translateY(-1px);
  background: #f3faf6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  color: #0f3d28 !important;
}

.portal-switcher .portal-btn.active {
  background: #ffd089;
  border-color: #e0a24a;
  color: #3a2508 !important;
  box-shadow: 0 0 0 2px rgba(224, 122, 47, 0.35);
}

.portal-switcher .portal-btn.portal-home {
  background: #12323c;
  border-color: #0b3a4a;
  color: #ffffff !important;
}

.portal-switcher .portal-btn.portal-home:hover {
  background: #0f5364;
  color: #ffffff !important;
}

/* 管理後台淺色頂欄時也清楚 */
.user-chip .portal-switcher .portal-btn {
  border-color: #c9d7dd;
  box-shadow: 0 1px 4px rgba(11, 58, 74, 0.12);
}
.user-chip .portal-switcher .portal-btn.active {
  background: #0f7a8a;
  border-color: #0f7a8a;
  color: #ffffff !important;
}
.user-chip .portal-switcher .portal-btn.portal-home {
  background: #e07a2f;
  border-color: #e07a2f;
  color: #ffffff !important;
}

@media (max-width: 700px) {
  .portal-switcher .portal-btn-label { display: none; }
  .portal-switcher .portal-btn {
    min-width: 40px;
    width: 40px;
    padding: 0;
  }
}
