.top-tab-bar {
  background: white;
  border-radius: 10px 10px 0 0;
  border-bottom-width: 1px;
  border-bottom-style: outset;
  border-bottom-color: #e5ebfd;
  padding: 0.3rem 0.5rem;
  margin-bottom: 1rem;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.04);
  margin-top: 0;
  transition: opacity 0.2s;
  position: relative;
}
.top-tab-btn {
  background: none;
  border: none;
  color: #4f46e5;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem 0.3rem 1.1rem;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.top-tab-btn.active,
.top-tab-btn:focus {
  background: #4f46e5;
  color: #fff;
}
.top-tab-btn .tab-text {
  display: inline;
}
/* Hide top bar text on mobile portrait */
@media (max-width: 700px) and (orientation: portrait) {
  .top-tab-bar {
    font-size: 0.98rem;
    gap: 0.5rem;
    margin-top: 0;
  }
  .top-tab-btn .tab-text {
    display: none !important;
  }
  .top-tab-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.97rem;
    gap: 0;
  }
}
/* Bottom bar icon + text for desktop and landscape */
.bt-tab {
  background: none;
  border: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #4f46e5;
  padding: 0.2rem 0;
  min-width: 60px;
  transition: background 0.15s;
  border-radius: 8px 8px 0 0;
}
.bt-tab i {
  font-size: 1.5rem;
  margin-bottom: 0.1em;
  transition: color 0.15s;
}
.bt-tab .bt-label {
  display: none;
  font-size: 0.92rem;
  margin-top: 0.1em;
  color: #4f46e5;
  font-weight: 500;
  letter-spacing: 0.01em;
}
/* Show label on desktop and landscape */
@media (min-width: 701px), (orientation: landscape) {
  .bt-tab .bt-label {
    display: block;
  }
}
.bt-tab.active {
  background: #f3f4f6;
  box-shadow: 0 -2px 8px rgba(79, 70, 229, 0.09);
  z-index: 2;
}
.bt-tab.active i {
  color: #fff !important;
  background: #4f46e5;
  width: 90%;
  border-radius: 10px 10px 0 0;
  padding: 0.3em;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.13);
}
.bt-tab.active .bt-label {
  color: #4f46e5;
  font-weight: 700;
}
.bt-tab.active::before {
  content: "";
  display: block;
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #f3f4f6;
  z-index: 3;
}
.bottom-tab-bar {
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}
main[role="main"] {
  min-height: 300px;
  width: 97%;
}
