/* Dashboard Switcher */
.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  background: #f3f4f6;
  padding: 2px;
  border-radius: 4px;
}

.dashboard-tab {
  padding: 5px 12px;
  text-decoration: none;
  color: #4b5563;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 3px;
  white-space: nowrap;
  transition: all 0.15s;
}

.dashboard-tab:hover {
  background: rgba(255, 255, 255, 0.5);
  color: #1f2937;
}

.dashboard-tab.selected {
  background: white;
  color: #3b82f6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Dashboard Tab Group with Dropdown */
.dashboard-tab-group {
  position: relative;
}

.dashboard-tab-group.has-dropdown > .dashboard-tab::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  vertical-align: middle;
  opacity: 0.6;
}

.dashboard-tab-group.dropdown-open > .dashboard-tab::after {
  transform: rotate(180deg);
  opacity: 1;
}

.dashboard-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1202;
  display: none;
  min-width: 160px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 4px;
}

.dashboard-tab-group.dropdown-open .dashboard-dropdown {
  display: block;
}

.dashboard-dropdown-item {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
  border-radius: 4px;
  transition: background-color 0.15s;
}

.dashboard-dropdown-item:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

.dashboard-dropdown-item.selected {
  background-color: #eff6ff;
  color: #3b82f6;
  font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #topnav-dashboard {
    flex-shrink: 1;
    min-width: 0;
    width: 100%;
  }

  .dashboard-tabs {
    gap: 1px;
    width: 100%;
  }

  .dashboard-tab {
    flex: 1 1 auto;
    min-width: 70px;
    text-align: center;
    font-size: 11px;
    padding: 6px 8px;
    white-space: normal;
  }

  .dashboard-tab-group {
    flex: 1 1 auto;
    min-width: 70px;
  }

  .dashboard-dropdown {
    left: 0;
    right: auto;
    min-width: 140px;
  }

  .dashboard-dropdown-item {
    padding: 10px 12px;
    font-size: 14px;
  }
}
