.tab-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-bg-base);
}

.tab-header {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border-default);
  min-height: 38px;
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
}

.tab-list {
  display: flex;
  gap: 0;
  height: 100%;
}

.tab-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: transparent;
  color: var(--color-text-secondary);
  border-right: 1px solid var(--color-border-default);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  user-select: none;
  position: relative;
}

.tab-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: transparent;
  transition: background-color var(--transition-fast);
}

.tab-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.tab-item.active {
  background: var(--color-bg-base);
  color: var(--color-text-primary);
}

.tab-item.active::after {
  background-color: var(--color-primary);
}

.tab-title {
  white-space: nowrap;
}

.tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: transparent;
  border: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 18px;
  line-height: 1;
  padding: 0;
  transition: all var(--transition-fast);
  opacity: 0;
}

.tab-item:hover .tab-close,
.tab-item.active .tab-close {
  opacity: 1;
}

.tab-close:hover {
  background: var(--color-bg-hover);
  color: var(--color-error);
  transform: scale(1.2);
}

.tab-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}
